Actin  Version 5.5.2
Software for Robotics Simulation and Control
EcPose Class Reference

The EcPose class EcPose is used to specified a 3D location (position and orientation) in space. It can be either relative or absolute (relative to system). If it's relative, it can be relative to a primary frame of a named frame of a link. More...

#include <ecPose.h>

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

Public Member Functions

 EcPose ()
 default constructor
 
virtual ~EcPose ()
 destructor
 
 EcPose (const EcPose &orig)
 copy constructor
 
EcPoseoperator= (const EcPose &orig)
 assignment operator
 
EcBoolean operator== (const EcPose &orig) const
 equality operator
 
virtual EcXmlObjectclone () const EC_OVERRIDE
 clone - a virtual constructor to an EcXmlObject pointer
 
virtual void registerComponents () EC_OVERRIDE
 register components with the parent
 
virtual EcBoolean equality (const EcXmlObject *other) const EC_OVERRIDE
 equality - virtual equality to an EcXmlObject pointer
 
virtual EcXmlObjectnewObject () const EC_OVERRIDE
 virtual new that returns an EcXmlObject
 
virtual const EcTokentoken () const EC_OVERRIDE
 the token
 
virtual const EcCoordinateSystemTransformationoffset () const
 get the offset of the pose
 
virtual void setOffset (const EcCoordinateSystemTransformation &value)
 set the offset
 
virtual EcBoolean isRelative () const
 return whether the pose is relative
 
virtual void setIsRelative (EcBoolean value)
 set whether the pose is relative
 
virtual const EcStringmanipulatorName () const
 get the Name of the manipulator to which the pose is relative
 
virtual void setManipulatorName (const EcString &value)
 set the Name of the manipulator to which the pose is relative
 
virtual const EcStringroleName () const
 
virtual void setRoleName (const EcString &value)
 set the role name
 
virtual EcU32 linkIndex () const
 get the index of the link to which the pose is relative
 
virtual void setLinkIndex (EcU32 value)
 set the index of the link to which the pose is relative
 
virtual const EcStringnamedFrame () const
 
virtual void setNamedFrame (const EcString &value)
 set the named frame
 
virtual EcBoolean orientationReference () const
 
virtual void setOrientationReference (EcBoolean value)
 set whether the pose's orietaion is relative to a different link than the position.
 
virtual const EcStringorientationManipulatorName () const
 
void setOrientationManipulatorName (const EcString &value)
 
virtual const EcStringorientationRoleName () const
 
virtual void setOrientationRoleName (const EcString &value)
 set the orientation role name
 
virtual EcU32 orientationLinkIndex () const
 
virtual void setOrientationLinkIndex (EcU32 value)
 
virtual const EcStringorientationNamedFrame () const
 
virtual void setOrientationNamedFrame (const EcString &value)
 set the named frame for relative orientation
 
virtual EcBoolean offsetInSystem (const EcManipulatorSystem &system, const EcManipulatorSystemState &state, EcCoordinateSystemTransformation &offset) const
 
virtual EcBoolean offsetInSystem (const EcStatedSystem &statedSystem, EcCoordinateSystemTransformation &offset) const
 
virtual EcBoolean offsetInSystemWithExternalIndices (const EcManipulatorSystem &system, const EcManipulatorSystemState &state, EcU32 posRefManipIndex, EcU32 orientRefManipIndex, EcCoordinateSystemTransformation &offset) const
 
virtual EcBoolean setOffsetFromSystem (const EcManipulatorSystem &system, const EcManipulatorSystemState &state, const EcCoordinateSystemTransformation &offset)
 
virtual EcBoolean setOffsetFromSystem (const EcStatedSystem &statedSystem, const EcCoordinateSystemTransformation &offset)
 
virtual EcBoolean setOffsetFromSystemWithExternalIndices (const EcManipulatorSystem &system, const EcManipulatorSystemState &state, EcU32 posRefManipIndex, EcU32 orientRefManipIndex, const EcCoordinateSystemTransformation &offset)
 
virtual EcBoolean setIsRelativeFromSystem (const EcStatedSystem &statedSystem, EcBoolean value)
 
virtual EcBoolean setOrientationReferenceFromSystem (const EcStatedSystem &statedSystem, EcBoolean value)
 
EcBoolean updateManipIndex (EcU32 manipIndex, EcString roleName)
 
EcBoolean isValid () const
 
virtual void acceptDodLibraryVisitor (EcDodObjectVisitor &visitor, const EcString &objectName)
 
virtual void traverseDodLibraryVisitor (EcDodObjectVisitor &visitor, const EcString &objectName)
 
