gz/math/SpeedLimiter.hh
double LimitVelocity(double &_vel) const
Limit the velocity.
double LimitAcceleration(double &_vel, double _prevVel, std::chrono::steady_clock::duration _dt) const
Limit the acceleration using a first-order backward difference method.
void SetMinVelocity(double _lim)
Set minimum velocity limit in m/s, usually <= 0.
Definition: gz/math/AdditivelySeparableScalarField3.hh:27
double MinVelocity() const
Get minimum velocity limit, defaults to negative infinity.
void SetMaxVelocity(double _lim)
Set maximum velocity limit in m/s, usually >= 0.
double MaxVelocity() const
Get maximum velocity limit, defaults to positive infinity.
void SetMaxJerk(double _lim)
Set maximum jerk limit in m/s^3, usually >= 0.
void SetMinJerk(double _lim)
Set minimum jerk limit in m/s^3, usually <= 0.
void SetMaxAcceleration(double _lim)
Set maximum acceleration limit in m/s^2, usually >= 0.
double MaxAcceleration() const
Get maximum acceleration limit, defaults to positive infinity.
Class to limit velocity, acceleration and jerk.
Definition: gz/math/SpeedLimiter.hh:36
SpeedLimiter()
Constructor. There are no limits by default.
double LimitJerk(double &_vel, double _prevVel, double _prevPrevVel, std::chrono::steady_clock::duration _dt) const
Limit the jerk using a second-order backward difference method.
double MinAcceleration() const
Get minimum acceleration limit, defaults to negative infinity.
double MinJerk() const
Get minimum jerk limit, defaults to negative infinity.
double MaxJerk() const
Get maximum jerk limit, defaults to positive infinity.
void SetMinAcceleration(double _lim)
Set minimum acceleration limit in m/s^2, usually <= 0.
double Limit(double &_vel, double _prevVel, double _prevPrevVel, std::chrono::steady_clock::duration _dt) const
Limit velocity, acceleration and jerk.