Actin  Version 5.5.5 Software for Robotics Simulation and Control
EcIndividualManipulator Class Reference

An individual manipulator is described through this class. It includes a string label, a physical extent of the base, a list of top-most links, and a dynamic reference frame. More...

#include <ecIndManipulator.h>

Inheritance diagram for EcIndividualManipulator:
[legend]
Collaboration diagram for EcIndividualManipulator:
[legend]

## Public Member Functions

EcIndividualManipulator ()
default constructor

virtual ~EcIndividualManipulator ()
destructor

EcIndividualManipulator (const EcIndividualManipulator &orig, EcFoundCommon::DeepCopyFlag copyFlag=EcFoundCommon::CopyNone)

EcIndividualManipulatoroperator= (const EcIndividualManipulator &orig)
assignment operator

assignment operator, except the child links

EcBoolean operator== (const EcIndividualManipulator &orig) const
equality operator

EcBoolean equalForReferencing (const EcIndividualManipulator &orig) const

virtual EcBoolean xmlInit () EC_OVERRIDE
initialize XML components for reading and writing

virtual EcXmlObjectclone () const EC_OVERRIDE
clone - a virtual constructor to an EcXmlObject pointer

virtual void registerComponents () EC_OVERRIDE
register components with the parent

virtual const EcStringmanipulatorLabel () const
gets the identifying label

virtual void setManipulatorLabel (const EcString &manipulatorLabel)
sets an identifying label

virtual void setLinkLabel (const EcString &label) EC_OVERRIDE
sets an identifying label More...

sets the child links - overridden to remap the manipulator

add a child link by copy - overridden to remap the manipulator

virtual EcBoolean combineManipulator (const EcString &thisLinkLabel, const EcIndividualManipulator &other, const EcCoordinateSystemTransformation &offSet)
Rigidly combine a manipulator to this manipulator by copy. More...

virtual EcBoolean uncombineManipulator (const EcString &depManipLabel, EcString &baseLinkLabel, EcIndividualManipulator &depManip, EcCoordinateSystemTransformation &offset)
uncombine a dependent manipulator

set everything from a link object

Adds a link by copy to the end of the first chain rooted. More...

virtual const EcCoordinateSystemTransformationcoordSysXForm () const
gets coordinate system transformation

virtual void setCoordSysXForm (const EcCoordinateSystemTransformation &coordSysXForm)
sets coordinate system transformation

virtual const EcSphereabsoluteBoundingSphere () const
gets the absolute bounding sphere

virtual void setAbsoluteBoundingSphere (const EcSphere &absoluteBoundingSphere)
sets the absolute bounding sphere

sets the absolute bounding sphere

virtual void fitAbsoluteBoundingSphere ()
fits the bounding sphere appropriately based on the manipulator

virtual EcBoolean isFixedBase () const
gets the fixed-base flag

virtual void setIsFixedBase (EcBoolean isFixedBase)
sets the fixed-base flag

virtual EcBoolean canBeStatic () const
gets the static flag

virtual void setCanBeStatic (EcBoolean value)
sets the static flag

gets the flag indicating to optimize on load

sets the absolute bounding sphere

virtual const EcManipulatorReferenceDescriptionmanipulatorReferenceDescription () const
gets the manipulator reference description

virtual void setManipulatorReferenceDescription (const EcManipulatorReferenceDescription &manipulatorReferenceDescription)
sets the manipulator reference description

virtual EcU32 linkIndex () const EC_OVERRIDE
gets the index for this link

virtual EcU32 manipulatorIndex () const
gets the manipulator index for this manipulator

void setManipulatorIndex (EcU32 manipIndex)
set the manipulator index

virtual EcU32 jointDof () const

virtual EcU32 jointAndBaseDof () const

virtual EcU32 totalDof () const

the fast test for collisions

virtual EcCoordinateSystemTransformation dhFrameInSystem (const EcPositionState &posState) const EC_OVERRIDE

virtual const EcCoordinateSystemTransformationdhFrameInSystem (EcManipulatorActivePositionState &actPosState) const EC_OVERRIDE

virtual EcGeneralVelocity dhFrameVelocityInSystem (const EcManipulatorState &manipState) const EC_OVERRIDE

virtual const EcGeneralVelocitydhFrameVelocityInSystem (EcManipulatorActiveState &actState) const EC_OVERRIDE

virtual EcGeneralVelocity dhFrameVelocityInLocal (const EcManipulatorState &manipState) const EC_OVERRIDE

virtual const EcGeneralVelocitydhFrameVelocityInLocal (EcManipulatorActiveState &actState) const EC_OVERRIDE
get the link's D-H frame velocity represented in the local frame

virtual const EcGeneralVelocityprimaryFrameVelocityInSystem (EcManipulatorActiveState &actState) const EC_OVERRIDE

virtual EcGeneralAcceleration dhFrameAccelerationInLocal (const EcManipulatorState &manipState) const EC_OVERRIDE

virtual const EcGeneralAccelerationdhFrameAccelerationInLocal (EcManipulatorActiveState &actState) const EC_OVERRIDE
get the link's D-H frame acceleration represented in the local frame

virtual const EcGeneralForcedhFrameForceInLocal (const EcManipulatorExternalForce &manipExtForce, EcManipulatorActiveState &actState, const EcStatedSystemStruct *statedSystemStruct=0) const EC_OVERRIDE