virtual void acceptDodReaderVisitor (EcDodReaderVisitor &visitor, const EcString &objectName) const
 
virtual void traverseDodReaderVisitor (EcDodReaderVisitor &visitor, const EcString &objectName) const
 
EcBoolean convertPoseUsingManipName (const EcManipulatorSystem &system)
 
EcBoolean convertPoseUsingManipName (const EcStringVector &vec)
 
- Public Member Functions inherited from EcXmlCompoundType
 ECDECLARE_BIGFOUR (EcXmlCompoundType)
 
virtual EcBoolean xmlInit () EC_OVERRIDE
 xmlInitialize
 
virtual EcBoolean read (EcXmlReader &stream) EC_OVERRIDE
 read object from an XML stream
 
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 write (EcXmlWriter &stream) const EC_OVERRIDE
 write object to 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
 

Protected Attributes

EcCoordinateSystemTransformation m_Offset
 The offset.
 
EcXmlBoolean m_IsRelative
 Flag indicating whether the pose is relative.
 
EcXmlString m_ManipName
 The manipulator name of the reference manipulator.
 
EcXmlString m_RoleName
 The role name of the reference manipulator.
 
EcXmlU32 m_LinkIndex
 The link index of the reference link.
 
EcXmlString m_NamedFrame
 The named frame of the reference link (optional)
 
EcXmlBoolean m_OrientationReference
 Flag indicating whether orientation is relative to a different link.
 
EcXmlString m_OrientationManipName
 The manipulator name of the orientation reference manipulator.
 
EcXmlString m_OrientationRoleName
 The role name of the orientation reference manipulator.
 
EcXmlU32 m_OrientationLinkIndex
 The link index of the orientation reference link.
 
EcXmlString m_OrientationNamedFrame
 The named frame of the orientaion reference link (optional)
 
EcXmlU32 m_ManipIndex
 Deprecated. More...
 
EcXmlU32 m_OrientationManipIndex
 The manipulator index of the orientation reference manipulator.
 
- 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
 

Additional Inherited Members

- Public Types inherited from EcXmlCompoundType
enum  {
  READONLYCOMPONENT = 0,
  READONLYATTRIBUTE
}
 special-descriptor codes More...
 
- 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 ()
 
- 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
 

Detailed Description

The EcPose class EcPose is used to specified a 3D location (position and orientation) in space. It can be either relative or absolute (relative to system). If it's relative, it can be relative to a primary frame of a named frame of a link.

This class is a set of poses.

Examples:
ecCirclePathExampleDirection.cpp.

Definition at line 30 of file ecPose.h.

Member Function Documentation

EcBoolean EcPose::convertPoseUsingManipName ( const EcStringVector vec)
Parameters
vecmanipulator names vector
virtual const EcString& EcPose::namedFrame ( ) const
virtual

get the named frame to which the pose is relative. If empty or invalid, the pose is assumed to be relative to the primary frame of the link. The named frame is invalid if the link doesn't have the frame with this name.

virtual EcBoolean EcPose::offsetInSystem ( const EcManipulatorSystem system,
const EcManipulatorSystemState state,
EcCoordinateSystemTransformation offset 
) const
virtual

Calculate the offset in system coordinates. For non-relative pose, this is identical to offset().

Parameters
[in]systemThe system. This method will use the manipulator index or indices of the pose to access the required manipulator(s) in the given system.
[in]stateThe state of the system. This method will use the manipulator index or indices of the pose to access the required position state(s).
[out]offsetThe calculated offset in system.
Returns
True if successful (i.e. manipulator and link indices valid) or false otherwise
Examples:
ecCirclePathExampleDirection.cpp.
virtual EcBoolean EcPose::offsetInSystem ( const EcStatedSystem statedSystem,
EcCoordinateSystemTransformation offset 
) const
virtual

Calculate the offset in system coordinates. Overloaded for convenience. This will use the system and state in the stated system, equivalent to calling offsetInSystem(statedSystem.system(), statedSystem.state(), offset).

virtual EcBoolean EcPose::offsetInSystemWithExternalIndices ( const EcManipulatorSystem system,
const EcManipulatorSystemState state,
EcU32  posRefManipIndex,
EcU32  orientRefManipIndex,
EcCoordinateSystemTransformation offset 
) const
virtual

Calculate the offset in system coordinates. This uses the given manipulator indices instead of the ones inside the pose.

Parameters
[in]systemThe system. This method will use the manipulator index or indices of the pose to access the required manipulator(s) in the given system.
[in]stateThe state of the system. This method will use the manipulator index or indices of the pose to access the required position state(s).
[in]posRefManipIndexThe index of the manipulator that is used as reference for position relativeness.
[in]orientRefManipIndexThe index of the manipulator that is used as reference for orientation relativeness.
[out]offsetThe calculated offset in system.
Returns
True if successful (i.e. manipulator and link indices valid) or false otherwise
virtual EcU32 EcPose::orientationLinkIndex ( ) const
virtual

