bindings/python/parsers/mjcf/geometry.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2022 CNRS INRIA
3 //
4 
7 
8 #include <boost/python.hpp>
9 
10 namespace pinocchio
11 {
12  namespace python
13  {
14 
15  namespace bp = boost::python;
16 
17  GeometryModel
18  buildGeomFromMJCF(Model & model, const std::string & filename, const GeometryType & type)
19  {
20  GeometryModel geometry_model;
22  return geometry_model;
23  }
24 
26  Model & model,
27  const std::string & filename,
28  const GeometryType & type,
29  ::hpp::fcl::MeshLoaderPtr & meshLoader)
30  {
31  GeometryModel geometry_model;
32  ::pinocchio::mjcf::buildGeom(model, filename, type, geometry_model, meshLoader);
33  return geometry_model;
34  }
35 
37  {
38  bp::def(
39  "buildGeomFromMJCF",
40  static_cast<GeometryModel (*)(Model &, const std::string &, const GeometryType &)>(
42  bp::args("model", "mjcf_filename", "geom_type"),
43  "Parse the Mjcf file given as input looking for the geometry of the given input model and\n"
44  "return a GeometryModel containing either the collision geometries "
45  "(GeometryType.COLLISION) or the visual geometries (GeometryType.VISUAL).\n"
46  "Parameters:\n"
47  "\tmodel: model of the robot\n"
48  "\tfilename: path to the mjcf file containing the model of the robot\n"
49  "\tgeom_type: type of geometry to extract from the mjcf file (either the VISUAL for "
50  "display or the COLLISION for collision detection).\n");
51 
52  bp::def(
53  "buildGeomFromMJCF",
54  static_cast<GeometryModel (*)(
55  Model &, const std::string &, const GeometryType &, ::hpp::fcl::MeshLoaderPtr &)>(
57  bp::args("model", "mjcf_filename", "geom_type", "mesh_loader"),
58  "Parse the Mjcf file given as input looking for the geometry of the given input model and\n"
59  "return a GeometryModel containing either the collision geometries "
60  "(GeometryType.COLLISION) or the visual geometries (GeometryType.VISUAL).\n"
61  "Parameters:\n"
62  "\tmodel: model of the robot\n"
63  "\tfilename: path to the mjcf file containing the model of the robot\n"
64  "\tgeom_type: type of geometry to extract from the mjcf file (either the VISUAL for "
65  "display or the COLLISION for collision detection).\n"
66  "\tmesh_loader: an hpp-fcl mesh loader (to load only once the related geometries).\n");
67  }
68  } // namespace python
69 } // namespace pinocchio
boost::python
mjcf.hpp
simulation-pendulum.type
type
Definition: simulation-pendulum.py:18
filename
filename
python
mjcf.hpp
pinocchio::mjcf::buildGeom
GeometryModel & buildGeom(ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::string &filename, const GeometryType type, GeometryModel &geom_model, ::hpp::fcl::MeshLoaderPtr mesh_loader=::hpp::fcl::MeshLoaderPtr())
Build The GeometryModel from a Mjcf file.
pinocchio::python::buildGeomFromMJCF
GeometryModel buildGeomFromMJCF(Model &model, const std::string &filename, const GeometryType &type)
Definition: bindings/python/parsers/mjcf/geometry.cpp:18
pinocchio::GeometryType
GeometryType
Definition: multibody/geometry-object.hpp:24
pinocchio::GeometryModel
Definition: multibody/geometry.hpp:50
pinocchio::ModelTpl
Definition: context/generic.hpp:20
pinocchio::python::exposeMJCFGeom
void exposeMJCFGeom()
Definition: bindings/python/parsers/mjcf/geometry.cpp:36
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1116
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Wed Jun 19 2024 02:41:13