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

OSCAR::Limits Class Reference
[FileData]

A Limits object is used to store binary limits data for robot joints. These include min and max. These limits are generally used for Position, Velocity, Current, Acceleration and Torque. In additon to limits, the Limits object can also contain the excess error associated with a joint. These excess errors can be specified for all different limits type. Generally, they are specified for position and current. More...

#include <Limits.h>

Inheritance diagram for OSCAR::Limits:

Inheritance graph
[legend]
List of all members.

Public Methods

 Limits (const Matrix &limitsData, OSCARError &err=DUMMY_ERROR(noError), const String &name=String(""))
 Limits (const Vector &minLimits, const Vector &maxLimits, OSCARError &err=DUMMY_ERROR(noError), const String &name=String(""))
 Limits (const std::vector< Limit > &limitsData, OSCARError &err=DUMMY_ERROR(noError), const String &name=String(""))
 Limits (const Limits &rhs)
virtual ~Limits ()
Limits & operator= (const Limits &rhs)
bool SetLimits (const Matrix &limitsData)
bool SetExcessError (const Vector &excessErrorData)
bool GetLimits (Matrix &limitsData) const
bool GetExcessError (Vector &excessErrorData) const
bool SetLimits (const Vector &minLimits, const Vector &maxLimits)
bool GetLimits (Vector &minLimits, Vector &maxLimits) const
bool SetLimits (const std::vector< Limit > &limitsData)
bool GetLimits (std::vector< Limit > &limitsData) const
bool GetLimit (unsigned int jointNo, Limit &limitsData) const
Limit GetLimit (unsigned int jointNo) const
unsigned int GetSize () const

Protected Attributes

std::vector< Limit > * limits

Detailed Description

Author:
Chetan Kapoor


Constructor & Destructor Documentation

OSCAR::Limits::Limits const Matrix   limitsData,
OSCARError   err = DUMMY_ERROR(noError),
const String   name = String("")
 

Creates an Limits object and initializes the limits using data specified in a Matrix of size DOF.

Parameters:
limitsData A Matrix of size DOF X 2. Column 1 should contain the min limit and column 2 should contain max limit
err A reference to an object of type OSCARError. The default OSCARError object holds values that imply a "No Error" state. This is an error code that is returned.
name An String that specifies the Name of the object being created. matrixSizeMismatch

OSCAR::Limits::Limits const Vector   minLimits,
const Vector   maxLimits,
OSCARError   err = DUMMY_ERROR(noError),
const String   name = String("")
 

Creates an Limits object and initializes the limits using data specified in a Matrix of size DOF.

Parameters:
minLimits A Vector of size DOF containing the min limits.
maxLimits A Vector of size DOF containing the max limits.
err A reference to an object of type OSCARError. The default OSCARError object holds values that imply a "No Error" state. This is an error code that is returned.
name An String that specifies the Name of the object being created. vectorSizeMismatch

OSCAR::Limits::Limits const std::vector< Limit > &    limitsData,
OSCARError   err = DUMMY_ERROR(noError),
const String   name = String("")
 

Creates an Limits object and initializes the limits using data specified in a Matrix of size DOF.

Parameters:
limitsData An stl vector of size DOF, whose each element contains an object of type Limit. Limit object contains public members min, max, and isLimitSet, excessError and isExcessErrorSet.
err A reference to an object of type OSCARError. The default OSCARError object holds values that imply a "No Error" state. This is an error code that is returned.
name An String that specifies the Name of the object being created.

OSCAR::Limits::Limits const Limits &    rhs
 

Copy Constructor.

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

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

virtual OSCAR::Limits::~Limits   [virtual]
 

Destructor.


Member Function Documentation

bool OSCAR::Limits::GetExcessError Vector   excessErrorData const
 

Query the excess error for each joint of the robot.

Parameters:
excessErrorData A Vector of size DOF, which on return contains the excess errors If excess error for a particuls joint are not specified, then the element for that joint (joints starting at 0) are set to 0.0
Returns:
true or false. If false, call GetError() vectorSizeMismatch

