ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It depends a little bit on what context you are asking this question in. Different applications may use the geometry_msgs/Twist
fields in different ways. Generally speaking though, the velocities components listed in the message are meant to be body velocities i.e. the instantaneous velocity of a rigid body expressed in a body-fixed frame. So in most mobile robot platforms that conform to REP 103 (turtlesim, turtlebot, PR2, etc.) the x-component is always the forward velocity of the robot as seen from the robot's point of view. If you set the x-velocity component to be positive, the robot starts driving forward. Depending on the orientation of the robot, it's coordinates relative to some other frame (e.g. /map
, /world
) may be changing in more than one component.
The y-velocity component is the velocity that the robot should be translating "sideways". In a holonomic base (youBot, PR2), this velocity is significant. In a nonholonomic base (turtlebot), this velocity is ignored because the robot cannot have any velocity component in this direction (in the body-fixed frame).
The z-rotation component is the angular velocity of the robot about it's body-fixed, upward, z-axis (how fast is the robot spinning).