virtual const EcRigidBodyMassPropertiescrbi (EcManipulatorActiveState &actState, const EcStatedSystemStruct *statedSystemStruct=0) const EC_OVERRIDE

virtual const EcReArraycrbiSpatialCholeskyDecomposition (EcManipulatorActiveState &actState, const EcStatedSystemStruct *statedSystemStruct=0) const

virtual const EcArticulatedBodyDynamicsarbd (const EcManipulatorExternalForce &manipExtForce, const EcManipulatorTorque &manipTorque, EcManipulatorActiveState &actState, const EcStatedSystemStruct *statedSystemStruct=0) const EC_OVERRIDE

virtual const EcGeneralAccelerationarbiSupplementalDhFrameAccelerationInLocal (const EcManipulatorExternalForce &manipExtForce, const EcManipulatorTorque &manipTorque, EcManipulatorActiveState &actState, const EcStatedSystemStruct *statedSystemStruct=0) const EC_OVERRIDE

virtual const EcGeneralAccelerationarbiBaseAccelerationInLocal (const EcManipulatorExternalForce &manipExtForce, const EcManipulatorTorque &manipTorque, EcManipulatorActiveState &actState, const EcStatedSystemStruct *statedSystemStruct=0) const
get the acceleration of the base using the arbi algorithm in base-frame coordinates. More...

virtual EcU32 linkIndexByIdentifier (const EcString &label) const

virtual EcBoolean changeLinkLabel (const EcString &fromLabel, const EcString &toLabel)
changes the label of one of the manipulator's links

virtual void propagateState (const EcVelocityState &velocityState, EcReal deltaT, EcPositionState &positionState) const
propagate a position state with a given velocity and time More...

virtual void propagateState (const EcVelocityState &velocityState, EcReal deltaT, EcPositionState &positionState, EcPropagationResultData &propagationResultData) const
propagate a position state with a given velocity and time and return diagnostic information More...

virtual void propagateVelocityState (const EcAccelerationState &accelerationState, EcReal deltaT, EcVelocityState &velocityState) const
propagate a velocity state with a given acceleration and time More...

virtual EcBoolean checkLimitConstraints (const EcPositionState &positionState, EcU32 &index) const

virtual EcBoolean checkLimitsAndLimitConstraints (const EcPositionState &positionState, EcReal tolerance, EcU32 &index) const

virtual void intersectLineSegmentWithManipulator (const EcLineSegment &lineSegment, EcManipulatorPointEvent &pointEvent, EcManipulatorActiveState *pActState, EcU32 levelOfDetail=0) const

virtual EcBoolean findAndConvertToReferences ()
find and convert all explicit link descriptions to references

we are about to modify a link shape. Find and fix all references to this shape More...

replace a link and all its children More...

replace the kinematics for a link, accessed by index

virtual EcBoolean replaceLinkShape (const EcString &linkLabel, const EcShape &shape, EcU32 bvhLevel, EcBoolean alwaysReplace=EcFalse)

virtual EcBoolean replaceLinkShape (const EcU32 linkIndex, const EcShape &shape, EcU32 bvhLevel, EcBoolean alwaysReplace=EcFalse)

change the primary frame for a link, accessed by index

change the primary frame for a link, accessed by label

virtual EcBoolean transformPrimaryFrame (const EcString &linkLabel, const EcCoordinateSystemTransformation &xform)

virtual EcBoolean transformAllPrimaryFramesToIdentity ()

virtual EcBoolean configureManipulatorReference (const EcXmlVectorType< EcIndividualManipulator > &manipulatorVector)
configure a manipulator reference, if present

virtual const EcIndividualManipulatorconcreteReference () const EC_OVERRIDE
get the concrete reference manipulator

virtual const EcGeneralBoundObjectVectorgeneralBoundObjects () const
get the general bound objects

virtual void setGeneralBoundObjects (const EcGeneralBoundObjectVector &objs)
set the general bound objects

virtual const EcTokentoken () const EC_OVERRIDE
gets the xml token used for writing out. More...

virtual EcBoolean mapManipulator ()
map all links in the manipulator

map all links in the manipulator

virtual const EcStringDataMapMapsurfaces () const
gets surface property collection

virtual void setSurfaces (const EcStringDataMapMap &surfaces)
set the surface properties collection for this shape

EcBoolean lookup (const EcString &key, const EcDataMap *&property) const EC_OVERRIDE
lookup up surface properties given a key

build the lightweight logical array of link interactions

set named frames for a link

virtual EcBoolean setSurfacesByIDs (const EcU32 &linkID, const EcU32 &shapeID, const EcStringDataMapMap &surfaces)
set shape surface properties by the IDs.

returns a boolean describing if two links can collide

virtual EcBoolean setSurfaceProperties (const EcString &key, const EcDataMap &properties) EC_OVERRIDE
set the properties of the surface identified by key. More...

virtual EcVector getCenterOfMassInSystem (EcManipulatorActiveState &activeState) const
computes and returns the center of mass of the manipulator in system coordinates.

virtual void truncateValues (const EcReal &precision=1e-10) EC_OVERRIDE
truncate values in the physical extents to the precision specified.

virtual void simplifyLinkShapesWithCapsules (const EcDataMap &color=EcSurfaceColorFactory::defaultManipColor())
simplify the manipulator by replacing link shapes with capsules. More...

