Factor-Robotics / odrive_ros2_control

ODrive driver for ros2_control
Apache License 2.0
250 stars 82 forks source link

Motor Freely Moves when Zero Velocity is Sent #7

Open David9696 opened 2 years ago

David9696 commented 2 years ago

Hi,

Thanks for sharing this great project.

I tried to implement the sharing package with my own robot. It can be run without issue.

However, when I issued zero /joint0_velocity_controller/commands, the wheel would stop but the it is freely to rotate if I rotate it manually. Is this behavior expected? Could I make the wheel not moving or hold when zero /joint0_velocity_controller/commands is sent? Otherwise the robot would drift for a distance before it really stops.

Hope you could enlighten me.

Thanks.

borongyuan commented 2 years ago

Hi,

Do you meet the same problem when using odrivetool? This is probably not a problem with the ROS driver. I can also rotate some motors manually when speed command is zero. But not totally free. If you try to turn it faster you should feel more resistance. You may need to tune the controller for more stiffness. Increase vel_integrator_gain should work. However this does not lock the position. True locking can only be achieved by position control.

We will support adding control parameters to the config file. So the ROS driver can update the params at runtime.

Thanks