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

Holds a map describing which collision pairs should be excluded. More...

#include <ecSystemCollisionExclusionMap.h>

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

Public Member Functions

 EcSystemCollisionExclusionMap ()
 default constructor
 
virtual ~EcSystemCollisionExclusionMap ()
 destructor
 
 EcSystemCollisionExclusionMap (const EcSystemCollisionExclusionMap &orig)
 copy constructor
 
EcSystemCollisionExclusionMapoperator= (const EcSystemCollisionExclusionMap &orig)
 assignment operator
 
EcBoolean operator== (const EcSystemCollisionExclusionMap &orig) const
 equality operator
 
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 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 EcXmlU32SetexcludedManipulators () const
 get the list of manipulators to be excluded from collision calculations
 
virtual void setExcludedManipulators (const EcXmlU32Set &value)
 set the list of manipulators to be excluded from collision calculations
 
virtual const EcXmlU32U32SetMapmanipulatorExclusionMap () const
 get the map for collision exclusion at manipulator level
 
virtual void setManipulatorExclusionMap (const EcXmlU32U32SetMap &value)
 set the map for collision exclusion at manipulator level
 
virtual const EcXmlManipLinkidU32SetMaplinkManipulatorExclusionMap () const
 get the map for collision exclusion between links and manipulators
 
virtual void setLinkManipulatorExclusionMap (const EcXmlManipLinkidU32SetMap &value)
 set the map for collision exclusion between links and manipulators
 
virtual const EcXmlManipLinkidManipLinkIdSetMaplinkExclusionMap () const
 get the map for collision exclusion between links and links
 
virtual void setLinkExclusionMap (const EcXmlManipLinkidManipLinkIdSetMap &value)
 set the map for collision exclusion between links and links
 
virtual EcBoolean excludeLinkCollisionCandidate (EcU32 manip1Index, const EcString &link1Id, EcU32 manip2Index, const EcString &link2Id)
 
virtual EcBoolean excludeLinkCollisionCandidates (EcU32 manip1Index, const EcString &link1Id, EcU32 manip2Index)
 
virtual EcBoolean excludeManipulatorCollisionCandidates (EcU32 manip1Index, EcU32 manip2Index)
 
virtual void excludeManipulatorCollisionCandidates (EcU32 manipIndex)
 
virtual EcBoolean removeLinkCollisionExclusionCandidate (EcU32 manip1Index, const EcString &link1Id, EcU32 manip2Index, const EcString &link2Id)
 
virtual EcBoolean removeLinkCollisionExclusionCandidates (EcU32 manip1Index, const EcString &link1Id, EcU32 manip2Index)
 
virtual EcBoolean removeManipulatorCollisionExclusionCandidates (EcU32 manip1Index, EcU32 manip2Index)
 
virtual EcBoolean removeManipulatorCollisionExclusionCandidates (EcU32 manipIndex)
 
virtual EcBoolean buildMapFromSystem (const EcManipulatorSystem &system)
 build the internal data structure from the system. Must be called after calling excludeXXX() methods and before isLinkCollisionCandidateExcluded()
 
virtual EcBoolean trimMap (const EcManipulatorSystem &system)
 
virtual EcBoolean isLinkCollisionCandidateExcluded (EcU32 manip1Index, const EcString &link1Id, EcU32 manip2Index, const EcString &link2Id) const
 
virtual EcBoolean isLinkCollisionCandidateExcluded (EcU32 manip1Index, EcU32 link1Index, EcU32 manip2Index, EcU32 link2Index) const
 
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 EcBoolean isManipulatorCollisionExcluded (EcU32 manip1Index, EcU32 manip2Index) const
 query whether or not the collision between two manipulators is excluded.
 
virtual EcBoolean isLinktoManipulatorCollisionExcluded (EcU32 manip1Index, const EcString &link1Id, EcU32 manip2Index)
 query whether or not the collision between two manipulators is excluded.
 
virtual EcBoolean linkHasExclusionCandidate (EcU32 manip1Index, const EcString &link1Id)
 returns true if the given link has any other collision exclusion mapping set
 
virtual EcBoolean manipulatorHasExclusionCandidate (EcU32 manip1Index)
 returns true if the given manipulator has any other collision exclusion mapping set
 
virtual void removeAllExclusionCandidates ()
 removes all the exclusion candidates set
 
virtual void shiftManipulatorIndices (EcU32 shiftValue)
 shift all the manipulator indices in the map by a given value. Used when merging two systems
 
virtual EcBoolean mergeWith (const EcSystemCollisionExclusionMap &other)
 merge operation
 
virtual void deleteManipulatorAndShift (EcU32 manipIndex)
 
virtual EcBoolean removeManipulator (EcU32 manipIndex)
 remove all the collision exclusions related to a given manipulator index
 