virtual void simplifyLinkShapesWithConvexHulls (const EcDataMap &color=EcSurfaceColorFactory::defaultManipColor())
simplify the manipulator by replacing link shapes with convex hulls. More...

virtual void simplifyLinkShapesWithBoundingVolumes (const EcDataMap &color=EcSurfaceColorFactory::defaultManipColor(), EcBoolean keepShape=EcTrue)
simplify the manipulator by replacing link shapes with the existing bounding volumes More...

virtual const EcGeneralMotioncompositeSpatialMomentumInLocal (EcManipulatorActiveState &activeState, const EcStatedSystemStruct *statedSystemStruct=0) const EC_OVERRIDE
get the composite spatial momentum of this link and its outboard links represented in the link's D-H frame.

virtual const EcGeneralMotioncompositeSpatialMomentumRateInLocal (EcManipulatorActiveState &activeState, const EcStatedSystemStruct *statedSystemStruct=0) const EC_OVERRIDE
get the composite rate of spatial momentum of this link and its outboard links represented in the link's D-H frame.

virtual void computeZeroMomentPoint (const EcVector &gravity, const EcPlane &plane, EcManipulatorActiveState &activeState, EcVector &zmp, const EcStatedSystemStruct *statedSystemStruct=0) const
Compute the zero moment point (ZMP) of this manipulator on plane. Gravity is provided explicitly and must not be included in activeState. More...

virtual void computeZeroMomentPoint (const EcPlane &plane, EcManipulatorActiveState &activeState, EcVector &zmp, const EcStatedSystemStruct *statedSystemStruct=0) const
Compute the zero moment point (ZMP) of this manipulator on plane. Gravity is assumed to be included as the acceleration of the base in activeState in the form of up gravity, i.e. if the gravity is g in the -Z direction, then the base acceleration should be g in the +Z direction. More...

virtual EcReal computeKineticEnergy (EcManipulatorActiveState &activeState, EcMassMatrixTool *massMatrixTool=0) const
Compute the total kinetic energy of all links (including base) of the manipulator. More...

virtual const EcStateConstraintVectorstateConstraints () const
gets the state constraints. More...

virtual void setStateConstraints (const EcStateConstraintVector &value)
sets the state constraints.

virtual const EcStateEqualityConstraintVectorstateEqualityConstraints () const
gets the state equality constraints. More...

virtual void setStateEqualityConstraints (const EcStateEqualityConstraintVector &value)
sets the state equality constraints.

virtual const EcStoppingCriterionVectorstoppingCriteria () const
gets the stopping criteria.

virtual void setStoppingCriteria (const EcStoppingCriterionVector &stoppingCriteria)
sets the stopping criteria.

gets the vector of link indices in order of how to display them

virtual void setDisplayLinkIndices (const EcXmlU32Vector &value)
sets the vector of link indices in order of how to display them

read this object from an XML stream

virtual EcBoolean write (EcXmlWriter &stream) const EC_OVERRIDE
write this object to an XML stream

virtual EcBoolean getCraigDhParameters (EcRealVector &dhSet) const

virtual EcBoolean setBoundingVolume (const EcString &linkLabel, const EcShape &bvShape, const EcDataMap *pSurface=EcNULL)
set the bounding volume of a link in the manipulator. More...

const EcStringSetusingManipulatorLabels () const
gets using manipulator labels

virtual void setChecksJointLimits (const EcBoolean checkJointLimits)
set if a manipulator checks its limits or not

virtual EcBoolean checksJointLimits () const
returns whether this manipulator checks its joint limits

virtual EcBoolean containsJointLimitConstraints () const
returns whether this manipulator contains any joint limit constraints

Public Member Functions inherited from EcXmlCompoundType
ECDECLARE_BIGFOUR (EcXmlCompoundType)

read object attributes from an XML stream

read object elements from an XML stream

virtual EcBoolean writeAttributes (EcXmlWriter &stream) const
write object attributes to an XML stream

virtual EcBoolean writeElements (EcXmlWriter &stream) const
write object elements to an XML stream

virtual EcBoolean writeSchema (EcXmlSchema &stream) const EC_OVERRIDE
write schema

virtual EcBoolean writeSchemaAttributes (EcXmlSchema &stream) const
write schema attributes

virtual EcBoolean writeSchemaElements (EcXmlSchema &stream) const
write schema elements

virtual void registerComponent (const EcToken &token, EcXmlObject *obj)
register a single component More...

virtual void registerComponent (EcXmlObject *obj)
register a single component More...

virtual void registerComponentReadOnly (const EcToken &token, EcXmlObject *obj)
register a single component as read-only More...

virtual const EcXmlComponentMapcomponentMap () const
get a reference to the component map

virtual void registerAttributeComponent (const EcToken &AttribToken, EcXmlObject *Obj)
register a single attribute component More...

virtual void registerAttributeComponentReadOnly (const EcToken &AttribToken, EcXmlObject *Obj)
register a single attribute component read-only More...

virtual const EcXmlComponentMapattributeComponentMap ()
get a reference to the component attribute map

virtual const EcXmlSpecialDescriptorMapspecialDescriptorMap ()
get a reference to the special-descriptor map

virtual void registerComponentDescriptor (const EcToken &xmlToken, const EcToken &descriptorToken, const EcString &descriptorString)
register an XML token-string descriptor More...

