common.h
Go to the documentation of this file.
1 
26 #ifndef TESSERACT_COLLISION_COMMON_H
27 #define TESSERACT_COLLISION_COMMON_H
28 
31 #include <vector>
32 #include <Eigen/Geometry>
34 
37 
38 namespace tesseract_collision
39 {
40 using ObjectPairKey = std::pair<std::string, std::string>;
41 
50 std::vector<ObjectPairKey>
51 getCollisionObjectPairs(const std::vector<std::string>& active_links,
52  const std::vector<std::string>& static_links,
53  const std::shared_ptr<const tesseract_common::ContactAllowedValidator>& validator = nullptr);
54 
60 bool isLinkActive(const std::vector<std::string>& active, const std::string& name);
61 
70 bool isContactAllowed(const std::string& name1,
71  const std::string& name2,
72  const std::shared_ptr<const tesseract_common::ContactAllowedValidator>& validator,
73  bool verbose = false);
74 
84  ContactResult& contact,
85  const std::pair<std::string, std::string>& key,
86  bool found);
87 
96  const Eigen::Vector3d& center,
97  const Eigen::Vector3d& scale);
98 
105 void scaleVertices(tesseract_common::VectorVector3d& vertices, const Eigen::Vector3d& scale);
106 
116 bool writeSimplePlyFile(const std::string& path,
117  const tesseract_common::VectorVector3d& vertices,
118  const std::vector<Eigen::Vector3i>& vectices_color,
119  const Eigen::VectorXi& faces,
120  int num_faces);
121 
130 bool writeSimplePlyFile(const std::string& path,
131  const tesseract_common::VectorVector3d& vertices,
132  const Eigen::VectorXi& faces,
133  int num_faces);
134 
143 int loadSimplePlyFile(const std::string& path,
145  Eigen::VectorXi& faces,
146  bool triangles_only = false);
147 
148 } // namespace tesseract_collision
149 
150 #endif // TESSERACT_COLLISION_COMMON_H
tesseract_collision::ContactTestData
This data is intended only to be used internal to the collision checkers as a container and should no...
Definition: types.h:328
tesseract_collision::isContactAllowed
bool isContactAllowed(const std::string &name1, const std::string &name2, const std::shared_ptr< const tesseract_common::ContactAllowedValidator > &validator, bool verbose=false)
Determine if contact is allowed between two objects.
Definition: common.cpp:85
contact_allowed_validator.h
types.h
Tesseracts Collision Forward Declarations.
tesseract_collision::isLinkActive
bool isLinkActive(const std::vector< std::string > &active, const std::string &name)
This will check if a link is active provided a list. If the list is empty the link is considered acti...
Definition: common.cpp:80
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
tesseract_collision::loadSimplePlyFile
int loadSimplePlyFile(const std::string &path, tesseract_common::VectorVector3d &vertices, Eigen::VectorXi &faces, bool triangles_only=false)
Loads a simple ply file given a path.
Definition: common.cpp:289
tesseract_collision::scaleVertices
void scaleVertices(tesseract_common::VectorVector3d &vertices, const Eigen::Vector3d &center, const Eigen::Vector3d &scale)
Apply scaling to the geometry coordinates.
Definition: common.cpp:155
tesseract_collision::getCollisionObjectPairs
std::vector< ObjectPairKey > getCollisionObjectPairs(const std::vector< std::string > &active_links, const std::vector< std::string > &static_links, const std::shared_ptr< const tesseract_common::ContactAllowedValidator > &validator=nullptr)
Get a vector of possible collision object pairs.
Definition: common.cpp:45
tesseract_collision::ObjectPairKey
std::pair< std::string, std::string > ObjectPairKey
Definition: common.h:40
tesseract_common::VectorVector3d
std::vector< Eigen::Vector3d > VectorVector3d
TESSERACT_COMMON_IGNORE_WARNINGS_POP
Definition: create_convex_hull.cpp:37
tesseract_collision
Definition: bullet_cast_bvh_manager.h:48
macros.h
tesseract_collision::processResult
ContactResult * processResult(ContactTestData &cdata, ContactResult &contact, const std::pair< std::string, std::string > &key, bool found)
processResult Processes the ContactResult based on the information in the ContactTestData
Definition: common.cpp:112
tesseract_collision::ContactResult
Definition: types.h:81
tesseract_collision::writeSimplePlyFile
bool writeSimplePlyFile(const std::string &path, const tesseract_common::VectorVector3d &vertices, const std::vector< Eigen::Vector3i > &vectices_color, const Eigen::VectorXi &faces, int num_faces)
Write a simple ply file given vertices and faces.
Definition: common.cpp:174


tesseract_collision
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:01:52