Firmware v0.5.1 Release Candidate Feedback Thread

The Release Candidate for Firmware v0.5.1 is ready! You can find binaries here, and check the instructions “How to flash a custom firmware” here. You can also check out this release on GitHub. This thread is for feedback and discussion about the firmware.
Please let us know in the poll below even if everything works.

Binaries here.

Changes

This firmware has breaking changes to the input interface and certain config values.

input_pos and input_vel are now in units of turns and turns/s instead of counts
input_current is now input_torque with units of Nm
motor.config.torque_constant and motor.config.torque_lim have been added.
axis.config.counts_per_step is now axis.config.turns_per_step

These changes allow for the controller gains to be encoder-agnostic, as well as making the controller units easier to interpret in general. torque_lim is disabled (set to infinite) by default. The motor still has a current limit which will still in effect limit the torque.

We added a new way to define the ODrive parameter interface that makes the initial connection to odrivetool much faster. Motor thermistor support has also been added. A complete list of changes is in the changelog.

Migration guide

Previously saved values, like the controller gains, need to be converted into the new units.

torque_constant is approximately equal to 8.27 / (motor KV)

pos_gain remains the same
vel_gain = vel_gain_old * torque_constant * encoder cpr
vel_integrator_gain = vel_integrator_gain_old * torque_constant * encoder cpr
vel_limit = vel_limit_old / encoder cpr

Other parameters are converted in a similar way.

Quick feedback

  • Calibrate motor works
  • Closed loop control works
  • CAN works
  • Incremental encoder works
  • Absolute encoder works
  • Step/dir input works
  • RC PWM input works
  • USB and Python works
  • USB and ASCII protocol works
  • UART and ASCII protocol works

0 voters

If you have any issues, please report it below.

Please note that we are intentionally skipping release of v0.5.0. This is because we wanted to include the unit changes noted above. We don’t anticipate adding any new features now, only bug fixes. Please help us find the bugs!

I think it’s are missing the move of the thermistor read out in the migration guide. I will try this rc out today.

Trying to setup PWM with this firmware but:

odrv0.config.gpio4_pwm_mapping.endpoint = odrv0.axis0.controller._remote_attributes['pos_setpoint']

does not work as “endpoint” has been removed!
vel_setpoint and pos_setpoint cannot be set. They produce errors.

Hope someone can help
Many thanks in advance
Mr Anders W
Sweden

I don’t think ‘endpoint’ has been removed, but you should be using ‘input_pos’ instead of ‘pos_setpoint’.
This is to allow things like input filtering and the new trajectory planner to work. If controller.config.input_mode is set to INPUT_MODE_PASSTHROUGH then it sets pos_setpoint immediately.

1 Like

Thanks

“endpoint” is missing here but I’ll test what you have write

In [125]: odrv0.config.gpio1_pwm_mapping
Out[125]:
min = 0.0 (float)
max = 0.0 (float)

It is a lot to chance i doc.

Thanks
Anders

In [126]: odrv0.axis0.controller.config.input_mode = INPUT_MODE_PASSTHROUGH

NameError Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\fibre\shell.py in ()
----> 1 odrv0.axis0.controller.config.input_mode = INPUT_MODE_PASSTHROUGH

NameError: name ‘INPUT_MODE_PASSTHROUGH’ is not defined

You need to use the odrivetool for rc-v0.5.1 to use the enumerations, sorry. That value works out to “1” though if you just want it to run

Thanks!

What I do not understand is how to connect one PWM (3) to motor 1 and another PWM (4) to motor 2.

Please fix ODrive/issues/478

Thank you!

Thanks for new firmware!

I want to mention that change in controller gains lead to very jerky hoverboard motor behavior.
So can you provide some hints on achieving proper motor behavior?

@rodrive rc3 is available with a fix for that issue.

rc4 is available. Fixes sensorless mode and a potential risk of damage for the brake resistor.

rc5 is available with a fix for unintended acceleration in sensorless mode when using INPUT_MODE_VEL_RAMP