virtual EcBoolean dataChanged (const EcSystemCollisionExclusionMap &other) const
 
- 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 EcSystemCollisionExclusionMap nullObject ()
 get a null object
 

Protected Member Functions

virtual EcBoolean convertToManipulatorLinkIndex (const EcIndividualManipulatorVector &manips, const EcManipulatorLinkIdentifier &manipLinkId, EcManipulatorLinkIndex &manipLinkIndex) const
 
virtual EcBoolean obtainManipulatorLinkIndices (const EcIndividualManipulatorVector &manips, EcU32 manipIndex, std::vector< EcManipulatorLinkIndex > &manipLinkIndices) const
 
virtual void conditionallyShiftManipulatorIndices (EcU32 manipIndex, EcInt32 shiftValue)
 shift the manipulator indices that are greater or equal to manipIndex by a given value.
 
- 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

EcXmlU32Set m_ExcludedManips
 the list of manipulators to be excluded from collision calculations
 
EcXmlU32U32SetMap m_XmlManipExclusionMap
 map for excluding collision between all links of manipulators
 
EcXmlManipLinkidU32SetMap m_XmlLinkManipExclusionMap
 map for excluding collision between a link of one manipulator and all links of another
 
EcXmlManipLinkidManipLinkIdSetMap m_XmlLinkLinkExclusionMap
 map for excluding collision between two links of two different manipulators
 
EcXmlU32 m_UpdateCounter
 
std::map< EcManipulatorLinkIndex, std::set< EcU32 > > m_LinkManipExclusionMap
 
std::map< EcManipulatorLinkIndex, std::set< EcManipulatorLinkIndex > > m_LinkLinkExclusionMap
 map for excluding collision between two links (using indices) of two different manipulators
 
- 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 map describing which collision pairs should be excluded.

Holds a map describing which collision pairs between links of different manipulators should be excluded.

Author
Chalongrath Pholsiri

Definition at line 37 of file ecSystemCollisionExclusionMap.h.

Member Function Documentation

virtual EcBoolean EcSystemCollisionExclusionMap::convertToManipulatorLinkIndex ( const EcIndividualManipulatorVector manips,
const EcManipulatorLinkIdentifier manipLinkId,
EcManipulatorLinkIndex manipLinkIndex 
) const
protectedvirtual

convert an EcManipulatorLinkIdentifier object to an EcManipulatorLinkIndex object.

Returns
True if successful or false if the manipulator index or link string identifier is invalid.
virtual EcBoolean EcSystemCollisionExclusionMap::dataChanged ( const EcSystemCollisionExclusionMap other) const
virtual

an inexpensive way to determine whether the data inside this map compared to the other may have changed by comparing the update counters of the two.

Returns
True if the two counters are not the same value (i.e. either this map or the other map may have changed) or false otherwise. Note that even if it returns true, the internal data between the two is not guaranteed to be different.
virtual void EcSystemCollisionExclusionMap::deleteManipulatorAndShift ( EcU32  manipIndex)
virtual

delete a manipulator: remove all the collision exclusions related to it and shift indices of all the manipulators with index greater than the deleted manipulator. This should be used for deleting a manipulator from the system.

Parameters
[in]manipIndexThe index of manipulator to be deleted.
virtual EcBoolean EcSystemCollisionExclusionMap::excludeLinkCollisionCandidate ( EcU32  manip1Index,
const EcString link1Id,
EcU32  manip2Index,
const EcString link2Id 
)
virtual

exclude collision between two links of two different manipulators

Parameters
manip1IndexThe index of manipulator of link 1
link1IdThe identifier of link 1
manip2IndexThe index of manipulator of link 2
link2IdThe identifier of link 2
Returns
False if manip1Index and manip2Index are identical or true otherwise.
virtual EcBoolean EcSystemCollisionExclusionMap::excludeLinkCollisionCandidates ( EcU32  manip1Index,
const EcString link1Id,
EcU32  manip2Index 
)
virtual

exclude collisions between a link of one manipulator to all links of another manipulator

Parameters
manip1IndexThe index of manipulator of link 1
link1IdThe identifier of link 1
manip2IndexThe index of manipulator 2
Returns
False if manip1Index and manip2Index are identical or true otherwise.
virtual EcBoolean EcSystemCollisionExclusionMap::excludeManipulatorCollisionCandidates ( EcU32  manip1Index,
EcU32  manip2Index 
)
virtual

exclude collisions among all links of two manipulators

Parameters
manip1IndexThe index of manipulator 1
manip2IndexThe index of manipulator 2
Returns
False if manip1Index and manip2Index are identical or true otherwise.
virtual void EcSystemCollisionExclusionMap::excludeManipulatorCollisionCandidates ( EcU32  manipIndex)
virtual

