Class TractionLimiter

Class Documentation

class TractionLimiter

Public Functions

TractionLimiter(double min_velocity = NAN, double max_velocity = NAN, double min_acceleration = NAN, double max_acceleration = NAN, double min_deceleration = NAN, double max_deceleration = NAN, double min_jerk = NAN, double max_jerk = NAN)

Constructor.

Parameters:
  • min_velocity[in] Minimum velocity [m/s] or [rad/s]

  • max_velocity[in] Maximum velocity [m/s] or [rad/s]

  • min_acceleration[in] Minimum acceleration [m/s^2] or [rad/s^2]

  • max_acceleration[in] Maximum acceleration [m/s^2] or [rad/s^2]

  • min_deceleration[in] Minimum deceleration [m/s^2] or [rad/s^2]

  • max_deceleration[in] Maximum deceleration [m/s^2] or [rad/s^2]

  • min_jerk[in] Minimum jerk [m/s^3], usually <= 0

  • max_jerk[in] Maximum jerk [m/s^3], usually >= 0

double limit(double &v, double v0, double v1, double dt)

Limit the velocity and acceleration.

Parameters:
  • v[inout] Velocity [m/s] or [rad/s]

  • v0[in] Previous velocity to v [m/s] or [rad/s]

  • v1[in] Previous velocity to v0 [m/s] or [rad/s]

  • dt[in] Time step [s]

Returns:

Limiting factor (1.0 if none)

double limit_velocity(double &v)

Limit the velocity.

Parameters:

v[inout] Velocity [m/s] or [rad/s]

Returns:

Limiting factor (1.0 if none)

double limit_acceleration(double &v, double v0, double dt)

Limit the acceleration.

Parameters:
  • v[inout] Velocity [m/s] or [rad/s]

  • v0[in] Previous velocity [m/s] or [rad/s]

  • dt[in] Time step [s]

Returns:

Limiting factor (1.0 if none)

double limit_jerk(double &v, double v0, double v1, double dt)

Limit the jerk.

Parameters:
  • v[inout] Velocity [m/s] or [rad/s]

  • v0[in] Previous velocity to v [m/s] or [rad/s]

  • v1[in] Previous velocity to v0 [m/s] or [rad/s]

  • dt[in] Time step [s]

Returns:

Limiting factor (1.0 if none)