virtual const EcXmlTokenStringDescriptorMapMaptokenStringDescriptorMap ()
get a reference to the XML token-string descriptor map

virtual EcBoolean hasChildren () const
return EcTrue if there are children components or EcFalse if an empty element.

virtual EcBoolean hasAttributes () const
return EcTrue if there are attributes in the element.

Public Member Functions inherited from EcXmlObject
ECDECLARE_BIGFOUR (EcXmlObject)

read this attribute from an XML stream

virtual EcBoolean createSchema (const EcString &filename, const EcToken &objectName=EcXml::EcDefaultToken) const
create schema

virtual EcBoolean xmlInitialized () const
get XML initialized flag. This bit is set on initialization.

virtual void setXmlInitialized (EcBoolean val=EcTrue)
set XML initialized flag. This bit is set on initialization.

virtual EcBoolean specified () const
get specified flag. This bit is set upon reading from an XML file.

virtual void setSpecified (EcBoolean val=EcTrue)
set specified flag. This bit is set upon reading from an XML file.

virtual EcBoolean isBasicType () const
Return true/false for basic type.

virtual EcBoolean equalsDefault () const
tests equality of XML object with default

## Static Public Member Functions

static EcIndividualManipulator nullObject ()

## Protected Member Functions

EcBoolean makeIndicesCompatible (EcU32 &index1, EcU32 &index2) const
used to manipulate the link map

Protected Member Functions inherited from EcXmlCompoundType

virtual EcXmlComponentMapnewComponentMap () const
allocate a new componentMap

virtual EcXmlSpecialDescriptorMapnewSpecialDescriptorMap ()
allocate a new specialDescriptorsMap

virtual EcXmlTokenStringDescriptorMapMapnewTokenStringDescriptorMap ()
allocate a new tokenStringDescriptorsMap

virtual void createComponentMap () const
create component map

virtual void createAttributeComponentMap ()
create attribute component map

virtual void createSpecialDescriptorMap ()
create special-descriptors map

virtual void createTokenStringDescriptorMap ()
create token-string descriptor map

virtual EcBoolean isReadOnlyComponent (const EcToken token) const
check to see if the token corresponds to a read-only component

virtual EcBoolean isReadOnlyAttribute (const EcToken token) const
check to see if the token corresponds to a read-only attribute

virtual EcXmlObjectlibraryAttribute ()

## Protected Attributes

EcXmlString m_ManipulatorLabel
the identifying label

EcCoordinateSystemTransformation m_CoordSysXForm
the the coordinate system transformation from the system reference frame

EcSphere m_AbsoluteBoundingSphere

EcXmlBoolean m_IsFixedBase
a flag indicating whether or not the base is fixed or free

EcXmlBoolean m_CanBeStatic

EcManipulatorReferenceDescription m_ManipulatorReferenceDescription
a description of the

EcGeneralBoundObjectVector m_GeneralBoundObjects
a vector holding general bound objects

EcStateConstraintVector m_vStateConstraints
a vector of state inequality constraints

EcStateEqualityConstraintVector m_vStateEqualityConstraints
a vector of state equality constraints

EcStoppingCriterionVector m_vStoppingCriteria
a vector of stopping criteria

a vector of link indices in order of how to display them

organization of the links into a depth-first vector

organization of the links into a string-based map

EcStringDataMapMap m_Surfaces
a map of surface properties by string key for the manipulator

a mapping of which links can collide with which others

EcU32 m_ManipIndex
the index of this manipulator

EcStringSet m_UsingManipulatorLabels
using labels of the dependent manipulator – for manipulator combination

link label mapping – for manipulator combination

a 2D array of link collision

const EcIndividualManipulatorm_pReferenceManipulator
a pointer to a reference manipulator

EcPropagationResultData m_UtilityPropagationResultData
a utility value for holding propagation results

EcXmlString m_UtilityKey
a utility value for holding a string key

EcBoolean m_CheckJointLimits
a flag indicating whether this manipulator checks joint limits

EcBoolean m_ContainsJointLimitConstraints
a flag indicating whether this manipulator contains any joint limit constraints

Protected Attributes inherited from EcXmlCompoundType
EcXmlComponentMapm_pComponentMap

EcXmlComponentMapm_pAttributeComponentMap

EcXmlSpecialDescriptorMapm_pSpecialDescriptorMap

EcXmlTokenStringDescriptorMapMapm_pComponentMapTokenStringDescriptor

Protected Attributes inherited from EcXmlObject
EcU8 m_State
the state of the object - eight boolean flags

## Static Protected Attributes

static const EcGeneralAcceleration m_theZeroAcceleration
a static zero acceleration

Static Protected Attributes inherited from EcXmlObject
static const EcU8 m_theXmlInitializedBit
the bit used to describe xml initialization

static const EcU8 m_theSpecifiedBit
the bit used to describe specification

Public Types inherited from EcXmlCompoundType
enum  {
}
special-descriptor codes More...

## Detailed Description

An individual manipulator is described through this class. It includes a string label, a physical extent of the base, a list of top-most links, and a dynamic reference frame.

Holds a description of an individual (branching) robotic manipulator. The manipulator as a defined base and a vector of links directly connected to the base. Each of these links can hold a bifurcating tree of links beneath it.

