Go to the documentation of this file.
28 #include <boost/serialization/access.hpp>
29 #include <boost/serialization/nvp.hpp>
30 #include <boost/serialization/utility.hpp>
31 #if (BOOST_VERSION >= 107400) && (BOOST_VERSION < 107500)
32 #include <boost/serialization/library_version_type.hpp>
34 #include <boost/serialization/unordered_map.hpp>
44 if (entries_1.size() != entries_2.size())
47 for (
const auto& entry : entries_1)
50 auto cp = entries_2.find(entry.first);
51 if (cp == entries_2.end())
54 if (cp->second != entry.second)
62 for (
const auto& entry : entries)
70 const std::string& link_name2,
71 const std::string& reason)
89 if (it->first.first == link_name || it->first.second == link_name)
125 template <
class Archive>
134 os <<
"link=" << pair.first.first <<
" link=" << pair.first.second <<
" reason=" << pair.second <<
"\n";
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.
const AllowedCollisionEntries & getAllAllowedCollisions() const
Get all of the entries in the allowed collision matrix.
std::unordered_map< tesseract_common::LinkNamesPair, std::string, tesseract_common::PairHash > AllowedCollisionEntries
bool operator==(const AllowedCollisionMatrix &rhs) const
void serialize(Archive &ar, const unsigned int version)
void insertAllowedCollisionMatrix(const AllowedCollisionMatrix &acm)
Inserts an allowable collision matrix ignoring duplicate pairs.
void reserveAllowedCollisionMatrix(std::size_t size)
Reserve space for the internal data storage.
#define TESSERACT_SERIALIZE_ARCHIVES_INSTANTIATE(Type)
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
std::pair< std::string, std::string > LinkNamesPair
Common Tesseract Utility Functions.
bool operator!=(const AllowedCollisionMatrix &rhs) const
bool operator==(const AllowedCollisionEntries &entries_1, const AllowedCollisionEntries &entries_2)
AllowedCollisionEntries lookup_table_
AllowedCollisionMatrix()=default
virtual void removeAllowedCollision(const std::string &link_name1, const std::string &link_name2)
Remove disabled collision pair from allowed collision matrix.
#define TESSERACT_COMMON_IGNORE_WARNINGS_POP
void clearAllowedCollisions()
Clears the list of allowed collisions, so that no collision will be allowed.
LinkNamesPair makeOrderedLinkPair(const std::string &link_name1, const std::string &link_name2)
Create a pair of strings, where the pair.first is always <= pair.second.
Additional Boost serialization wrappers.
virtual void addAllowedCollision(const std::string &link_name1, const std::string &link_name2, const std::string &reason)
Disable collision between two collision objects.
std::ostream & operator<<(std::ostream &os, const AllowedCollisionMatrix &acm)
tesseract_common
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:01:40