cisst-saw
Loading...
Searching...
No Matches
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.
void Evaluate (const double time, vctDoubleVec &position, vctDoubleVec &velocity, vctDoubleVec &acceleration)
void Evaluate (const double time, vctDoubleVec &position)
double & StartTime (void)
 Return start time.
double Duration (void) const
 Return duration.

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

◆ CoordinationType

Enumerator
LSPB_NONE 
LSPB_DURATION 

Constructor & Destructor Documentation

◆ robLSPB() [1/2]

robLSPB::robLSPB ( void )

◆ robLSPB() [2/2]

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

Member Function Documentation

◆ Duration()

double robLSPB::Duration ( void ) const

Return duration.

◆ Evaluate() [1/2]

void robLSPB::Evaluate ( const double time,
vctDoubleVec & position )

◆ Evaluate() [2/2]

void robLSPB::Evaluate ( const double time,
vctDoubleVec & position,
vctDoubleVec & velocity,
vctDoubleVec & acceleration )

◆ Set()

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 \accelerations Acceleration (and deceleration) used to reach maximum velocity

◆ StartTime()

double & robLSPB::StartTime ( void )

Return start time.

Member Data Documentation

◆ mAcceleration

vctDoubleVec robLSPB::mAcceleration
protected

◆ mAccelerationTime

vctDoubleVec robLSPB::mAccelerationTime
protected

◆ mCoordination

CoordinationType robLSPB::mCoordination
protected

◆ mDimension

size_t robLSPB::mDimension
protected

Number of degrees of freedom

◆ mDuration

double robLSPB::mDuration
protected

Max of all finish times

◆ mFinish

vctDoubleVec robLSPB::mFinish
protected

◆ mFinishTime

vctDoubleVec robLSPB::mFinishTime
protected

◆ mIsSet

bool robLSPB::mIsSet
protected

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

◆ mStart

vctDoubleVec robLSPB::mStart
protected

◆ mStartTime

double robLSPB::mStartTime
protected

Start time, used to evaluate relative to 0

◆ mTemp

vctDoubleVec robLSPB::mTemp
protected

◆ mTimeScale

vctDoubleVec robLSPB::mTimeScale
protected

◆ mVelocity

vctDoubleVec robLSPB::mVelocity
protected

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