ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The wheel odometry from the Create is not the greatest. I would expect it to be able to travel 12 inches (+- 0.5inch) on wheel encoders alone, but you can let me know.
I would record a reference odometry message before you command the robot to move. Then continually compute the distanced travelled by taking the difference between the current odometry message and the reference. When the robot has travelled the desired distance, send a zero command to /cmd_vel
. Don't forget the units reported on /odom
are in meters. I'd expect the slower you command the robot to move, the closer you'll be able to stop at the desired mark. Also note that when rotation is involved, the odometry estimate becomes worse.
2 | No.2 Revision |
The wheel odometry from the Create is not the greatest. I would expect it to be able to travel 12 inches (+- 0.5inch) on wheel encoders alone, but you can let me know.
I would record a reference odometry message before you command the robot to move. Then continually compute the distanced travelled by taking the difference between the current odometry message and the reference. When the robot has travelled the desired distance, send a zero command to /cmd_vel
. Don't forget the units reported on /odom
are in meters. I'd expect the slower you command the robot to move, the closer you'll be able to stop at the desired mark. Also note that when rotation is involved, the odometry estimate becomes worse.
EDIT: To clarify, I am suggesting writing your own controller node that subscribes to /odom
and publishes to /cmd_vel
.