19 #ifndef DIFF_DRIVE_CONTROLLER__SPEED_LIMITER_HPP_
20 #define DIFF_DRIVE_CONTROLLER__SPEED_LIMITER_HPP_
24 namespace diff_drive_controller
42 bool has_velocity_limits =
false,
bool has_acceleration_limits =
false,
43 bool has_jerk_limits =
false,
double min_velocity = NAN,
double max_velocity = NAN,
44 double min_acceleration = NAN,
double max_acceleration = NAN,
double min_jerk = NAN,
45 double max_jerk = NAN);
55 double limit(
double & v,
double v0,
double v1,
double dt);
82 double limit_jerk(
double & v,
double v0,
double v1,
double dt);
86 bool has_velocity_limits_;
87 bool has_acceleration_limits_;
88 bool has_jerk_limits_;
95 double min_acceleration_;
96 double max_acceleration_;
Definition: speed_limiter.hpp:27
double limit_jerk(double &v, double v0, double v1, double dt)
Limit the jerk.
Definition: speed_limiter.cpp:117
double limit(double &v, double v0, double v1, double dt)
Limit the velocity and acceleration.
Definition: speed_limiter.cpp:77
double limit_acceleration(double &v, double v0, double dt)
Limit the acceleration.
Definition: speed_limiter.cpp:100
SpeedLimiter(bool has_velocity_limits=false, bool has_acceleration_limits=false, bool has_jerk_limits=false, double min_velocity=NAN, double max_velocity=NAN, double min_acceleration=NAN, double max_acceleration=NAN, double min_jerk=NAN, double max_jerk=NAN)
Constructor.
Definition: speed_limiter.cpp:26
double limit_velocity(double &v)
Limit the velocity.
Definition: speed_limiter.cpp:88