Actin®  Version 5.3.0
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
 
EcIndividualManipulatorcopyAllButChildLinksFrom (const EcIndividualManipulator &orig)
 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...
 
virtual const EcManipulatorLinkVectorchildLinks () const EC_OVERRIDE
 
virtual void setChildLinks (const EcManipulatorLinkVector &childLinks) EC_OVERRIDE
 sets the child links - overridden to remap the manipulator
 
virtual void addChild (const EcManipulatorLink &childLink) EC_OVERRIDE
 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
 
virtual void setFromLink (const EcManipulatorLink &link)
 set everything from a link object
 
virtual void clearChildLinks () EC_OVERRIDE
 clear the child links vector
 
virtual void addLinkToEndOfChain (const EcManipulatorLink &link) EC_OVERRIDE
 Adds a link by copy to the end of the first chain rooted. More...
 
virtual EcBoolean addLinkToChildLinkByName (const EcManipulatorLink &link, const EcString &parent) EC_OVERRIDE
 Adds a link by copy to the link with the given label. 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
 
virtual void buildSelfCollisionLinkMap ()
 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
 
virtual EcBoolean optimizeOnLoad () const
 gets the flag indicating to optimize on load
 
virtual void setOptimizeOnLoad (EcBoolean optimizeOnLoad)
 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
 
virtual const EcBooleanVectorVectorlinkCollisionTest () const
 the fast test for collisions
 
virtual const EcCoordinateSystemTransformationdhFrameInSystem (EcManipulatorActivePositionState &actPosState) const EC_OVERRIDE
 
virtual const EcGeneralVelocitydhFrameVelocityInSystem (EcManipulatorActiveState &actState) 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 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 const EcManipulatorLinklinkByIdentifier (const EcString &label) const
 
virtual const EcManipulatorLinklinkByIndex (const EcU32 index) 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
 
virtual EcBoolean aboutToModifyLink (const EcString &label)
 we are about to modify a link shape. Find and fix all references to this shape More...
 
virtual EcBoolean replaceLinkAndChildren (const EcString &linkLabel, const EcManipulatorLink &newLink)
 replace a link and all its children More...
 
virtual EcBoolean replaceLinkKinematics (EcU32 linkIndex, const EcLinkKinematics &newKinematics)
 replace the kinematics for a link, accessed by index
 
virtual EcBoolean replaceLinkKinematics (const EcString &linkLabel, const EcLinkKinematics &newKinematics)
 
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)
 
virtual EcBoolean replaceLinkPrimaryFrame (EcU32 linkIndex, const EcCoordinateSystemTransformation &newXForm)
 change the primary frame for a link, accessed by index
 
virtual EcBoolean replaceLinkPrimaryFrame (const EcString &linkLabel, const EcCoordinateSystemTransformation &newXForm)
 change the primary frame for a link, accessed by label
 
virtual EcBoolean transformPrimaryFrame (const EcString &linkLabel, const EcCoordinateSystemTransformation &xform)
 
virtual EcBoolean transformAllPrimaryFramesToIdentity ()
 
virtual EcBoolean transformLinkComponentsBy (const EcString &linkLabel, const EcCoordinateSystemTransformation &xform)
 
virtual EcBoolean transformLinkSubtreeBy (const EcString &linkLabel, const EcCoordinateSystemTransformation &xform)
 
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 const EcManipulatorLinkConstPointerVectorlinkPointerVector () const
 get link vector
 
virtual const EcManipulatorLinkPointerMaplinkPointerMap () const
 get link map
 
virtual EcBoolean mapManipulator ()
 map all links in the manipulator
 
virtual EcBoolean mapManipulator (EcManipulatorLinkConstPointerVector &linkVector, EcManipulatorLinkPointerMap &linkMap)
 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
 
virtual void setSelfCollisionLinkMap (const EcManipulatorSelfCollisionLinkMap &map)
 set the self-collision link map
 
virtual const EcManipulatorSelfCollisionLinkMapselfCollisionLinkMap () const
 get the self-collision link map
 
EcBoolean lookup (const EcString &key, const EcDataMap *&property) const EC_OVERRIDE
 lookup up surface properties given a key
 
void addCapsuleBoundingVolumeToLinks () const
 
void addSphereBoundingVolumeToLinks () const
 
void addBoundingBoxToLinks () const
 
void addConvexHullToLinks ()
 
virtual void mapLinkCollisionCandidates ()
 build the lightweight logical array of link interactions
 
