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

Holds a description of all end effectors on a manipulator. More...

#include <ecEndEffectorSet.h>

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

Public Member Functions

 EcEndEffectorSet ()
 default constructor
 
virtual ~EcEndEffectorSet ()
 destructor
 
 EcEndEffectorSet (const EcEndEffectorSet &orig)
 copy constructor
 
EcEndEffectorSetoperator= (const EcEndEffectorSet &orig)
 assignment operator
 
EcBoolean operator== (const EcEndEffectorSet &orig) const
 equality operator
 
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 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 EcXmlStringlabel () const
 gets the label
 
virtual void setLabel (const EcXmlString &label)
 sets the label
 
virtual const EcEndEffectorVectorendEffectors () const
 gets vector of general end effectors
 
virtual void setEndEffectors (const EcEndEffectorVector &endEffectors)
 sets vector of general end effectors
 
virtual void setEndEffectorsSizeToZero ()
 sets size of general end effectors to zero
 
virtual void addEndEffector (const EcEndEffector &endEffector)
 pushes back a single end effector
 
virtual void removeEndEffector (const EcU32 index)
 remove a single end effector
 
virtual EcBoolean exchange (EcU32 index, const EcEndEffector &endEffector)
 exchange an end effector with a new one, if the old one exists
 
EcBoolean swap (EcU32 srcIndex, EcU32 dstIndex)
 swap the endEffectors from srcIndex to dstIndex
 
virtual EcU32 size () const
 get the number of end effectors
 
virtual EcBoolean setRelativeLinkData (EcU32 endEffectorIndex, const EcEndEffectorRelativeLinkData &relData)
 sets relative link data
 
virtual const EcEndEffectorRelativeLinkDatarelativeLinkData (EcU32 endEffectorIndex) const
 gets relative link data
 
virtual const EcJacobianTooljacobianTool () const
 gets Jacobian tool
 
virtual void getHardErrorWeights (EcReArray &weights) const
 build a matrix of end-effector error weights for the hard constraints.
 
virtual void getSoftErrorWeights (EcReArray &weights) const
 build a matrix of end-effector error weights for the soft constraints.
 
virtual void getAllErrorWeights (EcReArray &weights) const
 build a matrix of end-effector error weights for all constraints.
 
virtual void getErrorWeights (const EcU32Vector &endEffectorIndices, EcReArray &weights) const
 build a matrix of end-effector error weights for the specified indices
 
virtual EcU32 hardDoc () const
 get the degrees of hard constraint
 
virtual EcU32 softDoc () const
 get the degrees of soft constraint
 
virtual EcU32 allDoc () const
 get the total degrees of constraint
 
virtual EcU32 doc (const EcU32Vector &endEffectorIndices) const
 get the degrees of freedom of all specified end effectors
 
virtual EcManipulatorEndEffectorVelocity hardCompatibleZeroVelocity () const
 create a compatible, zero end-effector velocity for hard constraints
 
virtual EcManipulatorEndEffectorVelocity softCompatibleZeroVelocity () const
 create a compatible, zero end-effector velocity for soft constraints
 
virtual EcManipulatorEndEffectorVelocity allCompatibleZeroVelocity () const
 create a compatible, zero end-effector velocity for all constraints
 
virtual EcManipulatorEndEffectorVelocity compatibleZeroVelocity (const EcU32Vector &endEffectorIndices) const
 create a compatible, zero end-effector velocity based on the indices given
 
virtual EcManipulatorEndEffectorForce hardCompatibleZeroForce () const
 create a compatible, zero end-effector force for the hard constraints
 
virtual EcManipulatorEndEffectorForce softCompatibleZeroForce () const
 create a compatible, zero end-effector force for the soft constraints
 
virtual EcManipulatorEndEffectorForce allCompatibleZeroForce () const
 create a compatible, zero end-effector force for all constraints
 
virtual EcManipulatorEndEffectorForce compatibleZeroForce (const EcU32Vector &endEffectorIndices) const
 create a compatible, zero end-effector force based on the indices given
 
virtual void setHardVelocityFromColumn (EcManipulatorEndEffectorVelocity &handVelocity, const EcReArray &handVelocityColumn) const
 set the end-effector data structure from a column array for hard constraints
 
virtual void setSoftVelocityFromColumn (EcManipulatorEndEffectorVelocity &handVelocity, const EcReArray &handVelocityColumn) const
 set the end-effector data structure from a column array for soft constraints
 