get the index of the link to which the pose's orientation is relative. Applicable only if orientationReference is true.

virtual const EcString& EcPose::orientationManipulatorName ( ) const
virtual

get the index of the manipulator to which the pose's orientation is relative. Applicable only if orientationReference is true.

virtual const EcString& EcPose::orientationNamedFrame ( ) const
virtual

get the named frame to which the pose's orientation is relative. If empty or invalid, the pose's orientation is assumed to be relative to the primary frame of the orientation link. Applicable only if orientationReference is true.

virtual EcBoolean EcPose::orientationReference ( ) const
virtual

Returns true if the orientation of the relative pose should be defined relative to a different reference link than the position. For example, when picking a drill bit (or tubular object), one may want to specify the pickup position relative to the object itself while the specifying the orientation relative to the object magazine. This way, the pickup motion is the same regardless of the orientation of the object. Returns false if both position and orientation are relative to the same reference link.

virtual const EcString& EcPose::orientationRoleName ( ) const
virtual

get the role name of the orienation reference manipulator. If this is specified (i.e. not empty), it will be used to determine the manipulator index of the orienation reference manipulator, instead of orientationManipulatorIndex()

virtual const EcString& EcPose::roleName ( ) const
virtual

get the role name of the reference manipulator. If this is specified (i.e. not empty), it will be used to determine the manipulator index of the reference manipulator, instead of manipulatorIndex()

virtual EcBoolean EcPose::setIsRelativeFromSystem ( const EcStatedSystem statedSystem,
EcBoolean  value 
)
virtual

set isRelative flag to the desired value while keeping the pose stationary in system coordinates by changing the offset

virtual EcBoolean EcPose::setOffsetFromSystem ( const EcManipulatorSystem system,
const EcManipulatorSystemState state,
const EcCoordinateSystemTransformation offset 
)
virtual

calculate the relative offset from the offset in the system coordinates and set it as the offset for the pose.

Parameters
[in]systemThe system. This method will use the manipulator index or indices of the pose to access the required manipulator(s) in the given system.
[in]stateThe state. This method will use the manipulator index or indices of the pose to access the required position state(s).
[in]offsetThe offset in system.
Returns
True if successful (i.e. manipulator and link indices valid) or false otherwise
virtual EcBoolean EcPose::setOffsetFromSystem ( const EcStatedSystem statedSystem,
const EcCoordinateSystemTransformation offset 
)
virtual

calculate the relative offset from the offset in the system coordinates and set it as the offset for the pose. Overloaded for convenience. This will use the system and state in the stated system, equivalent to calling setOffsetFromSystem(statedSystem.system(), statedSystem.state(), offset).

virtual EcBoolean EcPose::setOffsetFromSystemWithExternalIndices ( const EcManipulatorSystem system,
const EcManipulatorSystemState state,
EcU32  posRefManipIndex,
EcU32  orientRefManipIndex,
const EcCoordinateSystemTransformation offset 
)
virtual

calculate the relative offset from the offset in the system coordinates and set it as the offset for the pose. This uses the given manipulator indices instead of the ones inside the pose.

Parameters
[in]systemThe system. This method will use the manipulator index or indices of the pose to access the required manipulator(s) in the given system.
[in]stateThe state. This method will use the manipulator index or indices of the pose to access the required position state(s).
[in]posRefManipIndexThe index of the manipulator that is used as reference for position relativeness.
[in]orientRefManipIndexThe index of the manipulator that is used as reference for orientation relativeness.
[in]offsetThe offset in system.
Returns
True if successful (i.e. manipulator and link indices valid) or false otherwise
virtual void EcPose::setOrientationLinkIndex ( EcU32  value)
virtual

set the index of the link to which the pose's orientation is relative. Applicable only if orientationReference is true.

void EcPose::setOrientationManipulatorName ( const EcString value)

set the index of the manipulator to which the pose's orientation is relative. Applicable only if orientationReference is true.

virtual EcBoolean EcPose::setOrientationReferenceFromSystem ( const EcStatedSystem statedSystem,
EcBoolean  value 
)
virtual

set orientationReference flag to the desired value while keeping the pose stationary in system coordinates by changing the offset

Member Data Documentation

EcXmlU32 EcPose::m_ManipIndex
protected

Deprecated.

The manipulator index of the reference manipulator

Definition at line 380 of file ecPose.h.


The documentation for this class was generated from the following file: