5 #ifndef __pinocchio_python_geometry_object_hpp__
6 #define __pinocchio_python_geometry_object_hpp__
22 #if EIGENPY_VERSION_AT_MOST(2, 8, 1)
33 :
public boost::python::def_visitor<GeometryObjectPythonVisitor>
38 template<
class PyClass>
42 Converter::registration();
47 std::string,
const Eigen::Vector3d &,
bool,
const Eigen::Vector4d &, std::string,
50 "self",
"name",
"parent_joint",
"parent_frame",
"placement",
51 "collision_geometry",
"mesh_path",
"mesh_scale",
"override_material",
52 "mesh_color",
"mesh_texture_path",
"mesh_material"),
53 "Full constructor of a GeometryObject."))
57 std::string,
const Eigen::Vector3d &,
bool,
const Eigen::Vector4d &, std::string,
60 "self",
"name",
"parent_joint",
"placement",
"collision_geometry",
"mesh_path",
61 "mesh_scale",
"override_material",
"mesh_color",
"mesh_texture_path",
63 "Reduced constructor of a GeometryObject. This constructor does not require to specify "
64 "the parent frame index."))
68 std::string,
const Eigen::Vector3d &,
bool,
const Eigen::Vector4d &, std::string,
71 "self",
"name",
"parent_frame",
"parent_joint",
"collision_geometry",
"placement",
72 "mesh_path",
"mesh_scale",
"override_material",
"mesh_color",
79 std::string,
const Eigen::Vector3d &,
bool,
const Eigen::Vector4d &, std::string,
82 "self",
"name",
"parent_joint",
"collision_geometry",
"placement",
"mesh_path",
83 "mesh_scale",
"override_material",
"mesh_color",
"mesh_texture_path",
85 "Deprecated. Reduced constructor of a GeometryObject. This constructor does not "
87 .def(bp::init<const GeometryObject &>(
88 bp::args(
"self",
"otherGeometryObject"),
"Copy constructor"))
99 "The FCL CollisionGeometry associated to the given GeometryObject.")
106 "Position of geometry object in parent joint's frame.")
110 "Boolean that tells whether material information is stored inside the "
111 "given GeometryObject.")
116 "If true, no collision or distance check will be done between the "
117 "Geometry and any other geometry.")
120 "Perform a deep copy of this. It will create a copy of the underlying FCL geometry.")
125 "Material associated to the mesh (applied only if overrideMaterial is True)")
127 .def(bp::self == bp::self)
128 .def(bp::self != bp::self)
130 #ifdef PINOCCHIO_WITH_HPP_FCL
131 .def(
"CreateCapsule", &GeometryObjectPythonVisitor::maker_capsule)
132 .staticmethod(
"CreateCapsule")
133 #endif // PINOCCHIO_WITH_HPP_FCL
138 const bp::type_info
info = bp::type_id<CollisionGeometryPtr>();
139 const bp::converter::registration * reg = bp::converter::registry::query(
info);
142 bp::register_ptr_to_python<CollisionGeometryPtr>();
146 #ifdef PINOCCHIO_WITH_HPP_FCL
153 #endif // PINOCCHIO_WITH_HPP_FCL
157 if (!register_symbolic_link_to_registered_type<GeometryObject>())
159 bp::class_<GeometryObject>(
161 "A wrapper on a collision geometry including its parent "
162 "joint, parent frame, placement in parent joint's frame.\n\n",
168 #ifndef PINOCCHIO_PYTHON_NO_SERIALIZATION
174 #ifdef PINOCCHIO_WITH_HPP_FCL
175 if (!register_symbolic_link_to_registered_type<CollisionObject>())
177 bp::class_<CollisionObject, bp::bases<::hpp::fcl::CollisionObject>>(
178 "CollisionObject",
"A Pinocchio collision object derived from FCL CollisionObject.",
181 const std::shared_ptr<::hpp::fcl::CollisionGeometry> &,
182 bp::optional<const size_t, bool>>(
183 (bp::arg(
"self"), bp::arg(
"collision_geometry"),
185 bp::arg(
"compute_local_aabb") =
true),
188 const std::shared_ptr<::hpp::fcl::CollisionGeometry> &,
SE3,
189 bp::optional<const size_t, bool>>(
190 (bp::arg(
"self"), bp::arg(
"collision_geometry"), bp::arg(
"placement"),
192 bp::arg(
"compute_local_aabb") =
true),
197 if (!register_symbolic_link_to_registered_type<GeometryNoMaterial>())
200 bp::class_<GeometryNoMaterial>(
"GeometryNoMaterial", bp::init<>())
201 .def(bp::init<GeometryNoMaterial>());
204 if (!register_symbolic_link_to_registered_type<GeometryPhongMaterial>())
206 bp::class_<GeometryPhongMaterial>(
"GeometryPhongMaterial", bp::init<>())
207 .def(bp::init<GeometryPhongMaterial>())
208 .def(bp::init<Eigen::Vector4d, Eigen::Vector4d, double>())
214 "RGBA emission (ambient) color value of the mesh")
220 "RGBA specular value of the mesh")
223 "Shininess associated to the specular lighting model (between 0 and 1)");
225 if (!register_symbolic_link_to_registered_type<GeometryType>())
227 bp::enum_<GeometryType>(
"GeometryType")
238 #endif // ifndef __pinocchio_python_geometry_object_hpp__