Limit OSCAR::Limits::GetLimit unsigned int    jointNo const
 

Query the limit for a particular joint.

Parameters:
jointNo Number of the joint for which the limit information is desired. jointNo's start from 0. If this index is outOfRange, an empty Limit object is returned with isLimitSet and isExcessErrorSet = false and outOfRange error set
Returns:
A Limit object that contains the limits for the desired joint. If true or false. If false, call GetError() outOfRange

bool OSCAR::Limits::GetLimit unsigned int    jointNo,
Limit   limitsData
const
 

Query the limit for a particular joint.

Parameters:
jointNo Number of the joint for which the limit information is desired. jointNo's start from 0. If this index is outOfRange, an empty Limit object is returned with isLimitSet and isExcessErrorSet = false and outOfRange error set
limit A limit object that on return contains limit data for a specified joint number
Returns:
true or false. If false, call GetError() outOfRange

bool OSCAR::Limits::GetLimits std::vector< Limit > &    limitsData const
 

Query limits by passing in and stl vector of Limit objects.

Parameters:
limitsData An stl vector of size DOF, whose each element contains an object of type Limit. Limit object contains public members min, max, isLimitSet, excessError and isExcessErrorSet.
Returns:
true or false. If false, call GetError()

bool OSCAR::Limits::GetLimits Vector   minLimits,
Vector   maxLimits
const
 

Query the limits in Vector format.

Parameters:
minLimits A Vector of size DOF containing the min limits.
maxLimits A Vector of size DOF containing the max limits.
Returns:
true or false. If false, call GetError() vectorSizeMismatch

bool OSCAR::Limits::GetLimits Matrix   limitsData const
 

Query the limits in a Matrix format.

Parameters:
limitsData A Matrix of size DOF X 2, where column 1 is min limits and column 2 is max limits. If limits for a particuls joint are not specified, then the row for that joint (joints starting at 0) are set to 0.0 and 0.0
Returns:
true or false. If false, call GetError() matrixSizeMismatch

unsigned int OSCAR::Limits::GetSize   const
 

Query the size of the limits, i.e., total number of joints for which the limits are specified.

Returns:
Length of the limits outOfRange

Limits& OSCAR::Limits::operator= const Limits &    rhs
 

Assignment Operator.

This is the Assignment Operator for an object of type Limits.

Parameters:
rhs A Limits 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::Limits::SetExcessError const Vector   excessErrorData
 

Set excess error by passing in a Vector of length DOF. Call to this method will overwrite the stored excess error values.

Parameters:
excessErrorData A Vector of size DOF, where element 0 contains excess error value for joint 1, element 1 for joint 2, and so on.
Returns:
true or false. If false, call GetError() vectorSizeMismatch

bool OSCAR::Limits::SetLimits const std::vector< Limit > &    limitsData
 

SetLimits by passing in and stl vector of Limit objects. Call to this method will overwrite the stored limits.

Parameters:
limitsData An stl vector of size DOF, whose each element contains an object of type Limit. Limit object contains public members min, max, isLimitSet, excessError and isExcessErrorSet.
Returns:
true or false. If false, call GetError()

bool OSCAR::Limits::SetLimits const Vector   minLimits,
const Vector   maxLimits
 

SetLimits by passing in two Vectors. Call to this method will overwrite the stored limits.

Parameters:
minLimits A Vector of size DOF containing the min limits.
maxLimits A Vector of size DOF containing the max limits.
Returns:
true or false. If false, call GetError() vectorSizeMismatch

bool OSCAR::Limits::SetLimits const Matrix   limitsData
 

SetLimits by passing in a Matrix. Call to this method will overwrite the stored limits.

Parameters:
limitsData A Matrix of size DOF X 2, where column 1 is min limits and column 2 is max limits.
Returns:
true or false. If false, call GetError() matrixSizeMismatch


Member Data Documentation

std::vector<Limit>* OSCAR::Limits::limits [protected]
 


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