Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OSCAR::FifthOrderPoly Class Reference
[MotionPlanning]

This class allows the user to create a fifth order polynomial trajectory by specifying initial and final conditions for positions,velocities and accelerations. More...

#include <FifthOrderPoly.h>

Inheritance diagram for OSCAR::FifthOrderPoly:

Inheritance graph
[legend]
List of all members.

Public Methods

 FifthOrderPoly (const Vector &initialPos, const Vector &finalPos, const Vector &initialVel, const Vector &finalVel, const Vector &initialAcc, const Vector &finalAcc, const double SampleTime, OSCARError &err=DUMMY_ERROR(noError))
 FifthOrderPoly (const FifthOrderPoly &rhs)
FifthOrderPoly & operator= (const FifthOrderPoly &rhs)
bool SetPositionConditions (const Vector &initialPos, const Vector &finalPos)
bool SetVelocityConditions (const Vector &initialVel, const Vector &finalVel)
bool SetAccelerationConditions (const Vector &initialAcc, const Vector &finalAcc)
bool GenerateTrajectory (double deltaTime)
bool GetTrajectory (std::vector< Vector > &Trajectory) const
bool GetVelocityTrajectory (std::vector< Vector > &vTrajectory) const
bool GetAccelerationTrajectory (std::vector< Vector > &aTrajectory) const
virtual ~FifthOrderPoly ()

Protected Methods

void initialize ()

Protected Attributes

unsigned int dof
Vector initialPosition
Vector finalPosition
Vector initialVelocity
Vector finalVelocity
Vector initialAcceleration
Vector finalAcceleration
Vector a0
Vector a1
Vector a2
Vector a3
Vector a4
Vector a5
double sampleTime
std::vector< Vectortrajectory
std::vector< VectorvelTrajectory
std::vector< VectoraccelTrajectory

Detailed Description

Author:
Peter S. March and Jeremy Sevier


Constructor & Destructor Documentation

OSCAR::FifthOrderPoly::FifthOrderPoly const Vector   initialPos,
const Vector   finalPos,
const Vector   initialVel,
const Vector   finalVel,
const Vector   initialAcc,
const Vector   finalAcc,
const double    SampleTime,
OSCARError   err = DUMMY_ERROR(noError)
 

Constructor.

This constructor creates an FifthOrderPoly object.

Parameters:
initialPos An Vector of initial positions
finalPos An Vector of final positions
initialVel An Vector of initial velocities
finalVel An Vector of final velocities
initialAcc An Vector of initial accelerations
finalAcc An Vector of final accelerations
SampleTime This is the delta_time between the setpoints that will be generated in the trajectory.
err An OSCARError object that on return will hold the value of any errors that were generated during the constructor call. If err is not equal to 'noError' you can call GetError() to get the details of the error code.

OSCAR::FifthOrderPoly::FifthOrderPoly const FifthOrderPoly &    rhs
 

Copy Constructor.

This is the Copy constructor for an object of type FifthOrderPoly. Use this to construct an FifthOrderPoly object from an existing FifthOrderPoly object.

Parameters:
rhs An RRCubicPoly object that will be used to initialize this new object.

virtual OSCAR::FifthOrderPoly::~FifthOrderPoly   [inline, virtual]
 


Member Function Documentation

bool OSCAR::FifthOrderPoly::GenerateTrajectory double    deltaTime
 

Use this method to generate a trajectory from supplied initial/final conditions;.

Parameters:
deltaTime The total time the trajectory should take.
Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information

bool OSCAR::FifthOrderPoly::GetAccelerationTrajectory std::vector< Vector > &    aTrajectory const
 

Use this method to retrieve the generated acceleration trajectory.

Parameters:
Trajectory An STL vector<HandPose> that the trajectory will be stored in.
Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information

bool OSCAR::FifthOrderPoly::GetTrajectory std::vector< Vector > &    Trajectory const
 

Use this method to retrieve the generated position trajectory.

Parameters:
Trajectory An STL vector<HandPose> that the trajectory will be stored in.
Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information

bool OSCAR::FifthOrderPoly::GetVelocityTrajectory std::vector< Vector > &    vTrajectory const
 

Use this method to retrieve the generated velocity trajectory.

Parameters:
Trajectory An STL vector<HandPose> that the trajectory will be stored in.
Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information

void OSCAR::FifthOrderPoly::initialize   [protected]
 

FifthOrderPoly& OSCAR::FifthOrderPoly::operator= const FifthOrderPoly &    rhs
 

Assignment operator.

This is the Assignment operator for an object of type FifthOrderPoly.

Parameters:
rhs An FifthOrderPoly object that goes on the right hand side of the = operator.
Returns:
A reference to the object on the left hand side of the = operator.

bool OSCAR::FifthOrderPoly::SetAccelerationConditions const Vector   initialAcc,
const Vector   finalAcc
 

Use this method to reset the finaln conditions for the polynomial trajectory.

Parameters:
initialAcc An Vector containing the initial accelerations
finalAcc An Vector containing the final accelerations
Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
See also:
bool SetInitialConditions(Vector& initialPos, Vector& initialVel)

bool OSCAR::FifthOrderPoly::SetPositionConditions const Vector   initialPos,
const Vector   finalPos
 

Use this method to reset the initial conditions for the polynomial trajectory.

Parameters:
initialPos An Vector containing the initial positions
finalPos An Vector containing the final positions
Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
See also:
bool SetFinalConditions(Vector& finalPos, Vector& finalVel)

bool OSCAR::FifthOrderPoly::SetVelocityConditions const Vector   initialVel,
const Vector   finalVel
 

Use this method to reset the final conditions for the polynomial trajectory.

Parameters:
initialVel An Vector containing the initial velocities
finalVel An Vector containing the final velocities
Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
See also:
bool SetInitialConditions(Vector& initialPos, Vector& initialVel)


Member Data Documentation

Vector OSCAR::FifthOrderPoly::a0 [protected]
 

Vector OSCAR::FifthOrderPoly::a1 [protected]
 

Vector OSCAR::FifthOrderPoly::a2 [protected]
 

Vector OSCAR::FifthOrderPoly::a3 [protected]
 

Vector OSCAR::FifthOrderPoly::a4 [protected]
 

Vector OSCAR::FifthOrderPoly::a5 [protected]
 

std::vector<Vector> OSCAR::FifthOrderPoly::accelTrajectory [protected]
 

unsigned int OSCAR::FifthOrderPoly::dof [protected]
 

Vector OSCAR::FifthOrderPoly::finalAcceleration [protected]
 

Vector OSCAR::FifthOrderPoly::finalPosition [protected]
 

Vector OSCAR::FifthOrderPoly::finalVelocity [protected]
 

Vector OSCAR::FifthOrderPoly::initialAcceleration [protected]
 

Vector OSCAR::FifthOrderPoly::initialPosition [protected]
 

Vector OSCAR::FifthOrderPoly::initialVelocity [protected]
 

double OSCAR::FifthOrderPoly::sampleTime [protected]
 

std::vector<Vector> OSCAR::FifthOrderPoly::trajectory [protected]
 

std::vector<Vector> OSCAR::FifthOrderPoly::velTrajectory [protected]
 


The documentation for this class was generated from the following file:
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations