Acceleration too slow

I have an Odrive with 2 motors + encoders connected to it.

When I manually send a 0.3 velocity command to both motors and then later a 0 velocity command, the motors work fine and accelerate and deaccelerate according to the ramp I have set (0.5)

However, when I run with ROS, the Odrive receives 5 velocity commands per second over the serial (baudrate 115200).
Changing from sending velocity 0.3 commands to velocity 0 commands leads to an extremely slow deacceleration, taking 6 seconds for the motors to come to a stop.
It almost looks as if the Odrive is buffering and leveling the incoming velocity commands to an average, making it react slowly to a sudden change in speed.

Can anyone tell me how to better configure this?
(All tests were done with the wheels running free in the air)

What happens when you manually send 5 velocity commands per second?

Hi! Are you sure that another ros nodes not blocking each other? You could try simple test with ardiono sketch and send the same amount of commands from them. If it works correctly you need to deeper understand what’s actually going in your ros code)

On my Arduino, I print the commands it gives to the Odrive. I can see it is giving a series of 0.3 velocity commands followed by a series of 0 velocity commands. So the Ros messages I am sending are processed correctly

Problem found. I had an error in my code in my ramp setting by confusing units. In Ros everything is in m/s whereas the ramp setting in Odrive is in rev/s2.

1 Like

Congrats! :slight_smile: