ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

geometry_msgs/Twist encodes velocity, not position.

From the documentation:

This expresses velocity in free space broken into its linear and angular parts.

Your rostopic pub command line would be publishing a rotation at 3.14 rad/s around the Z axis.

So the total rotation depends on the duration for which you publish that message.

If you want to rotate the robot (any robot that exposes the same Twist interface) a certain angle, you'll have to publish the Twist for as long as needed. nav_msgs/Odometry would be a good source of info on what the current pose of your robot is and could be used to close a position loop over this velocity control interface.