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

cmd_vel and move_base

asked 2011-04-01 00:28:10 -0500

What are the conventions for the cmd_vel message produced by move_base? Is positive linear.x the forward or backward direction? Is positive angular.z clockwise or anti-clockwise as viewed from above?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2011-04-01 07:33:20 -0500

updated 2022-05-25 11:41:21 -0500

You have to think in the local frame of the robot. I'll dispense a couple of samples in the 2D-plane for ground robots:

Using the local robot base frame, the robot is always looking to the infinity of the x-axis (no matter where it located on the map). So if you command a Twist {linear.x=1,linear.y=0} the robot will go forward. You can see that if we are working with a non-holonomic robot (like the erratic robot) the linear.y has no meaning. In the other hand if you work with holonomic robot (like the PR2 base) the linear.y would mean lateral move.

The angular.z is the yaw rotation, that it's, the only possible rotation in the 2D plane where the robot stands (if we are talking about a ground robot in the plane). The angular.z veolocity is in radians and anti-clockwise. So a Twist message with angular.z > 0 means turn left in the local frame.

See details in: Standard Units of Measure and Coordinate Conventions

edit flag offensive delete link more

answered 2011-04-01 02:22:19 -0500

arebgun gravatar image

Please see Standard Units of Measure and Coordinate Conventions page for a reference for the units and coordinate conventions used within ROS.

edit flag offensive delete link more

Question Tools


Asked: 2011-04-01 00:28:10 -0500

Seen: 4,470 times

Last updated: May 25 '22