Robotics StackExchange | Archived questions

cmd_vel components

In case of cmdvel.linear.x what does the xcomponent of velocity signify. Is it the velocity in xdirection or in the direction the car is facing ? Even when I put the cmdvel.linear.y to 0 its y-coordinate still changes.

Asked by mayank_m on 2016-02-04 14:06:11 UTC

Comments

Answers

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).

Asked by jarvisschultz on 2016-02-04 14:46:35 UTC

Comments

Hi! Let us know what kind of simulation and packages are you using? The changes in y -coordinate may be from the noise. Some simulation includes noise which makes vehicle moves although you do not command.

Asked by tn0432 on 2016-02-04 17:21:27 UTC

Comments