2
$\begingroup$

I'm learning ROS and I have found an expression that I don't understand. I'm reading the book "Mastering ROS for Robotics Programming - Second Edition", and on a controller to move a robot using keyboard said:

differential_teleop_key already has its own built in velocity smoother

You can find differential_teleop_key on Github.

What is a Velocity Smoother?

$\endgroup$

1 Answer 1

6
$\begingroup$

The velocity smoother part of the code is this:

if target_speed > control_speed:
            control_speed = min( target_speed, control_speed + 0.02 )
        elif target_speed < control_speed:
            control_speed = max( target_speed, control_speed - 0.02 )
        else:
            control_speed = target_speed

as you can see, regardless of how much you increase the target velocity, there will be no large jump in the controled velocity. It will always be incremented or decremented by 0.02 cyclically until it reaches the target velocity.

In essence this is an acceleration limiting approach to motion control when a constant maximum acceleration is assumed and so a trapezoidal velocity profile is generated. Jerk limiting (limiting the derivative of the acceleration) produces even smoother velocity profiles.

More about acceleration and jerk limiting here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.