Go to the documentation of this file.
5 #ifndef __pinocchio_python_geometry_model_hpp__
6 #define __pinocchio_python_geometry_model_hpp__
19 #if EIGENPY_VERSION_AT_MOST(2, 8, 1)
30 :
public boost::python::def_visitor<GeometryModelPythonVisitor>
34 template<
class PyClass>
37 cl.def(bp::init<>(bp::arg(
"self"),
"Default constructor"))
38 .def(bp::init<const GeometryModel &>(bp::args(
"self",
"other"),
"Copy constructor"))
42 "Number of geometries contained in the Geometry Model.")
50 bp::args(
"self",
"geometry_object"),
51 "Add a GeometryObject to a GeometryModel.\n"
53 "\tgeometry_object : a GeometryObject\n")
58 bp::args(
"self",
"geometry_object",
"model"),
59 "Add a GeometryObject to a GeometryModel and set its parent joint by reading its "
60 "value in the model.\n"
62 "\tgeometry_object : a GeometryObject\n"
63 "\tmodel : a Model of the system\n")
66 "Remove a GeometryObject. Remove also the collision pairs that contain the object.")
69 "Returns the index of a GeometryObject given by its name.")
72 "Checks if a GeometryObject given by its name exists.")
75 "Create a GeometryData associated to the current model.")
81 "Matrix relating the collision pair ID to a pair of two GeometryObject indexes.")
84 bp::args(
"self",
"collision_pair"),
85 "Add a collision pair given by the index of the two collision objects.")
88 "Add all collision pairs.\n"
89 "note : collision pairs between geometries having the same parent joint are not added.")
92 (bp::arg(
"self"), bp::arg(
"collision_map"), bp::arg(
"upper") =
true),
93 "Set the collision pairs from a given input array.\n"
94 "Each entry of the input matrix defines the activation of a given collision pair"
95 "(map[i,j] == True means that the pair (i,j) is active).")
98 bp::args(
"self",
"collision_pair"),
"Remove a collision pair.")
101 "Remove all collision pairs.")
104 bp::args(
"self",
"collision_pair"),
"Check if a collision pair exists.")
107 bp::args(
"self",
"collision_pair"),
"Return the index of a collision pair.")
109 .def(bp::self == bp::self)
110 .def(bp::self != bp::self);
121 if (!register_symbolic_link_to_registered_type<GeometryModel>())
123 bp::class_<GeometryModel>(
125 "Geometry model containing the collision or visual geometries associated to a model.",
132 #ifndef PINOCCHIO_PYTHON_NO_SERIALIZATION
143 #endif // ifndef __pinocchio_python_geometry_model_hpp__
GeometryModel clone() const
Create a deep copy of *this.
void visit(PyClass &cl) const
GeomIndex getGeometryId(const std::string &name) const
Return the index of a GeometryObject given by its name.
void addCollisionPair(const CollisionPair &pair)
Add a collision pair into the vector of collision_pairs. The method check before if the given Collisi...
pinocchio::GeomIndex GeomIndex
void removeGeometryObject(const std::string &name)
Remove a GeometryObject.
void addAllCollisionPairs()
Add all possible collision pairs.
bool existCollisionPair(const CollisionPair &pair) const
Check if a collision pair exists in collisionPairs. See also findCollisitionPair(const CollisionPair ...
void removeAllCollisionPairs()
Remove all collision pairs from collisionPairs. Same as collisionPairs.clear().
GeometryObjectVector geometryObjects
Vector of GeometryObjects used for collision computations.
#define EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION(...)
Set the Python method str and repr to use the overloading operator<<.
MatrixXi collisionPairMapping
Matrix relating the collision pair ID to a pair of two GeometryObject indexes.
PairIndex findCollisionPair(const CollisionPair &pair) const
Return the index of a given collision pair in collisionPairs.
Add the Python method copy to allow a copy of this by calling the copy constructor.
Index ngeoms
The number of GeometryObjects.
Add the Python method to extract the address of the underlying C++ object.
GeomIndex addGeometryObject(const GeometryObject &object, const ModelTpl< S2, O2, _JointCollectionTpl > &model)
Add a geometry object to a GeometryModel and set its parent joint.
CollisionPairVector collisionPairs
Vector of collision pairs.
static GeometryData createData(const GeometryModel &geomModel)
bool existGeometryName(const std::string &name) const
Check if a GeometryObject given by its name exists.
void removeCollisionPair(const CollisionPair &pair)
Remove if exists the CollisionPair from the vector collision_pairs.
void setCollisionPairs(const MatrixXb &collision_map, const bool upper=true)
Set the collision pairs from a given input array. Each entry of the input matrix defines the activati...
Main pinocchio namespace.
pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:29