virtual void setAllVelocityFromColumn (EcManipulatorEndEffectorVelocity &handVelocity, const EcReArray &handVelocityColumn) const
 set the end-effector data structure from a column array for all constraints
 
virtual void setVelocityFromColumn (const EcU32Vector &endEffectorIndices, EcManipulatorEndEffectorVelocity &handVelocity, const EcReArray &handVelocityColumn) const
 
virtual EcBoolean getHardJacobian (const EcControlExpressionContainer *container, EcManipulatorJacobian &jacobian) const
 
virtual EcBoolean getSoftJacobian (const EcControlExpressionContainer *container, EcManipulatorJacobian &jacobian) const
 
virtual EcBoolean getAllJacobian (const EcControlExpressionContainer *container, EcManipulatorJacobian &jacobian) const
 
virtual EcBoolean getJacobian (const EcU32Vector &endEffectorIndices, const EcControlExpressionContainer *container, EcManipulatorJacobian &jacobian) const
 
virtual const EcU32VectorhardConstraintIndices () const
 gets the indices, in order, of the hard constraints
 
virtual const EcU32VectorsoftConstraintIndices () const
 gets the indices, in order, of the soft constraints
 
virtual const EcU32VectorallConstraintIndices () const
 gets the indices, in order, of the all constraints
 
virtual void setSpeedFactor (EcReal value)
 set the speed factor for all end-effectors in the set
 
virtual EcBoolean setSpeedFactor (EcU32 index, EcReal value)
 
virtual void setAccelerationFactor (EcReal value)
 set the acceleration factor for all end-effectors in the set
 
virtual EcBoolean setAccelerationFactor (EcU32 index, EcReal value)
 
virtual void setControlMode (const EcU32 mode)
 
virtual EcBoolean setControlMode (const EcU32 index, const EcU32 mode)
 set the control mode for the end-effector specified by index.
 
virtual void setFilteringActive (EcBoolean value)
 set whether filtering is active for all end-effectors in the set
 
virtual void setUsingSinglePass (EcBoolean value)
 set whether single pass control is being used for all end-effectors in the set
 
virtual EcBoolean setExternalOffsetPointer (EcU32 index, const EcCoordinateSystemTransformation *offset)
 
virtual EcBoolean setToolOffset (const EcU32 eeIndex, const EcCoordinateSystemTransformation &offset)
 Sets the tool offset in link primary frame for a given end-effector. More...
 
virtual EcBoolean getToolOffset (const EcU32 eeIndex, EcCoordinateSystemTransformation &offset) const
 Gets the tool offset in link primary frame for a given end-effector. More...
 
virtual EcBoolean setToolOffsetIndex (EcU32 eeIndex, EcU32 toolOffsetIndex)
 set tool offset index
 
virtual EcBoolean getToolOffsetIndex (EcU32 eeIndex, EcU32 &toolOffsetIndex)
 get tool offset index
 
virtual EcInt32 setIsHardConstraint (const EcU32 eeIndex, const EcBoolean value)
 Set is hard constraint flag. More...
 
virtual EcBoolean setStoredDesiredPlacement (const EcSizeT &eeIndex, const EcEndEffectorPlacement &placement)
 set desired placement
 
virtual EcBoolean setFilteringActive (EcU32 index, EcBoolean value)
 set filtering of end-effector specified by index to be active or inactive
 
virtual EcBoolean canBecomeSoft () const
 
virtual void transformToSoft ()
 transform all the end effectors in this set that can become soft to soft constraints
 
virtual const EcTokentoken () const EC_OVERRIDE
 gets the xml token used for writing out. More...
 
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 void initializeSparsityMatrix (const EcControlExpressionContainer &container)
 Initializes sparsity matrix.
 
virtual const EcStringmanipulatorLabel () const
 gets manipulator label
 
virtual void setManipulatorLabel (const EcString &label)
 sets manipulator label
 
- 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 EcEndEffectorSet nullObject ()
 get a null link
 
static EcEndEffectorSet createDefaultFromManipulator (const EcIndividualManipulator &manipulator)
 create a default end-effector set from a manipulator
 

Protected Member Functions

virtual void trackHardAndSoftContstraints ()
 create vectors holding information on the hard and soft constraints
 
- 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_Label
 the label
 
EcEndEffectorVector m_EndEffectors
 a vector of general end effectors
 
EcU32Vector m_HardConstraintIndices
 a tracker for hard constraints
 
EcU32Vector m_SoftConstraintIndices
 a tracker for soft constraints
 
