Public Member Functions | Public Attributes | List of all members
diff_drive_controller::SpeedLimiter Class Reference

#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_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_jerk=0.0, double max_jerk=0.0)
 Constructor. More...
 

Public Attributes

bool has_acceleration_limits
 
bool has_jerk_limits
 
bool has_velocity_limits
 
double max_acceleration
 
double max_jerk
 
double max_velocity
 
double min_acceleration
 
double min_jerk
 
double min_velocity
 

Detailed Description

Definition at line 45 of file speed_limiter.h.

Constructor & Destructor Documentation

diff_drive_controller::SpeedLimiter::SpeedLimiter ( bool  has_velocity_limits = false,
bool  has_acceleration_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_jerk = 0.0,
double  max_jerk = 0.0 
)

Constructor.

Parameters
[in]has_velocity_limitsif true, applies velocity limits
[in]has_acceleration_limitsif true, applies acceleration limits
[in]has_jerk_limitsif true, applies jerk limits
[in]min_velocityMinimum velocity [m/s], usually <= 0
[in]max_velocityMaximum velocity [m/s], usually >= 0
[in]min_accelerationMinimum acceleration [m/s^2], usually <= 0
[in]max_accelerationMaximum acceleration [m/s^2], usually >= 0
[in]min_jerkMinimum jerk [m/s^3], usually <= 0
[in]max_jerkMaximum jerk [m/s^3], usually >= 0

Definition at line 52 of file speed_limiter.cpp.

Member Function Documentation

double diff_drive_controller::SpeedLimiter::limit ( double &  v,
double  v0,
double  v1,
double  dt 
)

Limit the velocity and acceleration.

Parameters
[in,out]vVelocity [m/s]
[in]v0Previous velocity to v [m/s]
[in]v1Previous velocity to v0 [m/s]
[in]dtTime step [s]
Returns
Limiting factor (1.0 if none)

Definition at line 75 of file speed_limiter.cpp.

double diff_drive_controller::SpeedLimiter::limit_acceleration ( double &  v,
double  v0,
double  dt 
)

Limit the acceleration.

Parameters
[in,out]vVelocity [m/s]
[in]v0Previous velocity [m/s]
[in]dtTime step [s]
Returns
Limiting factor (1.0 if none)

Definition at line 98 of file speed_limiter.cpp.

double diff_drive_controller::SpeedLimiter::limit_jerk ( double &  v,
double  v0,
double  v1,
double  dt 
)

Limit the jerk.

Parameters
[in,out]vVelocity [m/s]
[in]v0Previous velocity to v [m/s]
[in]v1Previous velocity to v0 [m/s]
[in]dtTime step [s]
Returns
Limiting factor (1.0 if none)
See also
http://en.wikipedia.org/wiki/Jerk_%28physics%29#Motion_control

Definition at line 115 of file speed_limiter.cpp.

double diff_drive_controller::SpeedLimiter::limit_velocity ( double &  v)

Limit the velocity.

Parameters
[in,out]vVelocity [m/s]
Returns
Limiting factor (1.0 if none)

Definition at line 86 of file speed_limiter.cpp.

Member Data Documentation

bool diff_drive_controller::SpeedLimiter::has_acceleration_limits

Definition at line 113 of file speed_limiter.h.

bool diff_drive_controller::SpeedLimiter::has_jerk_limits

Definition at line 114 of file speed_limiter.h.

bool diff_drive_controller::SpeedLimiter::has_velocity_limits

Definition at line 112 of file speed_limiter.h.

double diff_drive_controller::SpeedLimiter::max_acceleration

Definition at line 122 of file speed_limiter.h.

double diff_drive_controller::SpeedLimiter::max_jerk

Definition at line 126 of file speed_limiter.h.

double diff_drive_controller::SpeedLimiter::max_velocity

Definition at line 118 of file speed_limiter.h.

double diff_drive_controller::SpeedLimiter::min_acceleration

Definition at line 121 of file speed_limiter.h.

double diff_drive_controller::SpeedLimiter::min_jerk

Definition at line 125 of file speed_limiter.h.

double diff_drive_controller::SpeedLimiter::min_velocity

Definition at line 117 of file speed_limiter.h.


The documentation for this class was generated from the following files:


diff_drive_controller
Author(s): Bence Magyar
autogenerated on Sat Apr 18 2020 03:58:05