Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
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 <map>
32#include <vector>
33#include <Eigen/Geometry>
35
37
38namespace tesseract_collision
39{
40using ObjectPairKey = std::pair<std::string, std::string>;
41
50std::vector<ObjectPairKey> getCollisionObjectPairs(const std::vector<std::string>& active_links,
51 const std::vector<std::string>& static_links,
52 const IsContactAllowedFn& acm = nullptr);
53
59bool isLinkActive(const std::vector<std::string>& active, const std::string& name);
60
69bool isContactAllowed(const std::string& name1,
70 const std::string& name2,
72 bool verbose = false);
73
83 ContactResult& contact,
84 const std::pair<std::string, std::string>& key,
85 bool found);
86
95 const Eigen::Vector3d& center,
96 const Eigen::Vector3d& scale);
97
104void scaleVertices(tesseract_common::VectorVector3d& vertices, const Eigen::Vector3d& scale);
105
115bool writeSimplePlyFile(const std::string& path,
116 const tesseract_common::VectorVector3d& vertices,
117 const std::vector<Eigen::Vector3i>& vectices_color,
118 const Eigen::VectorXi& faces,
119 int num_faces);
120
129bool writeSimplePlyFile(const std::string& path,
130 const tesseract_common::VectorVector3d& vertices,
131 const Eigen::VectorXi& faces,
132 int num_faces);
133
142int loadSimplePlyFile(const std::string& path,
144 Eigen::VectorXi& faces,
145 bool triangles_only = false);
146
147} // namespace tesseract_collision
148
149#endif // TESSERACT_COLLISION_COMMON_H
std::vector< std::string > static_links
Definition: collision_core_unit.cpp:14
auto acm
Definition: collision_core_unit.cpp:33
double scale
Definition: collision_margin_data_unit.cpp:133
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: bullet_cast_bvh_manager.h:49
bool isContactAllowed(const std::string &name1, const std::string &name2, const IsContactAllowedFn &acm, bool verbose=false)
Determine if contact is allowed between two objects.
Definition: common.cpp:84
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:170
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:108
void scaleVertices(tesseract_common::VectorVector3d &vertices, const Eigen::Vector3d &center, const Eigen::Vector3d &scale)
Apply scaling to the geometry coordinates.
Definition: common.cpp:151
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:79
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:285
std::function< bool(const std::string &, const std::string &)> IsContactAllowedFn
Should return true if contact allowed, otherwise false.
Definition: types.h:59
std::vector< ObjectPairKey > getCollisionObjectPairs(const std::vector< std::string > &active_links, const std::vector< std::string > &static_links, const IsContactAllowedFn &acm=nullptr)
Get a vector of possible collision object pairs.
Definition: common.cpp:44
std::pair< std::string, std::string > ObjectPairKey
Definition: common.h:40
std::vector< Eigen::Vector3d > VectorVector3d
Definition: types.h:64
This data is intended only to be used internal to the collision checkers as a container and should no...
Definition: types.h:319
Tesseracts Collision Common Types.
std::vector< std::string > active_links
Definition: tesseract_environment_collision.cpp:112
std::shared_ptr< const Eigen::VectorXi > faces
Definition: tesseract_geometry_unit.cpp:16