exclude collisions of all links of the given manipulator with everything in the system

Parameters
manipIndexThe index of manipulator
virtual EcBoolean EcSystemCollisionExclusionMap::isLinkCollisionCandidateExcluded ( EcU32  manip1Index,
const EcString link1Id,
EcU32  manip2Index,
const EcString link2Id 
) const
virtual

query whether or not the collision between two links is excluded by link identifiers.

Parameters
manip1IndexThe index of manipulator of link 1
link1IdThe identifier of link 1
manip2IndexThe index of manipulator of link 2
link2IdThe identifier of link 2
Returns
True if the collision between the two links is excluded.
virtual EcBoolean EcSystemCollisionExclusionMap::isLinkCollisionCandidateExcluded ( EcU32  manip1Index,
EcU32  link1Index,
EcU32  manip2Index,
EcU32  link2Index 
) const
virtual

query whether or not the collision between two links is excluded by indices. Only valid after buildMapFromSystem has been called.

Parameters
manip1IndexThe index of manipulator of link 1
link1IndexThe index of link 1
manip2IndexThe index of manipulator of link 2
link2IndexThe index of link 2
Returns
True if the collision between the two links is excluded.
virtual EcBoolean EcSystemCollisionExclusionMap::obtainManipulatorLinkIndices ( const EcIndividualManipulatorVector manips,
EcU32  manipIndex,
std::vector< EcManipulatorLinkIndex > &  manipLinkIndices 
) const
protectedvirtual

given a manipulator index, obtain a vector of EcManipulatorLinkIndex objects representing all the links in that manipulator

Returns
True if successful or false if the manipulator index is invalid
virtual EcBoolean EcSystemCollisionExclusionMap::removeLinkCollisionExclusionCandidate ( EcU32  manip1Index,
const EcString link1Id,
EcU32  manip2Index,
const EcString link2Id 
)
virtual

remove collision exclusion between two links of two different manipulators

Parameters
manip1IndexThe index of manipulator of link 1
link1IdThe identifier of link 1
manip2IndexThe index of manipulator of link 2
link2IdThe identifier of link 2
Returns
False if manip1Index and manip2Index are identical or if the exclusion doesn't exist. Otherwise, true.
virtual EcBoolean EcSystemCollisionExclusionMap::removeLinkCollisionExclusionCandidates ( EcU32  manip1Index,
const EcString link1Id,
EcU32  manip2Index 
)
virtual

remove collision exclusions between a link of one manipulator to all links of another manipulator

Parameters
manip1IndexThe index of manipulator of link 1
link1IdThe identifier of link 1
manip2IndexThe index of manipulator 2
Returns
False if manip1Index and manip2Index are identical or if the exclusion doesn't exist. Otherwise, true.
virtual EcBoolean EcSystemCollisionExclusionMap::removeManipulatorCollisionExclusionCandidates ( EcU32  manip1Index,
EcU32  manip2Index 
)
virtual

remove collision exclusions among all links of two manipulators

Parameters
manip1IndexThe index of manipulator 1
manip2IndexThe index of manipulator 2
Returns
False if manip1Index and manip2Index are identical or if the exclusion doesn't exist. Otherwise, true.
virtual EcBoolean EcSystemCollisionExclusionMap::removeManipulatorCollisionExclusionCandidates ( EcU32  manipIndex)
virtual

remove collision exclusions among all links of the given manipulator with everything in the system

Parameters
manipIndexThe index of manipulator
Returns
False if the exclusion doesn't exist. Otherwise, true.
virtual const EcToken& EcSystemCollisionExclusionMap::token ( ) const
virtual

gets the xml token used for writing out.

Implements EcXmlObject.

virtual EcBoolean EcSystemCollisionExclusionMap::trimMap ( const EcManipulatorSystem system)
virtual

Sometimes, the collision exclusion map becomes cluttered with invalid manipulator indices and/or link labels. This may happen when a map is copied from one system to another. trimMap method will remove invalid entries within this map by checking the manipulators and their links in the given system.

Returns
True if any entry in the map has been trimmed or false otherwise.

Member Data Documentation

std::map< EcManipulatorLinkIndex, std::set< EcU32 > > EcSystemCollisionExclusionMap::m_LinkManipExclusionMap
protected

non-xml map for excluding collision between a link (using index) of one manipulator and alllinks of another

Definition at line 401 of file ecSystemCollisionExclusionMap.h.

EcXmlU32 EcSystemCollisionExclusionMap::m_UpdateCounter
protected

the counter increments every time there's a change in the map Can be used as an efficient way to determine if there's a change between two maps

Definition at line 397 of file ecSystemCollisionExclusionMap.h.


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