Examples:
ecCollisionAvoidanceExample.cpp, and ecProgrammaticConstructionMain.cpp.

Definition at line 37 of file ecIndManipulator.h.

## Constructor & Destructor Documentation

 EcIndividualManipulator::EcIndividualManipulator ( const EcIndividualManipulator & orig, EcFoundCommon::DeepCopyFlag copyFlag = EcFoundCommon::CopyNone )

copy constructor

Parameters
 [in] orig EcIndividualManipulator to copy from [in] copyFlag
EcFoundCommon::DeepCopyFlag. Only None and Shape are valid flags for this.

## Member Function Documentation

virtual

we are about to modify a link shape. Find and fix all references to this shape

Parameters
 label The label of the link to be modified
Returns
True if the link by the given label exists or false otherwise

Add an EcBoundingBox bounding volume to each of the links within the BVH if it doesn't already have one

Add an convex hull bounding volume to each of the links within the BVH if it doesn't already have one

virtual

Parameters
Returns

virtual

Adds a link by copy to the end of the first chain rooted.

Parameters

Examples:
ecProgrammaticConstructionMain.cpp.

 virtual const EcArticulatedBodyDynamics& EcIndividualManipulator::arbd ( const EcManipulatorExternalForce & manipExtForce, const EcManipulatorTorque & manipTorque, EcManipulatorActiveState & actState, const EcStatedSystemStruct * statedSystemStruct = 0 ) const
virtual

compute and return the articulated-body dynamics (articulated-body inertia and bias force) for this link represented in the link's D-H frame.

Parameters
 manipExtForce The external force manipTorque The manipulator torque actState The manipulator active state statedSystemStruct The stated system struct for use when there are other manipulators attached to this link. If so, the mass properties of the attached manipulators will be included in the calculation. If this parameter is null or there's not attached manipulator, then only this link's mass properties are used.
Returns
the articulated-body dynamics for this link represented in the link's D-H frame

 virtual const EcGeneralAcceleration& EcIndividualManipulator::arbiBaseAccelerationInLocal ( const EcManipulatorExternalForce & manipExtForce, const EcManipulatorTorque & manipTorque, EcManipulatorActiveState & actState, const EcStatedSystemStruct * statedSystemStruct = 0 ) const
virtual

get the acceleration of the base using the arbi algorithm in base-frame coordinates.

Parameters
 manipExtForce The external force manipTorque The manipulator torque actState The manipulator active state statedSystemStruct The stated system struct for use when there are other manipulators attached to this link. If so, the mass properties of the attached manipulators will be included in the calculation. If this parameter is null or there's not attached manipulator, then only this link's mass properties are used.
Returns
the acceleration of the base
 virtual const EcGeneralAcceleration& EcIndividualManipulator::arbiSupplementalDhFrameAccelerationInLocal ( const EcManipulatorExternalForce & manipExtForce, const EcManipulatorTorque & manipTorque, EcManipulatorActiveState & actState, const EcStatedSystemStruct * statedSystemStruct = 0 ) const
virtual

get the supplemental D-H frame acceleration represented in the local frame. this supplemental acceleration is the difference between the true acceleration produced by the manipulator torque and external forces and the acceleration calculated from the acceleration state.

Parameters
 manipExtForce The external force manipTorque The manipulator torque actState The manipulator active state statedSystemStruct The stated system struct for use when there are other manipulators attached to this link. If so, the mass properties of the attached manipulators will be included in the calculation. If this parameter is null or there's not attached manipulator, then only this link's mass properties are used.
Returns
the supplemental D-H frame acceleration represented in the local frame.

 virtual EcBoolean EcIndividualManipulator::checkLimitConstraints ( const EcPositionState & positionState, EcU32 & index ) const
virtual

check whether any limit constraint is violated for a given position state

Parameters
 [in] positionState The position state against which the limit constraints are tested [out] index The index of the link (joint) whose limit constraint is violated
Returns
True if no limit constraint is violated or false otherwise
 virtual EcBoolean EcIndividualManipulator::checkLimitsAndLimitConstraints ( const EcPositionState & positionState, EcReal tolerance, EcU32 & index ) const
virtual

check whether any joint limit or limit constraint is violated for a given position state

Parameters
 [in] positionState The position state against which the limits and limit constraints are tested [in] tolerance The value used to slightly expand the ranges when checking for limits and constraints. For example, if the lower limit of a joint is at -1 and the tolerance is 0.001, then the check will only fail if the joint value is less than -1.001. [out] index The index of the first link (joint) whose limit or limit constraint is violated
Returns
True if no limit constraint is violated or false otherwise
virtual

gets the child links - overridden to get reference's children if needed

 virtual EcBoolean EcIndividualManipulator::combineManipulator ( const EcString & thisLinkLabel, const EcIndividualManipulator & other, const EcCoordinateSystemTransformation & offSet )
virtual

Rigidly combine a manipulator to this manipulator by copy.

Parameters
 [in] thisLinkLabel the label of the link of the dependent manipulator [in] other the other manipulator to be joined [in] offSet where the other will be joined to relative to thisLink
 virtual EcReal EcIndividualManipulator::computeKineticEnergy ( EcManipulatorActiveState & activeState, EcMassMatrixTool * massMatrixTool = 0 ) const
virtual

Compute the total kinetic energy of all links (including base) of the manipulator.