EcBoolean setChildLinkNamedFrames (const EcU32 linkIndex, const EcNamedFrames &namedFrames)
 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.
 
virtual EcBoolean canCollide (EcU32 linkID1, EcU32 linkID2) const
 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.
 
virtual const EcXmlU32VectordisplayLinkIndices () const
 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
 
virtual EcBoolean read (EcXmlReader &stream) EC_OVERRIDE
 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 std::set< EcString > & usingManipulatorLabels () const
 gets using manipulator labels
 
const EcManipulatorLinkLabelMappinglinkLabelMapping () const
 gets link label mapping
 
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)
 
virtual EcBoolean readAttributes (EcXmlReader &stream)
 read object attributes from an XML stream
 
virtual EcBoolean readElements (EcXmlReader &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)
 
virtual EcBoolean readAttribute (EcXmlReader &stream)
 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 ()
 get a null link
 

Protected Member Functions

EcBoolean makeIndicesCompatible (EcU32 &index1, EcU32 &index2) const
 used to manipulate the link map
 
- Protected Member Functions inherited from EcXmlCompoundType
virtual EcBoolean readValueFromToken (const EcToken &token, EcXmlReader &stream)
 
virtual EcBoolean readValueFromSpecialToken (const EcToken &token, EcXmlReader &stream)
 read value from unregistered token
 
virtual EcBoolean readAttributeFromToken (const EcToken &token, EcXmlReader &stream)
 
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_OptimizeOnLoad
 
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
 
EcXmlU32Vector m_vDisplayLinkIndices
 a vector of link indices in order of how to display them
 
EcManipulatorLinkConstPointerVector m_LinkPointerVector
 organization of the links into a depth-first vector
 
EcManipulatorLinkPointerMap m_LinkPointerMap
 organization of the links into a string-based map
 
EcStringDataMapMap m_Surfaces
 a map of surface properties by string key for the manipulator
 
EcManipulatorSelfCollisionLinkMap m_SelfCollisionLinkMap
 a mapping of which links can collide with which others
 
EcU32 m_ManipIndex
 the index of this manipulator
 
std::set< EcStringm_UsingManipulatorLabels
 using labels of the dependent manipulator – for manipulator combination
 
EcManipulatorLinkLabelMapping m_LinkLabelMapping
 link label mapping – for manipulator combination
 
EcBooleanVectorVector m_LinkCollisionTest
 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
 

Additional Inherited Members

- Public Types inherited from EcXmlCompoundType
enum  {
  READONLYCOMPONENT = 0,
  READONLYATTRIBUTE
}
 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:
ecBroadphaseCollisionProfilingMain.cpp, ecCameraViewMain.cpp, ecProfilingMain.cpp, ecProgrammaticConstructionMain.cpp, ecQuickStartKinematicsMain.cpp, ecQuickStartMain.cpp, ecStatedSystemMain.cpp, and ecVelocityControlMain.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]origEcIndividualManipulator to copy from
[in]copyFlag
See also
EcFoundCommon::DeepCopyFlag. Only None and Shape are valid flags for this.

Member Function Documentation

virtual EcBoolean EcIndividualManipulator::aboutToModifyLink ( const EcString label)
virtual

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

Parameters
labelThe label of the link to be modified
Returns
True if the link by the given label exists or false otherwise
void EcIndividualManipulator::addBoundingBoxToLinks ( ) const

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

void EcIndividualManipulator::addCapsuleBoundingVolumeToLinks ( ) const

add a capsule bounding volume to the BVH for each link, if it doesn't already exist

void EcIndividualManipulator::addConvexHullToLinks ( )

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

virtual EcBoolean EcIndividualManipulator::addLinkToChildLinkByName ( const EcManipulatorLink link,
const EcString parent 
)
virtual

Adds a link by copy to the link with the given label.

Parameters
[in]linkThe link to be added.
[in]parentName of link to attach to
Returns
true if parent link found

Reimplemented from EcManipulatorLink.

virtual void EcIndividualManipulator::addLinkToEndOfChain ( const EcManipulatorLink link)
virtual

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

Parameters
linkThe link to be added.

Reimplemented from EcManipulatorLink.

Examples:
ecProgrammaticConstructionMain.cpp.
void EcIndividualManipulator::addSphereBoundingVolumeToLinks ( ) const

