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

Revision history [back]

If you're trying to figure out what speed to drive your motors at (in m/s):

left_speed_out = cmd_vel.linear.x - cmd_vel.angular.z*ROBOT_WIDTH/2
right_speed_out = cmd_vel.linear.x + cmd_vel.angular.z*ROBOT_WIDTH/2

This assumes that twist.linear.x is your translational speed in m/s, twist.angular.z is your rotational speed in rad/s, and ROBOT_WIDTH is the width between your wheels in m.