Parameters
 [in] activeState The active state of this manipulator. [in] massMatrixTool A pointer to EcMassMatrixTool instance. If it's not provided, one will be created internally. For more efficient calculation, one should be passed in.
Returns
The total kinetic energy.
 virtual void EcIndividualManipulator::computeZeroMomentPoint ( const EcVector & gravity, const EcPlane & plane, EcManipulatorActiveState & activeState, EcVector & zmp, const EcStatedSystemStruct * statedSystemStruct = 0 ) const
virtual

Compute the zero moment point (ZMP) of this manipulator on plane. Gravity is provided explicitly and must not be included in activeState.

Parameters
 [in] gravity The gravity vector. [in] plane The plane on which ZMP is computed. Must be in system coordinates. [in] activeState The active state of this manipulator. [out] zmp The zero moment point in system coordinates. [in] statedSystemStruct
 virtual void EcIndividualManipulator::computeZeroMomentPoint ( const EcPlane & plane, EcManipulatorActiveState & activeState, EcVector & zmp, const EcStatedSystemStruct * statedSystemStruct = 0 ) const
virtual

Compute the zero moment point (ZMP) of this manipulator on plane. Gravity is assumed to be included as the acceleration of the base in activeState in the form of up gravity, i.e. if the gravity is g in the -Z direction, then the base acceleration should be g in the +Z direction.

Parameters
 [in] plane The plane on which ZMP is computed. Must be in system coordinates. [in] activeState The active state of this manipulator. [out] zmp The zero moment point in system coordinates. [in] statedSystemStruct
 virtual const EcRigidBodyMassProperties& EcIndividualManipulator::crbi ( EcManipulatorActiveState & actState, const EcStatedSystemStruct * statedSystemStruct = 0 ) const
virtual

compute and return the composite rigid-body inertia of this and all outboard links represented in the link's D-H frame.

Parameters
 actState The manipulator active state statedSystemStruct The stated system struct for use when there are other manipulators attached to this link. If so, the mass properties of the attached manipulators will be included in the calculation. If this parameter is null or there's not attached manipulator, then only this link's mass properties are used.
Returns
the composite rigid-body inertia of this and all outboard links represented in the link's D-H frame

 virtual const EcReArray& EcIndividualManipulator::crbiSpatialCholeskyDecomposition ( EcManipulatorActiveState & actState, const EcStatedSystemStruct * statedSystemStruct = 0 ) const
virtual

get the Cholesky Decomposition (L such that L*L^T=M) of the 6x6 spatial representation of the composite rigid-body inertia (as represented in the DH frame).

Parameters
 actState The manipulator active state statedSystemStruct The stated system struct for use when there are other manipulators attached to this link. If so, the mass properties of the attached manipulators will be included in the calculation. If this parameter is null or there's not attached manipulator, then only this link's mass properties are used.
Returns
the Cholesky Decomposition
 virtual EcGeneralAcceleration EcIndividualManipulator::dhFrameAccelerationInLocal ( const EcManipulatorState & manipState ) const
virtual

get the link's D-H frame acceleration represented in the local frame from a manipulator state. this is overridden from the parent to set the base value

 virtual const EcGeneralForce& EcIndividualManipulator::dhFrameForceInLocal ( const EcManipulatorExternalForce & manipExtForce, EcManipulatorActiveState & actState, const EcStatedSystemStruct * statedSystemStruct = 0 ) const
virtual

compute and return the general force that must be applied to the link to achieve the motion specified in the active state.

Parameters
 manipExtForce The external force actState The manipulator active state statedSystemStruct The stated system struct for use when there are other manipulators attached to this link. If so, the mass properties of the attached manipulators will be included in the calculation. If this parameter is null or there's not attached manipulator, then only this link's mass properties are used.
Returns
the general force that must be applied to the link to achieve the motion

 virtual EcCoordinateSystemTransformation EcIndividualManipulator::dhFrameInSystem ( const EcPositionState & posState ) const
virtual

get the link's D-H frame represented in the system frame from a position state this is overridden from the parent to set the base value

 virtual const EcCoordinateSystemTransformation& EcIndividualManipulator::dhFrameInSystem ( EcManipulatorActivePositionState & actPosState ) const
virtual

get the link's D-H frame represented in the system frame this is overridden from the parent to set the base value

 virtual EcGeneralVelocity EcIndividualManipulator::dhFrameVelocityInLocal ( const EcManipulatorState & manipState ) const
virtual

get the link's D-H frame velocity represented in the local frame from a manipulator state. this is overridden from the parent to set the base value

 virtual EcGeneralVelocity EcIndividualManipulator::dhFrameVelocityInSystem ( const EcManipulatorState & manipState ) const
virtual

get the link's D-H frame velocity represented in the system frame from a maniulator state. this is overridden from the parent to set the base value

 virtual const EcGeneralVelocity& EcIndividualManipulator::dhFrameVelocityInSystem ( EcManipulatorActiveState & actState ) const
virtual

get the link's D-H frame velocity represented in the system frame. The point of application of this motion is the origin of the D-H frame.

 EcBoolean EcIndividualManipulator::equalForReferencing ( const EcIndividualManipulator & orig ) const

equality operator for manipulator referencing (exlcludes label equality)

 virtual EcBoolean EcIndividualManipulator::getCraigDhParameters ( EcRealVector & dhSet ) const
