37 #include <pybind11/pybind11.h>
38 #include <pybind11/stl.h>
39 #include <pybind11/eigen.h>
51 m.doc() =
"contains collision detection, the world, and allowed collision matrices";
52 py::enum_<BodyType>(m,
"BodyType")
57 py::class_<Contact>(m,
"Contact")
64 .def_property_readonly(
"nearest_points",
74 py::class_<CollisionRequest>(m,
"CollisionRequest")
87 py::class_<CollisionResult>(m,
"CollisionResult")
97 py::class_<AllowedCollisionMatrix>(m,
"AllowedCollisionMatrix")
103 py::class_<World, WorldPtr>(m,
"World").def(py::init<>());
void setEntry(const std::string &name1, const std::string &name2, bool allowed)
Set an entry corresponding to a pair of elements.
@ ROBOT_LINK
A link on the robot.
@ ROBOT_ATTACHED
A body attached to a robot link.
@ WORLD_OBJECT
A body in the environment.
void def_collision_detection_bindings(py::module &m)
std::string group_name
The group name to check collisions for (optional; if empty, assume the complete robot)
bool verbose
Flag indicating whether information about detected collisions should be reported.
std::size_t max_cost_sources
When costs are computed, this value defines how many of the top cost sources should be returned.
bool contacts
If true, compute contacts. Otherwise only a binary collision yes/no is reported.
bool cost
If true, a collision cost is computed.
std::size_t max_contacts
Overall maximum number of contacts to compute.
std::function< bool(const CollisionResult &)> is_done
Function call that decides whether collision detection should stop.
std::size_t max_contacts_per_pair
Maximum number of contacts to compute per pair of bodies (multiple bodies may be in contact at differ...
bool distance
If true, compute proximity distance.
std::set< CostSource > cost_sources
These are the individual cost sources when costs are computed.
double distance
Closest distance between two bodies.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW void clear()
Clear a previously stored result.
bool collision
True if collision was found, false otherwise.
std::size_t contact_count
Number of contacts returned.