- Connect odrive to pc via usb
- Enter odrive utility. if odrive is connected correctly, you should see some OK messages
odrivetool- Now you can start entering commands to configure odrive.
- To start calibration sequence run:
# for axis 0
dev0.axis0.requested_state=AXIS_STATE_FULL_CALIBRATION_SEQUENCE
#for axis 1
dev0.axis1.requested_state=AXIS_STATE_FULL_CALIBRATION_SEQUENCE- Save the configuration
dev0.save_configuration()- To check for errors on odrive, run:
dump_errors(dev0)- To clear errors run:
dev0.clear_errors()- get encoder configuration
dev0.axis0.encoder- get motor configuration
dev0.axis0.motor- Set encoder configuration
dev0.axis0.encoder.config.[value of the seting to change] = [value]- Set motor configuration
dev0.axis0.motor.config.[value of the seting to change] = [value]- connect the odive to pc
- Load configuration from json file
odrivetool restore-config config.json - Enter odrive utility
odrivetool- Save the configuration
dev0.save_configuration()- connect the odive to pc
- backup the configuration to json file
odrivetool backup-configAfter calibreting odrive without saving the configuration, the motors seem to be working and after saving the configuration the motors are not working anymore. The errors are usually:
axis: Error(s):
AxisError.MOTOR_FAILED
motor: Error(s):
MotorError.UNKNOWN_PHASE_ESTIMATE- Calibrate the engine
dev0.axis1.requested_state=AXIS_STATE_FULL_CALIBRATION_SEQUENCE- Change the encoder.config.pre_calibrated to True (because it is not loaded correctly from backup of odrive config)
# for example set this for axis 1
dev0.axis1.encoder.config.pre_calibrated = True- Save the configuration
dev0.save_configuration()- Now it should work correctly
-
sometimes configuration is not loaded correctly from json backup. [ if there is some weard errors try to check the config to see if values in odrve are different form the backup. Then set the values manually and save the configuration]
-
Odrive that we use is outdated so we have to use firmware version 0.5.6 .