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

OSCAR::MotionParameters Class Reference
[MotionPlanning]

This class is used to store the parameters used for generating trajectories. These parameters include: total time for trajectory, sampling time, a vector of start positions, a vector of stop positions, and a filename/matrix of motion constraints. This class is passed to the OfflineMotionPlanner before calculating a trajectory. More...

#include <MotionParameter.h>

Inheritance diagram for OSCAR::MotionParameters:

Inheritance graph
[legend]
List of all members.

Public Methods

 MotionParameters (unsigned int DOF, unsigned int order=1, OSCARError &err=DUMMY_ERROR(noError))
 MotionParameters (const MotionParameters &rrmp)
MotionParameters & operator= (const MotionParameters &rrmp)
bool SetParameters (double totalTime, double deltaTime, const VectorD &StartPos, const VectorD &EndPos, const Matrix &MaxConstraints)
bool SetTimeParameters (double totalTime, double deltaTime)
bool SetStartParameters (const VectorD &StartPos)
bool SetStopParameters (const VectorD &EndPos)
bool SetMaxConstraints (const Matrix &MaxConstraints)
bool SetMaxConstraints (const String &ConstraintsFileName)
bool GetParameters (double &totalTime, double &deltaTime, VectorD &StartPos, VectorD &EndPos, Matrix &MaxConstraints) const
bool GetTimeParameters (double &totalTime, double &deltaTime) const
bool GetStartParameters (VectorD &StartPos) const
bool GetStopParameters (VectorD &EndPos) const
bool GetMaxConstraints (Matrix &MaxConstraints) const
unsigned int GetDOF ()
unsigned int GetOrder ()
virtual ~MotionParameters ()

Private Attributes

unsigned int nDOF
unsigned int nOrder
double totalTime
double deltaTime
Vector startingPosition
Vector endingPosition
Matrix maxConstraints

Detailed Description

Author:
Ratheesh Rajan & Chetan Kapoor


Constructor & Destructor Documentation

OSCAR::MotionParameters::MotionParameters unsigned int    DOF,
unsigned int    order = 1,
OSCARError   err = DUMMY_ERROR(noError)
 

Constructor.

This constructor creates a MotionParameter object to store the parameters used in generating a trajectory.

Parameters:
DOF This stores the number of variables to generate a trajectory for. For a joint level trajectory, this number will be equal to the number of joints. For a HandPose trajectory, this should be 6.
order This is the order of the desired trapezoidal motion trajectory. For example, an order of 2 will produce a trapezoidal shape at the acceleration level.
err An OSCARError object that on return will hold the value of any errors that were generated uring the constructor call. If err is not equal to 'noError' you can call GetError() to get the details of the error code.

OSCAR::MotionParameters::MotionParameters const MotionParameters &    rrmp
 

Constructor.

A copy constructor for MotionParameters.

Parameters:
rrmp An existing MotionParameters object that will be used to initialize this new object.

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


Member Function Documentation

unsigned int OSCAR::MotionParameters::GetDOF void    [inline]
 

Use this method to retrieve the DOF of the motion system.

