cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
robLSPB Class Reference

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
 

Detailed Description

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.

Member Enumeration Documentation

Enumerator
LSPB_NONE 
LSPB_DURATION 

Constructor & Destructor Documentation

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 
)
robLSPB::~robLSPB ( )
inline

Member Function Documentation

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.

Parameters
startStart position
finishFinish position
velocityDesired maximum velocity Acceleration (and deceleration) used to reach maximum velocity
double& robLSPB::StartTime ( void  )

Return start time.

Member Data Documentation

vctDoubleVec robLSPB::mAcceleration
protected
vctDoubleVec robLSPB::mAccelerationTime
protected
CoordinationType robLSPB::mCoordination
protected
size_t robLSPB::mDimension
protected

Number of degrees of freedom

double robLSPB::mDuration
protected

Max of all finish times

vctDoubleVec robLSPB::mFinish
protected
vctDoubleVec robLSPB::mFinishTime
protected
bool robLSPB::mIsSet
protected

To ensure we don't evaluate if the parameters are not set

vctDoubleVec robLSPB::mStart
protected
double robLSPB::mStartTime
protected

Start time, used to evaluate relative to 0

vctDoubleVec robLSPB::mTemp
protected
vctDoubleVec robLSPB::mTimeScale
protected
vctDoubleVec robLSPB::mVelocity
protected

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