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] _hasVelocityLimits if true, applies velocity limits. [in] _hasAccelerationLimits if true, applies acceleration limits. [in] _hasJerkLimits if true, applies jerk limits. [in] _minVelocity Minimum velocity [m/s], usually <= 0. [in] _maxVelocity Maximum velocity [m/s], usually >= 0. [in] _minAcceleration Minimum acceleration [m/s^2], usually <= 0. [in] _maxAcceleration Maximum acceleration [m/s^2], usually >= 0. [in] _minJerk Minimum jerk [m/s^3], usually <= 0. [in] _maxJerk Maximum jerk [m/s^3], usually >= 0.
◆ ~SpeedLimiter()
~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] _v Velocity [m/s]. [in] _v0 Previous velocity to v [m/s]. [in] _v1 Previous velocity to v0 [m/s]. [in] _dt Time 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] _v Velocity [m/s]. [in] _v0 Previous velocity [m/s]. [in] _dt Time 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] _v Velocity [m/s]. [in] _v0 Previous velocity to v [m/s]. [in] _v1 Previous velocity to v0 [m/s]. [in] _dt Time step [s].
- Returns
- Limiting factor (1.0 if none).
◆ LimitVelocity()
double LimitVelocity | ( | double & | _v | ) | const |
Limit the velocity.
- Parameters
-
[in,out] _v Velocity [m/s].
- Returns
- Limiting factor (1.0 if none).
The documentation for this class was generated from the following file: