Recalibrating Motors
Prerequisites
Install odrivetool (instructions here).
Install Visual Studio Code: Download Visual Studio code.
Clone the motion repository here.
For best results, calibrate motors with no mechanical load.
Preparation
Disassemble the leg enough so both motors on the ODESC can spin freely. - Do NOT remove the encoder plate from the back of either motor.
Note
Place both motors face-up (encoder plate down) on a flat, level surface during calibration.
Optionally: You may run calibration with legs assembled, but stability issues can occur — run at your own risk.
Running the Script
Connect the ODESC to your computer via micro USB.
Power the ODESC (bench supply or batteries).
Run the calibration script:
Script path: motion/tools/odrive/Calibrate.py
Example using pipenv:
pipenv run python motion/tools/odrive/Calibrate.pyExample without pipenv (ensure dependencies installed):
python motion/tools/odrive/Calibrate.py
Note
A Pipfile is provided to simplify dependency management; install with pipenv if available.
What to expect
Each motor will emit audible beeps during calibration.
Motors will move short distances in both directions.
MAKE SURE each motor can move unimpeded; calibration will fail if movement is obstructed.
After Calibration
When calibration completes, disconnect the computer from the ODESC.
Reassemble the leg.
Warning
If you remove the encoder plate at any time, the encoders will need to be reinitialized. Only remove it if you intend to perform reinitialization.