EcU32Vector m_AllConstraintIndices
 a tracker for all constraint indices
 
EcString m_ManipulatorLabel
 manipulator label – used by manipulator combination
 
EcJacobianTool m_JacobianTool
 utility Jacobian tool
 
- 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...
 
- 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

Holds a description of all end effectors on a manipulator.

A set of point and frame end effectors for a single manipulator.

Examples:
ecCollisionAvoidanceExample.cpp, and ecProgrammaticConstructionMain.cpp.

Definition at line 21 of file ecEndEffectorSet.h.

Member Function Documentation

virtual EcBoolean EcEndEffectorSet::canBecomeSoft ( ) const
virtual

return whether this end effector set can become soft, i.e. whether any of the underlying end effectors is hard and can become soft

virtual EcBoolean EcEndEffectorSet::getAllJacobian ( const EcControlExpressionContainer container,
EcManipulatorJacobian jacobian 
) const
virtual

calculate manipulator Jacobian for all constraints. If given a container, initialize the jacobian parameters.

virtual EcBoolean EcEndEffectorSet::getHardJacobian ( const EcControlExpressionContainer container,
EcManipulatorJacobian jacobian 
) const
virtual

calculate manipulator Jacobian for the hard constraints. If given a container, initialize the jacobian parameters.

virtual EcBoolean EcEndEffectorSet::getJacobian ( const EcU32Vector endEffectorIndices,
const EcControlExpressionContainer container,
EcManipulatorJacobian jacobian 
) const
virtual

calculate manipulator Jacobian from the specified indices. If given a container, initialize the jacobian parameters.

virtual EcBoolean EcEndEffectorSet::getSoftJacobian ( const EcControlExpressionContainer container,
EcManipulatorJacobian jacobian 
) const
virtual

calculate manipulator Jacobian for the soft constraints. If given a container, initialize the jacobian parameters.

virtual EcBoolean EcEndEffectorSet::getToolOffset ( const EcU32  eeIndex,
EcCoordinateSystemTransformation offset 
) const
virtual

Gets the tool offset in link primary frame for a given end-effector.

The method current support EcFramedBasedEndEffector and EcPointEndEffector.

Parameters
[in]eeIndexthe end-effector index
[in]valuethe new tool offset
Returns
True if the indices are valid and the EE type is supported.
virtual EcBoolean EcEndEffectorSet::setAccelerationFactor ( EcU32  index,
EcReal  value 
)
virtual

set the acceleration factor for the end-effector specified by index. Returns false if index is not valid or true otherwise.

virtual void EcEndEffectorSet::setControlMode ( const EcU32  mode)
virtual

set the control mode for all end-effectors in the set

virtual EcBoolean EcEndEffectorSet::setExternalOffsetPointer ( EcU32  index,
const EcCoordinateSystemTransformation offset 
)
virtual

set the external offset pointer for the end-effector specified by index Returns false if index is not valid or true otherwise.

virtual EcInt32 EcEndEffectorSet::setIsHardConstraint ( const EcU32  eeIndex,
const EcBoolean  value 
)
virtual

Set is hard constraint flag.

The method does nothing if the flag does not change.

Parameters
[in]eeIndexthe end-effector index
[in]valuetrue if hard constraint, false if soft constraint
Returns
-1 if the indices are invalid. 0 if the flag is the same. 1 if the flag is changed.
virtual EcBoolean EcEndEffectorSet::setSpeedFactor ( EcU32  index,
EcReal  value 
)
virtual

set the speed factor for the end-effector specified by index. Returns false if index is not valid or true otherwise.

virtual EcBoolean EcEndEffectorSet::setToolOffset ( const EcU32  eeIndex,
const EcCoordinateSystemTransformation offset 
)
virtual

Sets the tool offset in link primary frame for a given end-effector.

The method currently supports EcFramedBasedEndEffector and EcPointEndEffector. The method turns off using external tool offset and changes end-effector frame in the link primary frame directly.

Parameters
[in]eeIndexthe end-effector index
[in]valuethe new tool offset
Returns
True if the indices are valid and the EE type is supported.
virtual void EcEndEffectorSet::setVelocityFromColumn ( const EcU32Vector endEffectorIndices,
EcManipulatorEndEffectorVelocity handVelocity,
const EcReArray handVelocityColumn 
) const
virtual

set the end-effector data structure from a column array using the end-effector indices provided.

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

gets the xml token used for writing out.

Implements EcXmlObject.


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