#include <speed_limiter.h>
Public Member Functions | |
double | limit (double &v, double v0, double v1, double dt) |
Limit the velocity and acceleration. More... | |
double | limit_acceleration (double &v, double v0, double dt) |
Limit the acceleration. More... | |
double | limit_jerk (double &v, double v0, double v1, double dt) |
Limit the jerk. More... | |
double | limit_velocity (double &v) |
Limit the velocity. More... | |
SpeedLimiter (bool has_velocity_limits=false, bool has_acceleration_limits=false, bool has_deceleration_limits=false, bool has_jerk_limits=false, double min_velocity=0.0, double max_velocity=0.0, double min_acceleration=0.0, double max_acceleration=0.0, double min_deceleration=0.0, double max_deceleration=0.0, double min_jerk=0.0, double max_jerk=0.0) | |
Constructor. More... | |
Public Attributes | |
bool | has_acceleration_limits |
bool | has_deceleration_limits |
bool | has_jerk_limits |
bool | has_velocity_limits |
double | max_acceleration |
double | max_deceleration |
double | max_jerk |
double | max_velocity |
double | min_acceleration |
double | min_deceleration |
double | min_jerk |
double | min_velocity |
Definition at line 12 of file speed_limiter.h.
ackermann_controller::SpeedLimiter::SpeedLimiter | ( | bool | has_velocity_limits = false , |
bool | has_acceleration_limits = false , |
||
bool | has_deceleration_limits = false , |
||
bool | has_jerk_limits = false , |
||
double | min_velocity = 0.0 , |
||
double | max_velocity = 0.0 , |
||
double | min_acceleration = 0.0 , |
||
double | max_acceleration = 0.0 , |
||
double | min_deceleration = 0.0 , |
||
double | max_deceleration = 0.0 , |
||
double | min_jerk = 0.0 , |
||
double | max_jerk = 0.0 |
||
) |
Constructor.
[in] | has_velocity_limits | if true, applies velocity limits |
[in] | has_acceleration_limits | if true, applies acceleration limits |
[in] | has_jerk_limits | if true, applies jerk limits |
[in] | min_velocity | Minimum velocity [m/s], usually <= 0 |
[in] | max_velocity | Maximum velocity [m/s], usually >= 0 |
[in] | min_acceleration | Minimum acceleration [m/s^2], usually <= 0 |
[in] | max_acceleration | Maximum acceleration [m/s^2], usually >= 0 |
[in] | min_jerk | Minimum jerk [m/s^3], usually <= 0 |
[in] | max_jerk | Maximum jerk [m/s^3], usually >= 0 |
Definition at line 19 of file speed_limiter.cpp.
double ackermann_controller::SpeedLimiter::limit | ( | double & | v, |
double | v0, | ||
double | v1, | ||
double | dt | ||
) |
Limit the velocity and acceleration.
[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] |
Definition at line 48 of file speed_limiter.cpp.
double ackermann_controller::SpeedLimiter::limit_acceleration | ( | double & | v, |
double | v0, | ||
double | dt | ||
) |
Limit the acceleration.
[in,out] | v | Velocity [m/s] |
[in] | v0 | Previous velocity [m/s] |
[in] | dt | Time step [s] |
Definition at line 71 of file speed_limiter.cpp.
double ackermann_controller::SpeedLimiter::limit_jerk | ( | double & | v, |
double | v0, | ||
double | v1, | ||
double | dt | ||
) |
Limit the jerk.
[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] |
Definition at line 103 of file speed_limiter.cpp.
double ackermann_controller::SpeedLimiter::limit_velocity | ( | double & | v | ) |
Limit the velocity.
[in,out] | v | Velocity [m/s] |
Definition at line 59 of file speed_limiter.cpp.
bool ackermann_controller::SpeedLimiter::has_acceleration_limits |
Definition at line 83 of file speed_limiter.h.
bool ackermann_controller::SpeedLimiter::has_deceleration_limits |
Definition at line 84 of file speed_limiter.h.
bool ackermann_controller::SpeedLimiter::has_jerk_limits |
Definition at line 85 of file speed_limiter.h.
bool ackermann_controller::SpeedLimiter::has_velocity_limits |
Definition at line 82 of file speed_limiter.h.
double ackermann_controller::SpeedLimiter::max_acceleration |
Definition at line 93 of file speed_limiter.h.
double ackermann_controller::SpeedLimiter::max_deceleration |
Definition at line 95 of file speed_limiter.h.
double ackermann_controller::SpeedLimiter::max_jerk |
Definition at line 99 of file speed_limiter.h.
double ackermann_controller::SpeedLimiter::max_velocity |
Definition at line 89 of file speed_limiter.h.
double ackermann_controller::SpeedLimiter::min_acceleration |
Definition at line 92 of file speed_limiter.h.
double ackermann_controller::SpeedLimiter::min_deceleration |
Definition at line 94 of file speed_limiter.h.
double ackermann_controller::SpeedLimiter::min_jerk |
Definition at line 98 of file speed_limiter.h.
double ackermann_controller::SpeedLimiter::min_velocity |
Definition at line 88 of file speed_limiter.h.