cisst-saw
|
Linear Segments with Parabolic Blends trajectory generator. More...
#include <robLSPB.h>
Public Types | |
enum | CoordinationType { LSPB_NONE, LSPB_DURATION } |
Public Member Functions | |
robLSPB (void) | |
robLSPB (const vctDoubleVec &start, const vctDoubleVec &finish, const vctDoubleVec &velocity, const vctDoubleVec &acceleration, const double startTime=0.0, const CoordinationType coordination=LSPB_NONE) | |
~robLSPB () | |
void | Set (const vctDoubleVec &start, const vctDoubleVec &finish, const vctDoubleVec &velocity, const vctDoubleVec &acceleration, const double startTime=0.0, const CoordinationType coordination=LSPB_NONE) |
Set start and finish position as well as desired maximum velocities and accelerations. Start time is provided as a convenience so that future calls to Evaluate can use absolute time. All vectors must match the start position size. More... | |
void | Evaluate (const double time, vctDoubleVec &position, vctDoubleVec &velocity, vctDoubleVec &acceleration) |
void | Evaluate (const double time, vctDoubleVec &position) |
double & | StartTime (void) |
Return start time. More... | |
double | Duration (void) const |
Return duration. More... | |
Protected Attributes | |
bool | mIsSet |
size_t | mDimension |
double | mStartTime |
double | mDuration |
CoordinationType | mCoordination |
vctDoubleVec | mStart |
vctDoubleVec | mFinish |
vctDoubleVec | mVelocity |
vctDoubleVec | mAcceleration |
vctDoubleVec | mAccelerationTime |
vctDoubleVec | mFinishTime |
vctDoubleVec | mTimeScale |
vctDoubleVec | mTemp |
Linear Segments with Parabolic Blends trajectory generator.
This trajectory generator is based on LSPB as described in "Robotics: Basic Analysis and Design" by William A. Wolovich. The trajectory generated corresponds to maximum acceleration until maximum velocity is reached followed by maximum deceleration until final position is reached. Desired velocities and accelerations are defined as strictly positive numbers.
It can operate on multiple joints and the user must choose how to coordinate the motion. Current options to coordinate the joint trajectories are LSPB_NONE and LSPB_DURATION. With LSPB_NONE, each joint moves as fast as possible. With LSPB_DURATION, the trajectories are scaled so they start and end at the same time based on the slowest joint. It's important to note that acceleration, constant velocities and decelaration phases are not coordinated.
If the user attempt to evaluate a point before the start time, the generator returns the start point. For any time after the end time, the generator returns the end point.
robLSPB::robLSPB | ( | void | ) |
robLSPB::robLSPB | ( | const vctDoubleVec & | start, |
const vctDoubleVec & | finish, | ||
const vctDoubleVec & | velocity, | ||
const vctDoubleVec & | acceleration, | ||
const double | startTime = 0.0 , |
||
const CoordinationType | coordination = LSPB_NONE |
||
) |
|
inline |
double robLSPB::Duration | ( | void | ) | const |
Return duration.
void robLSPB::Evaluate | ( | const double | time, |
vctDoubleVec & | position, | ||
vctDoubleVec & | velocity, | ||
vctDoubleVec & | acceleration | ||
) |
void robLSPB::Evaluate | ( | const double | time, |
vctDoubleVec & | position | ||
) |
void robLSPB::Set | ( | const vctDoubleVec & | start, |
const vctDoubleVec & | finish, | ||
const vctDoubleVec & | velocity, | ||
const vctDoubleVec & | acceleration, | ||
const double | startTime = 0.0 , |
||
const CoordinationType | coordination = LSPB_NONE |
||
) |
Set start and finish position as well as desired maximum velocities and accelerations. Start time is provided as a convenience so that future calls to Evaluate can use absolute time. All vectors must match the start position size.
start | Start position |
finish | Finish position |
velocity | Desired maximum velocity Acceleration (and deceleration) used to reach maximum velocity |
double& robLSPB::StartTime | ( | void | ) |
Return start time.
|
protected |
|
protected |
|
protected |
|
protected |
Number of degrees of freedom
|
protected |
Max of all finish times
|
protected |
|
protected |
|
protected |
To ensure we don't evaluate if the parameters are not set
|
protected |
|
protected |
Start time, used to evaluate relative to 0
|
protected |
|
protected |
|
protected |