virtual

get the DH parameters for the robot in Craig's formalism format: a, alpha, d if the link kinematics do not support Craig's notation, then the values are empty

 virtual void EcIndividualManipulator::intersectLineSegmentWithManipulator ( const EcLineSegment & lineSegment, EcManipulatorPointEvent & pointEvent, EcManipulatorActiveState * pActState, EcU32 levelOfDetail = 0 ) const
virtual

intersect a line segment with the manipulator, returning the closest point along the line segment, based on an initial closest point as provided in pointEvent.

 virtual EcU32 EcIndividualManipulator::jointAndBaseDof ( ) const
virtual

gets the number of degrees of freedom in the manipulator, including the position and orientation of the base.

Examples:
ecCollisionAvoidanceExample.cpp, and ecProgrammaticConstructionMain.cpp.
 virtual EcU32 EcIndividualManipulator::jointDof ( ) const
virtual

gets the number of degrees of freedom in the manipulator, excluding the position and orientation of the base.

Examples:
ecProgrammaticConstructionMain.cpp.
virtual

gets a pointer to the link with the specified identifier returns NULL if it doesn't exist.

virtual

gets a pointer to the link with the specified index returns NULL if the index is out of range.

 virtual EcU32 EcIndividualManipulator::linkIndexByIdentifier ( const EcString & label ) const
virtual

gets the index of a link with the specified identifier returns VOIDINDEX if it doesn't exist.

 virtual const EcGeneralVelocity& EcIndividualManipulator::primaryFrameVelocityInSystem ( EcManipulatorActiveState & actState ) const
virtual

get the link's primary frame velocity represented in the system frame The point of application of this motion is the origin of the primary frame.

 virtual void EcIndividualManipulator::propagateState ( const EcVelocityState & velocityState, EcReal deltaT, EcPositionState & positionState ) const
virtual

propagate a position state with a given velocity and time

Parameters
 velocityState The velocity state used to propagate the position state deltaT The time increment [out] positionState The position state after propagation
 virtual void EcIndividualManipulator::propagateState ( const EcVelocityState & velocityState, EcReal deltaT, EcPositionState & positionState, EcPropagationResultData & propagationResultData ) const
virtual

propagate a position state with a given velocity and time and return diagnostic information

Parameters
 velocityState The velocity state used to propagate the position state deltaT The time increment [out] positionState The position state after propagation [out] propagationResultData The diagnostic information (whether joint limits have been hit) that results from propagation.
 virtual void EcIndividualManipulator::propagateVelocityState ( const EcAccelerationState & accelerationState, EcReal deltaT, EcVelocityState & velocityState ) const
virtual

propagate a velocity state with a given acceleration and time

Parameters
 accelerationState The acceleration state used to propagate the velocity state deltaT The time increment [out] velocityState The velocity state after propagation
virtual

replace a link and all its children

Parameters
Returns
True if the link by the given label exists or false otherwise
virtual

replace the kinematics for a link, accessed by label If both newLinkKinematics and the existing link kinematics are of DH type, then the DH parameters will simply be copied and no memory will be allocated.

 virtual EcBoolean EcIndividualManipulator::replaceLinkShape ( const EcString & linkLabel, const EcShape & shape, EcU32 bvhLevel, EcBoolean alwaysReplace = EcFalse )
virtual

replace the shape of the link identified by linkLabel in this manipulator with the given shape at the BVH (bounding volume hierarchy) level given by bvhLevel. Note that if the given shape is of the same primitive type as the existing shape of that link, then only geometric properties are copied unless alwaysReplace is true. This will prevent dynamic memory allocation.

Parameters
 linkLabel The label of the link of which the shape will be replaced/copied. shape The new shape that will be used to replace/copy. bvhLevel The level of the bounding volume at which the shape will be replaced/copied. If it is 0, then this will simply replace/copy the shape of the link itself, not the bounding volume. alwaysReplace If true, then given shape will be used to replace the link shape regardless of whether the two shapes are of the same primitive type. Memory allocation will occur but all the properties of the given shape, instead of just geometric properties, will be there.
 virtual EcBoolean EcIndividualManipulator::replaceLinkShape ( const EcU32 linkIndex, const EcShape & shape, EcU32 bvhLevel, EcBoolean alwaysReplace = EcFalse )
virtual

replace the shape of the link identified by linkIndex in this manipulator with the given shape at the BVH (bounding volume hierarchy) level given by bvhLevel. Note that if the given shape is of the same primitive type as the existing shape of that link, then only geometric properties are copied unless alwaysReplace is true. This will prevent dynamic memory allocation.

Parameters
 linkIndex The index of the link of which the shape will be replaced/copied. shape The new shape that will be used to replace/copy. bvhLevel The level of the bounding volume at which the shape will be replaced/copied. If it is 0, then this will simply replace/copy the shape of the link itself, not the bounding volume. alwaysReplace If true, then given shape will be used to replace the link shape regardless of whether the two shapes are of the same primitive type. Memory allocation will occur but all the properties of the given shape, instead of just geometric properties, will be there.
 virtual EcBoolean EcIndividualManipulator::setBoundingVolume ( const EcString & linkLabel, const EcShape & bvShape, const EcDataMap * pSurface = EcNULL )
virtual

set the bounding volume of a link in the manipulator.

This method will set the given shape as the bounding volume of the link specified by the given label.

Parameters
 [in] linkLabel The label of the link to which to set bounding volume [in] bvShape The shape of the bounding volume [in] pSurface The surface properties to be used for the bounding volume. If not given, the bounding volume will have the default bounding color and will assume other surface properties, such as surface spring and damper constants, from the link.
Returns
True if linkLabel is valid and the bounding volume is successfully set or false otherwise.
 virtual void EcIndividualManipulator::setLinkLabel ( const EcString & label )
virtual

sets an identifying label

Examples:
ecCollisionAvoidanceExample.cpp, and ecProgrammaticConstructionMain.cpp.
 virtual EcBoolean EcIndividualManipulator::setSurfaceProperties ( const EcString & key, const EcDataMap & properties )
virtual

set the properties of the surface identified by key.

Parameters
 [in] key A string to identify the surface material. [in] properties The surface properties to be set.
Returns
True if key is found or false otherwise.

 virtual void EcIndividualManipulator::simplifyLinkShapesWithBoundingVolumes ( const EcDataMap & color = EcSurfaceColorFactory::defaultManipColor(), EcBoolean keepShape = EcTrue )
virtual

simplify the manipulator by replacing link shapes with the existing bounding volumes

Parameters
 [in] color Specify the color to use. Default to defaultManipColor. [in] keepShape If true, then the existing shapes on links with no bounding volumes will be kept. Otherwise, there will be no shapes on links with no bounding volumes.
 virtual void EcIndividualManipulator::simplifyLinkShapesWithCapsules ( const EcDataMap & color = EcSurfaceColorFactory::defaultManipColor() )
virtual

simplify the manipulator by replacing link shapes with capsules.

Parameters
 [in] color Specify the color to use. Default to defaultManipColor.
 virtual void EcIndividualManipulator::simplifyLinkShapesWithConvexHulls ( const EcDataMap & color = EcSurfaceColorFactory::defaultManipColor() )
virtual

simplify the manipulator by replacing link shapes with convex hulls.

Parameters
 [in] color Specify the color to use. Default to defaultManipColor.
 virtual const EcStateConstraintVector& EcIndividualManipulator::stateConstraints ( ) const
virtual

gets the state constraints.

These are the constraints that limit the motion of the robot in through inequalities, including the motions of the joints or the mobile base. For example, a constraint can be created to keep the robot from getting too close to a wall. Although this task could also be accomplished by obstacle avoidance, using the constraint approach is potentially much faster. Each constraint must be in the form of f(q) >= 0, where q is the position state (base position plus joint positions). Note that these constraints are in addition to the upper and lower limit constraints that exist in each of the manipulator link.

 virtual const EcStateEqualityConstraintVector& EcIndividualManipulator::stateEqualityConstraints ( ) const
virtual

gets the state equality constraints.

These are the constraints that limit the motion of the robot through equalities, including the motions of the joints or the mobile base. For example, a constraint can be created to keep the robot from getting too close to a wall. Although this task could also be accomplished by obstacle avoidance, using the constraint approach is potentially much faster. Each constraint must be in the form of f(q) >= 0, where q is the position state (base position plus joint positions). Note that these constraints are in addition to the upper and lower limit constraints that exist in each of the manipulator link.

 virtual const EcToken& EcIndividualManipulator::token ( ) const
virtual

gets the xml token used for writing out.

 virtual EcU32 EcIndividualManipulator::totalDof ( ) const
virtual

gets the total of degrees of freedom in the manipulator. If the manipulator is fixed base, it returns the number of joints (same as jointDof()), otherwise it returns the number of joints plus the degrees of freedom in the base (in this case it is the same as jointAndBaseDof()).

 virtual EcBoolean EcIndividualManipulator::transformAllPrimaryFramesToIdentity ( )
virtual

transform all primary frames to identity. This is eqivalent to calling transformPrimaryFrame with identity for all links

 virtual EcBoolean EcIndividualManipulator::transformLinkComponentsBy ( const EcString & linkLabel, const EcCoordinateSystemTransformation & xform )
virtual

transform components (mass properties and shape) of a link in the tree. this has the same effect as setting the primary frame from identity to this value

 virtual EcBoolean EcIndividualManipulator::transformLinkSubtreeBy ( const EcString & linkLabel, const EcCoordinateSystemTransformation & xform )
virtual

transform a subtree with respect to the top link's parent by a general coordinate system transformation. This transformation is inserted before the link placement.

 virtual EcBoolean EcIndividualManipulator::transformPrimaryFrame ( const EcString & linkLabel, const EcCoordinateSystemTransformation & xform )
virtual

transform the link so that the primary frame transformation is that given, but the link does not change (i.e., if xform is identity, then the primary frame will coincide with the DH frame, but the link won't change).

## Member Data Documentation

 EcSphere EcIndividualManipulator::m_AbsoluteBoundingSphere
protected

the absolute bounding sphere. No matter what the joint values (within joint limits), the manipulator will lie within this sphere (described in the base (not system) coordinate frame)

Definition at line 1070 of file ecIndManipulator.h.

 EcXmlBoolean EcIndividualManipulator::m_CanBeStatic
protected

a flag indicating the manipulator can be a static object (fixed base with no moving parts) this is used for optimizing collision detection

Definition at line 1081 of file ecIndManipulator.h.