Returns:
An unsigned integer containing the DOF
See also:
bool GetParameters( double& totalTime, double& deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

bool OSCAR::MotionParameters::GetMaxConstraints Matrix   MaxConstraints const
 

Use this method to retrieve the current constraints matrix.

Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
Parameters:
MaxConstraints A DOFx(order+1) matrix of constraints for the trajectory.
Exceptions:
matrixSizeMismatch matrixSizeMismatch
See also:
bool GetParameters( double& totalTime, double& deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

unsigned int OSCAR::MotionParameters::GetOrder   [inline]
 

Use this method to retrieve the order of the motion system.

Returns:
An unsignd integer containing the order of the motion system
See also:
bool GetParameters( double& totalTime, double& deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

bool OSCAR::MotionParameters::GetParameters double &    totalTime,
double &    deltaTime,
VectorD   StartPos,
VectorD   EndPos,
Matrix   MaxConstraints
const
 

Use this method to retrieve the current motion parameters.

Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
Parameters:
totalTime This it the total time for completing the trajectory.
deltaTime This is the time in between setpoints (sampling time).
StartPos A DOF-length vector containing the starting position.
EndPos A DOF-length vector containing the final position.
MaxConstraints A DOFx(order+1) matrix of constraints for the trajectory.
Exceptions:
matrixSizeMismatch matrixSizeMismatch
vectorSizeMismatch vectorSizeMismatch
See also:
bool SetParameters( double totalTime, double deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

bool OSCAR::MotionParameters::GetStartParameters VectorD   StartPos const
 

Use this method to retrieve the current starting position.

Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
Parameters:
StartPos A DOF-length vector containing the starting position.
Exceptions:
vectorSizeMismatch vectorSizeMismatch
See also:
bool GetParameters( double& totalTime, double& deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

bool OSCAR::MotionParameters::GetStopParameters VectorD   EndPos const
 

Use this method to retrieve the current final position.

Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
Parameters:
EndPos A DOF-length vector containing the final position.
Exceptions:
vectorSizeMismatch vectorSizeMismatch
See also:
bool GetParameters( double& totalTime, double& deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

bool OSCAR::MotionParameters::GetTimeParameters double &    totalTime,
double &    deltaTime
const
 

Use this method to retrieve the current time parameters.

Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
Parameters:
totalTime This it the total time for completing the trajectory.
deltaTime This is the time in between setpoints (sampling time).
See also:
bool GetParameters( double& totalTime, double& deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

MotionParameters& OSCAR::MotionParameters::operator= const MotionParameters &    rrmp
 

= operator. Used for copying objects of type MotionParameters

Returns:
A reference to the object on the left hand side of the = operator
Parameters:
rrmp An MotionParameters object that goes on the right hand side of the = operator

bool OSCAR::MotionParameters::SetMaxConstraints const String   ConstraintsFileName
 

Use this method to set all the constraints matrix for the motion trajectory.

Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
Parameters:
ConstraintsFileName The name of a file containing a DOFx(order+1) matrix of constraints for the trajectory. The first column holds the maximum joint velocities and the second column holds the maximum joint accelerations. Currently, only 1st order (2-column matrix) constraints are implemented in RRMotionPlanner.
Exceptions:
constraintsError constraintsError
See also:
bool SetParameters( double totalTime, double deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

bool OSCAR::MotionParameters::SetMaxConstraints const Matrix   MaxConstraints
 

Use this method to set all the constraints matrix for the motion trajectory.

Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
Parameters:
MaxConstraints A DOFx(order+1) matrix of constraints for the trajectory. The first column holds the maximum joint velocities and the second column holds the maximum joint accelerations, etc...
Exceptions:
matrixSizeMismatch matrixSizeMismatch
See also:
bool SetParameters( double totalTime, double deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

bool OSCAR::MotionParameters::SetParameters double    totalTime,
double    deltaTime,
const VectorD   StartPos,
const VectorD   EndPos,
const Matrix   MaxConstraints
 

Use this method to set all the motion parameters to use when generating a trajectory.

Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
Parameters:
totalTime This it the total time for completing the trajectory.
deltaTime This is the time in between setpoints (sampling time).
StartPos A DOF-length vector containing the starting position.
EndPos A DOF-length vector containing the final position.
MaxConstraints A DOFx(order+1) matrix of constraints for the trajectory. The first column holds the maximum joint velocities and the second column holds the maximum joint accelerations. Currently, only 1st order (2-column matrix) constraints are implemented.
Exceptions:
matrixSizeMismatch matrixSizeMismatch
vectorSizeMismatch vectorSizeMismatch
See also:
bool GetParameters( double& totalTime, double& totalTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

bool OSCAR::MotionParameters::SetStartParameters const VectorD   StartPos
 

Use this method to set the starting position for the motion trajectory.

Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
Parameters:
StartPos A DOF-length vector containing the starting position.
Exceptions:
vectorSizeMismatch vectorSizeMismatch
See also:
bool SetParameters( double totalTime, double deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

bool OSCAR::MotionParameters::SetStopParameters const VectorD   EndPos
 

Use this method to set all the final position for the motion trajectory.

Returns:
true if the method succeeds and false if method fails. Call GetError() to get detailed error information
Parameters:
EndPos A DOF-length vector containing the final position.
Exceptions:
vectorSizeMismatch vectorSizeMismatch
See also:
bool SetParameters( double totalTime, double deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);

bool OSCAR::MotionParameters::SetTimeParameters double    totalTime,
double    deltaTime
 

Use this method to set all the timen parameters to use when generating a trajectory.

Returns:
true if the method succeeds and false if method fails.
Parameters:
totalTime This it the total time for completing the trajectory.
deltaTime This is the time in between setpoints (sampling time).
See also:
bool SetParameters( double totalTime, double deltaTime, VectorD& StartPos, VectorD& EndPos, Matrix& MaxConstraints);


Member Data Documentation

double OSCAR::MotionParameters::deltaTime [private]
 

Vector OSCAR::MotionParameters::endingPosition [private]
 

< Length DOF

Matrix OSCAR::MotionParameters::maxConstraints [private]
 

< Length DOF

unsigned int OSCAR::MotionParameters::nDOF [private]
 

unsigned int OSCAR::MotionParameters::nOrder [private]
 

Vector OSCAR::MotionParameters::startingPosition [private]
 

double OSCAR::MotionParameters::totalTime [private]
 


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