Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
tesseract_common::AllowedCollisionMatrix Class Reference

#include <allowed_collision_matrix.h>

Collaboration diagram for tesseract_common::AllowedCollisionMatrix:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< AllowedCollisionMatrix >
 
using ConstPtr = std::shared_ptr< const AllowedCollisionMatrix >
 

Public Member Functions

 AllowedCollisionMatrix ()=default
 
virtual ~AllowedCollisionMatrix ()=default
 
 AllowedCollisionMatrix (const AllowedCollisionMatrix &)=default
 
AllowedCollisionMatrixoperator= (const AllowedCollisionMatrix &)=default
 
 AllowedCollisionMatrix (AllowedCollisionMatrix &&)=default
 
AllowedCollisionMatrixoperator= (AllowedCollisionMatrix &&)=default
 
virtual void addAllowedCollision (const std::string &link_name1, const std::string &link_name2, const std::string &reason)
 Disable collision between two collision objects. More...
 
const AllowedCollisionEntriesgetAllAllowedCollisions () const
 Get all of the entries in the allowed collision matrix. More...
 
virtual void removeAllowedCollision (const std::string &link_name1, const std::string &link_name2)
 Remove disabled collision pair from allowed collision matrix. More...
 
virtual void removeAllowedCollision (const std::string &link_name)
 Remove disabled collision for any pair with link_name from allowed collision matrix. More...
 
virtual bool isCollisionAllowed (const std::string &link_name1, const std::string &link_name2) const
 This checks if two links are allowed to be in collision. More...
 
void clearAllowedCollisions ()
 Clears the list of allowed collisions, so that no collision will be allowed. More...
 
void insertAllowedCollisionMatrix (const AllowedCollisionMatrix &acm)
 Inserts an allowable collision matrix ignoring duplicate pairs. More...
 
bool operator== (const AllowedCollisionMatrix &rhs) const
 
bool operator!= (const AllowedCollisionMatrix &rhs) const
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

AllowedCollisionEntries lookup_table_
 

Friends

class boost::serialization::access
 
std::ostream & operator<< (std::ostream &os, const AllowedCollisionMatrix &acm)
 

Member Typedef Documentation

◆ ConstPtr

◆ Ptr

Constructor & Destructor Documentation

◆ AllowedCollisionMatrix() [1/3]

tesseract_common::AllowedCollisionMatrix::AllowedCollisionMatrix ( )
default

◆ ~AllowedCollisionMatrix()

virtual tesseract_common::AllowedCollisionMatrix::~AllowedCollisionMatrix ( )
virtualdefault

◆ AllowedCollisionMatrix() [2/3]

tesseract_common::AllowedCollisionMatrix::AllowedCollisionMatrix ( const AllowedCollisionMatrix )
default

◆ AllowedCollisionMatrix() [3/3]

tesseract_common::AllowedCollisionMatrix::AllowedCollisionMatrix ( AllowedCollisionMatrix &&  )
default

Member Function Documentation

◆ addAllowedCollision()

virtual void tesseract_common::AllowedCollisionMatrix::addAllowedCollision ( const std::string &  link_name1,
const std::string &  link_name2,
const std::string &  reason 
)
inlinevirtual

Disable collision between two collision objects.

Parameters
obj1Collision object name
obj2Collision object name
reasonThe reason for disabling collison

◆ clearAllowedCollisions()

void tesseract_common::AllowedCollisionMatrix::clearAllowedCollisions ( )
inline

Clears the list of allowed collisions, so that no collision will be allowed.

◆ getAllAllowedCollisions()

const AllowedCollisionEntries & tesseract_common::AllowedCollisionMatrix::getAllAllowedCollisions ( ) const
inline

Get all of the entries in the allowed collision matrix.

Returns
AllowedCollisionEntries an unordered map containing all allowed collision entries. The keys of the unordered map are a std::pair of the link names in the allowed collision pair.

◆ insertAllowedCollisionMatrix()

void tesseract_common::AllowedCollisionMatrix::insertAllowedCollisionMatrix ( const AllowedCollisionMatrix acm)
inline

Inserts an allowable collision matrix ignoring duplicate pairs.

Parameters
acmACM to be inserted

◆ isCollisionAllowed()

virtual bool tesseract_common::AllowedCollisionMatrix::isCollisionAllowed ( const std::string &  link_name1,
const std::string &  link_name2 
) const
inlinevirtual

This checks if two links are allowed to be in collision.

Parameters
link_name1First link name
link_name2Second link anme
Returns
True if allowed to be in collision, otherwise false

◆ operator!=()

bool tesseract_common::AllowedCollisionMatrix::operator!= ( const AllowedCollisionMatrix rhs) const

◆ operator=() [1/2]

AllowedCollisionMatrix & tesseract_common::AllowedCollisionMatrix::operator= ( AllowedCollisionMatrix &&  )
default

◆ operator=() [2/2]

AllowedCollisionMatrix & tesseract_common::AllowedCollisionMatrix::operator= ( const AllowedCollisionMatrix )
default

◆ operator==()

bool tesseract_common::AllowedCollisionMatrix::operator== ( const AllowedCollisionMatrix rhs) const

◆ removeAllowedCollision() [1/2]

virtual void tesseract_common::AllowedCollisionMatrix::removeAllowedCollision ( const std::string &  link_name)
inlinevirtual

Remove disabled collision for any pair with link_name from allowed collision matrix.

Parameters
link_nameCollision object name

◆ removeAllowedCollision() [2/2]

virtual void tesseract_common::AllowedCollisionMatrix::removeAllowedCollision ( const std::string &  link_name1,
const std::string &  link_name2 
)
inlinevirtual

Remove disabled collision pair from allowed collision matrix.

Parameters
obj1Collision object name
obj2Collision object name

◆ serialize()

template<class Archive >
void tesseract_common::AllowedCollisionMatrix::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const AllowedCollisionMatrix acm 
)
friend

Member Data Documentation

◆ lookup_table_

AllowedCollisionEntries tesseract_common::AllowedCollisionMatrix::lookup_table_
private

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