add a capsule bounding volume to the BVH for each link, if it doesn't already exist

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
manipExtForceThe external force
manipTorqueThe manipulator torque
actStateThe manipulator active state
statedSystemStructThe 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

Reimplemented from EcManipulatorLink.

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
manipExtForceThe external force
manipTorqueThe manipulator torque
actStateThe manipulator active state
statedSystemStructThe 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
manipExtForceThe external force
manipTorqueThe manipulator torque
actStateThe manipulator active state
statedSystemStructThe 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.

Reimplemented from EcManipulatorLink.

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]positionStateThe position state against which the limit constraints are tested
[out]indexThe 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]positionStateThe position state against which the limits and limit constraints are tested
[in]toleranceThe 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]indexThe 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 const EcManipulatorLinkVector& EcIndividualManipulator::childLinks ( ) const
virtual

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

Reimplemented from EcManipulatorLink.

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]thisLinkLabelthe label of the link of the dependent manipulator
[in]otherthe other manipulator to be joined
[in]offSetwhere 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]activeStateThe active state of this manipulator.
[in]massMatrixToolA 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]gravityThe gravity vector.
[in]planeThe plane on which ZMP is computed. Must be in system coordinates.
[in]activeStateThe active state of this manipulator.
[out]zmpThe 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]planeThe plane on which ZMP is computed. Must be in system coordinates.
[in]activeStateThe active state of this manipulator.
[out]zmpThe 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
actStateThe manipulator active state
statedSystemStructThe 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

Reimplemented from EcManipulatorLink.

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
actStateThe manipulator active state
statedSystemStructThe 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 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
manipExtForceThe external force
actStateThe manipulator active state
statedSystemStructThe 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

Reimplemented from EcManipulatorLink.

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

Reimplemented from EcManipulatorLink.

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.

Reimplemented from EcManipulatorLink.

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:
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, ecQuickStartMain.cpp, and ecVelocityControlMain.cpp.
virtual const EcManipulatorLink* EcIndividualManipulator::linkByIdentifier ( const EcString label) const
virtual

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

virtual const EcManipulatorLink* EcIndividualManipulator::linkByIndex ( const EcU32  index) const
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.

Reimplemented from EcManipulatorLink.

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

propagate a position state with a given velocity and time

Parameters
velocityStateThe velocity state used to propagate the position state
deltaTThe time increment
[out]positionStateThe 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
velocityStateThe velocity state used to propagate the position state
deltaTThe time increment
[out]positionStateThe position state after propagation
[out]propagationResultDataThe 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
accelerationStateThe acceleration state used to propagate the velocity state
deltaTThe time increment
[out]velocityStateThe velocity state after propagation
virtual EcBoolean EcIndividualManipulator::replaceLinkAndChildren ( const EcString linkLabel,
const EcManipulatorLink newLink 
)
virtual

replace a link and all its children

Parameters
linkLabelThe label of the link to be replaced
newLinkThe link used to replace
Returns
True if the link by the given label exists or false otherwise
virtual EcBoolean EcIndividualManipulator::replaceLinkKinematics ( const EcString linkLabel,
const EcLinkKinematics newKinematics 
)
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
linkLabelThe label of the link of which the shape will be replaced/copied.
shapeThe new shape that will be used to replace/copy.
bvhLevelThe 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.
alwaysReplaceIf 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
linkIndexThe index of the link of which the shape will be replaced/copied.
shapeThe new shape that will be used to replace/copy.
bvhLevelThe 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.
alwaysReplaceIf 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]linkLabelThe label of the link to which to set bounding volume
[in]bvShapeThe shape of the bounding volume
[in]pSurfaceThe 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

Reimplemented from EcManipulatorLink.

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

set the properties of the surface identified by key.

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

Reimplemented from EcManipulatorLink.

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]colorSpecify the color to use. Default to defaultManipColor.
[in]keepShapeIf 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]colorSpecify 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]colorSpecify 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.

Reimplemented from EcManipulatorLink.

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 1042 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 1053 of file ecIndManipulator.h.

EcXmlBoolean EcIndividualManipulator::m_OptimizeOnLoad
protected

a flag indicating whether or not to optimize upon loading. Optimization takes up-front time, but may improve run-time performance. It only needs to be done once.

Definition at line 1049 of file ecIndManipulator.h.


The documentation for this class was generated from the following file:
Created by Energid Technologies www.energid.com
Copyright © 2016 Energid. All trademarks mentioned in this document are property of their respective owners.