Repository navigation
Quick start (from old Python code)
Ian Lansdowne edited this page Apr 15, 2026
·
1 revision
For Python (not used in latest revision):
- Create a python virtual environment, install all dependencies in requirements.txt
- Copy the fdcanusb udev rule (for linux users) where it belongs (read the comments in the file linked below)
- https://github.com/mjbots/moteus/blob/main/docs/getting_started.md
- position range is -1 to 1 revolutions by default
- to load stored config run
conf loadin tview gui - if things are funky try
conf loada few times - need to figure out how to
conf loadfrom a python script - moteus console: python3 -m moteus_gui.tview
- calibrate: python3 -m moteus.moteus_tool --target 1 --calibrate
- to load default config in tview gui write
conf defaultthenconf write - to get correct configs copy
conf set servo.pid_position.kp 100
conf set servo.pid_position.ki 1
conf set servo.pid_position.kd 10
conf set servopos.position_min nan
conf set servopos.position_max nan
conf set motor_position.rotor_to_output_ratio 0.0526315789
conf set servo.max_velocity 10.0
conf set servo.default_velocity_limit 8.0
conf set servo.default_accel_limit 20.0
into tview gui then run conf write
-
conf defautin tview - calibrate
python3 -m moteus.moteus_tool --target 1 --calibratein terminal - zero offset
python3 -m moteus.moteus_tool --target 1 --zero-offset - apply config in tview
conf set servo.pid_position.kp 100
conf set servo.pid_position.ki 1
conf set servo.pid_position.kd 10
conf set servopos.position_min nan
conf set servopos.position_max nan
conf set motor_position.rotor_to_output_ratio 0.0526315789
conf set servo.max_velocity 10.0
conf set servo.default_velocity_limit 8.0
conf set servo.default_accel_limit 20.0
-
conf writein tview -
conf loadin tview -
d pos nan 1 nanin tview
Assuming the motor controller has the configuration stored on it from the above section (run again if not)
If fault code is 36, the motor needs to be calibrated with the moteus tool. Run python3 -m moteus.moteus_tool --target 1 --calibrate in your terminal, THIS WILL SPIN THE MOTOR A LOT
If something stops working, unplug and replug
- run test.py