UbiquityRobotics / ubiquity_motor

Package that provides a ROS interface for the motors in UbiquityRobotics robots
BSD 3-Clause "New" or "Revised" License
24 stars 23 forks source link

Get the knowledge that high resolution encoders are in use ready faster #86

Closed mjstn closed 3 years ago

mjstn commented 4 years ago

We found that if we start the motor_node using v35 firmware which has high resolution encoder mode and then as fast as we can we send twist commands with a known speed for a known duration the resulting distance will be ok BUT the odometry will register two times the actual distance moved.

If we wait for a couple minutes ODOM will work ok.

This we feel is due to we are not pulling in fast enough the hw_options report from firmware so if we receive cmd_vel early on after powerup we defaulted to standard resolution mode for encoders which was twice the distance ODOM uses per tic than reality of high resoution mode of the encoders which has been in use from v35 firmware and beyond.

It may be time to DEFAULT startup motor_node in high resolution mode as a good way to bypass this issue because v35 is the firmware of choice these days. The bug would still exist but only for users of production firmware that have not updated and again, only for first minute or so after startup.

mjstn commented 3 years ago

We have started to default to high resolution encoders now so this issue is no longer a problem.