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

OSCAR::JointVector Class Reference
[Math]

Used to pass joint position values. More...

#include <JointVector.h>

Inheritance diagram for OSCAR::JointVector:

Inheritance graph
[legend]
List of all members.

Public Methods

 JointVector (unsigned int size, const double *array=0)
 JointVector (unsigned int size, const CoordinateStatusArray &statArray, OSCARError &err=DUMMY_ERROR(noError))
 JointVector (const JointVector &rhs)
virtual ~JointVector ()
JointVector & operator= (const JointVector &rhs)
JointVector & operator= (const Vector &rhs)
JointVector & operator= (const double rhs)
bool Add (JointVector &j, JointVector &result)

Detailed Description

Author:
Chetan Kapoor.
JointVector is derived CoordinateVector. This class is used to represent the joints of a robot, set the status of each joint to be active or inactive, and (some day. maybe. maybe not. we don't know.) also specify the limits on each joint


Constructor & Destructor Documentation

OSCAR::JointVector::JointVector unsigned int    size,
const double *    array = 0
[explicit]
 

Constructor.

This is the constructor for an object of type JointVector. Use this to construct an JointVector object of length 'size', and a pointer to an array of type double. By default, the array pointer is null, and the status of all joints is set to Active.

Parameters:
size The size of the JointVector. This should be > 0.
array A pointer to an array (of type double) whose size should be equal to the value of the first argument 'size'. Values from this array will be used to initialize the JointVector values. This function will abort if the size of the array is not equal to 'size', or if size = 0.

OSCAR::JointVector::JointVector unsigned int    size,
const CoordinateStatusArray   statArray,
OSCARError   err = DUMMY_ERROR(noError)
 

Constructor.

This is the constructor for an object of type JointVector. Use this to construct an JointVector object of length 'size', and intialize the status of each joint (whether Active or Inactive) according to the contents of the statArray. An OSCARError object can also be passed in. An error occurs when the argument size is not equal to the size of statArray. This function will crash if size = 0.

Parameters:
size The size of the JointVector. This should be > 0.
statArray The RRCoordinateStatus Array whose size should be equal to that specified in the first argument 'size'. Values from statArray will be used to set the intial status (Active or Inactive) of each joint.
err Upon return, this will contain the error status of the constructor call.
Exceptions:
arraySizeMismatch arraySizeMismatch Call GetError() to get more information.

OSCAR::JointVector::JointVector const JointVector &    rhs
 

Copy Constructor.

This is the Copy Constructor for an object of type JointVector. Use this to create an JointVector object from an existing JointVector object.

Parameters:
rhs A JointVector object that is used to create the new object.

virtual OSCAR::JointVector::~JointVector   [virtual]
 

Destructor.

This is the destructor for an object of type JointVector.


Member Function Documentation

bool OSCAR::JointVector::Add JointVector &    j,
JointVector &    result
 

Add JointVectors.

Method adds the elements of compatible JointVectors. JointVectors are compatible if and only if they are the same size AND have the same active joints. (Note: since the '+' operator is not overridden for a JointVector and therefore returns a vectorNumeric object and any coordinateStatus information from the added JointVectors is lost in the result.

Parameters:
j the JointVector to be added the this JointVector.
resulting JointVector where elements have been added and active joints match both added JointVectors
Returns:
true if the vectors successfully added, otherwise false.
Exceptions:
vectorSizeMismatch vectorSizeMismatch Vectors not the same length. Call GetError() for more information.
invalidValue invalidValue Active Joint Array did not match. Call GetError() for more information

JointVector& OSCAR::JointVector::operator= const double    rhs [inline]
 

Assignment Operator.

Sets all elements of JointVector to the argument.

Parameters:
rhs A double
Returns:
A reference to the object on the left hand side of the = operator.

Reimplemented from OSCAR::CoordinateVector.

JointVector& OSCAR::JointVector::operator= const Vector   rhs [inline]
 

Assignment Operator.

Copies one elements from Vector into JointVector.

Parameters:
rhs A JointVector 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.

Reimplemented from OSCAR::CoordinateVector.

JointVector& OSCAR::JointVector::operator= const JointVector &    rhs
 

Assignment Operator.

This is the assignment operator for an object of type JointVector. Use this to copy one JointVector object into another. If the size of the objects does not match, then the object being copied into the LHS is modified to match the RHS.

Parameters:
rhs A JointVector 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.


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