Ignition Gazebo

API Reference

6.0.0~pre1
SpeedLimiter Class Reference

Class to limit velocity, acceleration and jerk. https://github.com/ros-controls/ros_controllers/tree/melodic-devel/diff_drive_controller. More...

#include <SpeedLimiter.hh>

Public Member Functions

 SpeedLimiter (bool _hasVelocityLimits=false, bool _hasAccelerationLimits=false, bool _hasJerkLimits=false, double _minVelocity=0.0, double _maxVelocity=0.0, double _minAcceleration=0.0, double _maxAcceleration=0.0, double _minJerk=0.0, double _maxJerk=0.0)
 Constructor. More...
 
 ~SpeedLimiter ()
 Destructor. More...
 
double Limit (double &_v, double _v0, double _v1, double _dt) const
 Limit the velocity and acceleration. More...
 
double LimitAcceleration (double &_v, double _v0, double _dt) const
 Limit the acceleration. More...
 
double LimitJerk (double &_v, double _v0, double _v1, double _dt) const
 Limit the jerk. More...
 
double LimitVelocity (double &_v) const
 Limit the velocity. More...
 

Detailed Description

Class to limit velocity, acceleration and jerk. https://github.com/ros-controls/ros_controllers/tree/melodic-devel/diff_drive_controller.

Constructor & Destructor Documentation

◆ SpeedLimiter()

SpeedLimiter ( bool  _hasVelocityLimits = false,
bool  _hasAccelerationLimits = false,
bool  _hasJerkLimits = false,
double  _minVelocity = 0.0,
double  _maxVelocity = 0.0,
double  _minAcceleration = 0.0,
double  _maxAcceleration = 0.0,
double  _minJerk = 0.0,
double  _maxJerk = 0.0 
)

Constructor.

Parameters
[in]_hasVelocityLimitsif true, applies velocity limits.
[in]_hasAccelerationLimitsif true, applies acceleration limits.
[in]_hasJerkLimitsif true, applies jerk limits.
[in]_minVelocityMinimum velocity [m/s], usually <= 0.
[in]_maxVelocityMaximum velocity [m/s], usually >= 0.
[in]_minAccelerationMinimum acceleration [m/s^2], usually <= 0.
[in]_maxAccelerationMaximum acceleration [m/s^2], usually >= 0.
[in]_minJerkMinimum jerk [m/s^3], usually <= 0.
[in]_maxJerkMaximum jerk [m/s^3], usually >= 0.

◆ ~SpeedLimiter()

Destructor.

Member Function Documentation

◆ Limit()

double Limit ( double &  _v,
double  _v0,
double  _v1,
double  _dt 
) const

Limit the velocity and acceleration.

Parameters
[in,out]_vVelocity [m/s].
[in]_v0Previous velocity to v [m/s].
[in]_v1Previous velocity to v0 [m/s].
[in]_dtTime step [s].
Returns
Limiting factor (1.0 if none).

◆ LimitAcceleration()

double LimitAcceleration ( double &  _v,
double  _v0,
double  _dt 
) const

Limit the acceleration.

Parameters
[in,out]_vVelocity [m/s].
[in]_v0Previous velocity [m/s].
[in]_dtTime step [s].
Returns
Limiting factor (1.0 if none).

◆ LimitJerk()

double LimitJerk ( double &  _v,
double  _v0,
double  _v1,
double  _dt 
) const

Limit the jerk.

Parameters
[in,out]_vVelocity [m/s].
[in]_v0Previous velocity to v [m/s].
[in]_v1Previous velocity to v0 [m/s].
[in]_dtTime step [s].
Returns
Limiting factor (1.0 if none).
See also
http://en.wikipedia.org/wiki/Jerk_%28physics%29#Motion_control.

◆ LimitVelocity()

double LimitVelocity ( double &  _v) const

Limit the velocity.

Parameters
[in,out]_vVelocity [m/s].
Returns
Limiting factor (1.0 if none).

The documentation for this class was generated from the following file: