Skip to content

KoNarRobotics/odrive_config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Odirve config guide

Calibrating the odrive

  1. Connect odrive to pc via usb
  2. Enter odrive utility. if odrive is connected correctly, you should see some OK messages
odrivetool
  1. Now you can start entering commands to configure odrive.
  2. 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
  1. Save the configuration
dev0.save_configuration()

Getting errors

  • To check for errors on odrive, run:
dump_errors(dev0)
  • To clear errors run:
dev0.clear_errors()

To Get/Set configuration of specific device

  • 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]

Load configuration from json file

  • 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()

Save configuration to json file

  • connect the odive to pc
  • backup the configuration to json file
odrivetool backup-config

Problemns

MotorError errors

After 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
  1. Calibrate the engine
dev0.axis1.requested_state=AXIS_STATE_FULL_CALIBRATION_SEQUENCE
  1. 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
  1. Save the configuration
dev0.save_configuration()
  1. Now it should work correctly

WARNING

  • 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 .

Helpfull links

About

Odrive config and problems guide

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published