Why does diff_drive_controller publish wrong odom?
Hello all,
I get a strange result when using the ROS2 foxy diffdrivecontroller to publish odometry!
I am using a joystick controller node that publishes to the "diffbotbasecontroller/cmdvelunstamped" topic. Our real robot is rather heavy. So, it takes some initial joystick push for the robot to rotate around itself. Let's say, I have to push the joystick past 10% of its range for the robot to start rotating.
The problem is that when I push the joystick to 9%, while the robot is not rotating yet, the odometry topic is already showing angular rotation. If I keep the joystick at 9%, the odometry keeps increasing the rotation angle, whereas the real robot is not rotating at all! If I let go of the joystick (which goes back to 0 rotation command), the odometry rotation stops increasing.
Interestingly enough, the wheel encoders also DO NOT show any speed or change in wheel rotation angles, when the joystick is at 9%.
Question 1: Why is this happening?
Question 2: Can I force the diffdrivecontroller odometry publisher to ignore the command and just rely on wheel encoders?
Question 3: The diffdrivecontroller has a parameter "open_loop: true" in the YAML config file. I have not found any mention of that in the documentations. What does that do?
Thanks so much for your help in advance!
Asked by Farbod on 2023-03-16 16:15:43 UTC
Comments