5 #ifndef __pinocchio_python_geometry_model_hpp__ 6 #define __pinocchio_python_geometry_model_hpp__ 12 #include "pinocchio/multibody/geometry.hpp" 23 :
public boost::python::def_visitor< GeometryModelPythonVisitor >
28 template<
class PyClass>
32 .def(bp::init<>(bp::arg(
"self"),
"Default constructor"))
33 .add_property(
"ngeoms", &GeometryModel::ngeoms,
"Number of geometries contained in the Geometry Model.")
34 .add_property(
"geometryObjects",
35 &GeometryModel::geometryObjects,
"Vector of geometries objects.")
37 .def(
"addGeometryObject",
40 "Add a GeometryObject to a GeometryModel.\n" 42 "\tgeometry_object : a GeometryObject\n")
43 .def(
"addGeometryObject",
45 const Model &)>(&GeometryModel::addGeometryObject),
46 bp::args(
"self",
"geometry_object",
"model"),
47 "Add a GeometryObject to a GeometryModel and set its parent joint by reading its value in the model.\n" 49 "\tgeometry_object : a GeometryObject\n" 50 "\tmodel : a Model of the system\n")
52 &GeometryModel::getGeometryId,
54 "Returns the index of a GeometryObject given by its name.")
55 .def(
"existGeometryName",
56 &GeometryModel::existGeometryName,
58 "Checks if a GeometryObject given by its name exists.")
62 "Create a GeometryData associated to the current model.")
63 .add_property(
"collisionPairs",
64 &GeometryModel::collisionPairs,
65 "Vector of collision pairs.")
66 .def(
"addCollisionPair",&GeometryModel::addCollisionPair,
68 "Add a collision pair given by the index of the two collision objects.")
69 .def(
"addAllCollisionPairs",&GeometryModel::addAllCollisionPairs,
70 "Add all collision pairs.\n" 71 "note : collision pairs between geometries having the same parent joint are not added.")
72 .def(
"setCollisionPairs",
73 &GeometryModel::setCollisionPairs,
74 setCollisionPairs_overload(
bp::args(
"self",
"collision_map",
"upper"),
75 "Set the collision pairs from a given input array.\n" 76 "Each entry of the input matrix defines the activation of a given collision pair" 77 "(map[i,j] == True means that the pair (i,j) is active)."))
78 .def(
"removeCollisionPair",&GeometryModel::removeCollisionPair,
80 "Remove a collision pair.")
81 .def(
"removeAllCollisionPairs",&GeometryModel::removeAllCollisionPairs,
82 "Remove all collision pairs.")
83 .def(
"existCollisionPair",&GeometryModel::existCollisionPair,
85 "Check if a collision pair exists.")
86 .def(
"findCollisionPair", &GeometryModel::findCollisionPair,
88 "Return the index of a collision pair.")
90 .def(bp::self == bp::self)
91 .def(bp::self != bp::self)
103 bp::class_<GeometryModel>(
"GeometryModel",
104 "Geometry model containing the collision or visual geometries associated to a model.",
114 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(setCollisionPairs_overload,GeometryModel::setCollisionPairs,1,2)
121 #endif // ifndef __pinocchio_python_geometry_model_hpp__
void visit(PyClass &cl) const
JointDataTpl< Scalar, Options, JointCollectionTpl > createData(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through CreateData visitor to create a JointDataTpl.
Set the Python method str and repr to use the overloading operator<<.
static GeometryData createData(const GeometryModel &geomModel)
Add the Python method copy to allow a copy of this by calling the copy constructor.
Main pinocchio namespace.
pinocchio::GeomIndex GeomIndex
#define EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION(...)