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

cmd_vel components

asked 2016-02-04 13:06:11 -0600

mayank_m gravatar image

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

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-02-04 13:46:35 -0600

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

edit flag offensive delete link more
0

answered 2016-02-04 16:21:27 -0600

tn0432 gravatar image

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.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-02-04 13:06:11 -0600

Seen: 883 times

Last updated: Feb 04 '16