Ask Your Question

Handle Linear and Angular Velocity on Differential Drive Robot

asked 2016-01-10 05:56:51 -0500

Hi guys ,

I have some question about the cmd_vels ( linear , angular) -> Motor Speed Handling

since i have the differential drive robot which each wheel can do the maximum speed at 0.25 m/s

( So, Ideally, MAX Linear Velocity of Robot = 0.25 m/s right ? )

Then ,i've done some calculation on the maximum angular speed = 1.25 rad/s (with my Wheel Separation 40 cm)
and test on joystick teleop

  1. Joystick Teleop Scale Parameters

    Linear Scaling = 0.25

    and Angular Scaling 1.25

    If I push the Joystick in TOP-LEFT Direction, The Result (to command motors) calculated is more than 0.25 m/s,

    which is beyond the maximum speed of my motor.

How Can i handle this ? and how to find the range of Linear velocity and Angular velocity that i can access without breaking the condition on maximum speed limit ?

and i wonder that where to put the limitors in order to use with the "Navigation Stack" ( to prevent the navigation node sending command like the example above )

*FYI : motor is commanded by the velocity 0-255 ( 0 - 0.25 m/s ) and Direction Bit (0,1). so i need to convert them to direction and magnitude before sending. *

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-01-11 07:47:26 -0500

fsteinhardt gravatar image

updated 2016-01-11 07:54:21 -0500


I see two possibilities:

  • You could divide your possible velocities in two parts, one part for translation, one part for rotation. For example: set max translation velocity 1/2 of total possible veloctiy, the rotation gets the rest of the possible velocity (or choose another ratio). The sum of both velocities for translation and rotation can't be faster than the real wheel maximal velocity.This lowers your maximal speeds, but you can be sure that every possible velocity command in these limits can be carried out.

  • Or you could set both the max. rotation and translation velocities to the physical maximum and observe the resulting wheel velocities after you sum these values. If you max out the possible velocity of a wheel you scale down the velocity of the other wheel so that you keep the ratio of the velocities of both wheels. (Example: your input sets these velocities: left wheel: 100 rpm, right wheel 200 rpm, but your physical max. velocity is 150 rpm, so after scaling: left wheel: 75 rpm, right wheel 150 rpm ) You keep the max. possible velocities if you only translate or rotate, and you keep the shape of the trajectory if a wheel velocity is maxed out. (But the velocity while driving curves can be lower than the velocity that the planner has calculated).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-01-10 05:56:51 -0500

Seen: 2,615 times

Last updated: Jan 11 '16