Odrive + MicroROS with ROS2 command

Hello All,

For a project, we are thinking of using ROS2 to communicate with Odrive with a twist. The goal is to have access to ROS features right down to the motor.

For that we solved many hurdles such as porting MicroROS to FreeRTOS, changing the Tup system to makefiles…

Currently, we are capable of compiling and building the firmware.

Odrivetool is able to detect the hw (with a delay of 60sec).
We follow it by doing a full calibration sequence which successfully initializes both the motor and the encoder.

Then we try to control the motor in closed-loop which Odrive doesn’t seem to like.
It-dumps an error saying “ERROR_CONTROL_DEADLINE_MISSED” and “ERROR_MOTOR_DISARMED”.

has anyone encountered this error? if so any fixes?

looking forward to your potential comments

1 Like

Have you tried the rc-0.5.1 firmware and tool? The USB connection time is much improved, now about 1-2 seconds.
(if you upgrade the firmware, make sure you are NOT using the tool installed by PIP or similar, since it will be for the old firmware)

Does your error also include ERROR_OVERSPEED? If so, then that error will cause the other two. (yes, confusing, i know)
In that case, you simply need to increase motor.config.vel_limit. :slight_smile:
Make sure you can do all of your moves in odrivetool. It sounds as if your ROS connector is working though!

I’ve never used ROS 2 (I haven’t used ROS 1 very much either), but I have always been excited about it, particularly since it uses DDS for communications. It’s nice to hear that it is getting a bit more widely adopted!