Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I assume you're writing a driver which receives Twist messages on the cmd_vel topic to control a custom mobile base.

In this case, you have to read the contents of the message and convert it into motor commands.

For a normal diff-drive robot, this means reading the linear.x (forward/backward) and angular.z (angular velocity) members of the Twist message and computing velocities for the left and right wheels.

For more complex robots, the other members of the Twist message represent sidways, up/down, and rotational motion around the other axes of the robot.

Note that, by convention, the units on the Twist message are in _meters per second_ for linear velocities, and _radians per second_ for angular velocities.