bindings/python/parsers/sample-models.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2020 CNRS INRIA
3 //
4 
5 #include "pinocchio/parsers/sample-models.hpp"
6 
7 #include <boost/python.hpp>
8 
9 namespace pinocchio
10 {
11  namespace python
12  {
13  namespace bp = boost::python;
14 
16  {
17  Model model;
19  return model;
20  }
21 
23  {
24  Model model;
25  buildModels::humanoidRandom(model,usingFF);
26  return model;
27  }
28 
30  {
31  Model model;
33  return model;
34  }
35 
36 #ifdef PINOCCHIO_WITH_HPP_FCL
37  GeometryModel buildSampleGeometryModelManipulator(const Model & model)
38  {
39  GeometryModel geom;
40  buildModels::manipulatorGeometries(model,geom);
41  return geom;
42  }
43 #endif
44 
46  {
47  Model model;
48  buildModels::humanoid(model);
49  return model;
50  }
51 
53  {
54  Model model;
55  buildModels::humanoid(model,usingFF);
56  return model;
57  }
58 
59 #ifdef PINOCCHIO_WITH_HPP_FCL
60  GeometryModel buildSampleGeometryModelHumanoid(const Model & model)
61  {
62  GeometryModel geom;
63  buildModels::humanoidGeometries(model,geom);
64  return geom;
65  }
66 #endif
67 
69  {
70  bp::def("buildSampleModelHumanoidRandom",
72  "Generate a (hard-coded) model of a humanoid robot with 6-DOF limbs and random joint placements.\nOnly meant for unit tests."
73  );
74 
75  bp::def("buildSampleModelHumanoidRandom",
77  bp::args("using_free_flyer"),
78  "Generate a (hard-coded) model of a humanoid robot with 6-DOF limbs and random joint placements.\nOnly meant for unit tests."
79  );
80 
81  bp::def("buildSampleModelManipulator",
83  "Generate a (hard-coded) model of a simple manipulator."
84  );
85 
86 #ifdef PINOCCHIO_WITH_HPP_FCL
87  bp::def("buildSampleGeometryModelManipulator",
88  static_cast <GeometryModel (*) (const Model&)> (pinocchio::python::buildSampleGeometryModelManipulator),
89  bp::args("model"),
90  "Generate a (hard-coded) geometry model of a simple manipulator."
91  );
92 #endif
93 
94  bp::def("buildSampleModelHumanoid",
96  "Generate a (hard-coded) model of a simple humanoid."
97  );
98 
99  bp::def("buildSampleModelHumanoid",
100  static_cast <Model (*) (bool)> (pinocchio::python::buildSampleModelHumanoid),
101  bp::args("using_free_flyer"),
102  "Generate a (hard-coded) model of a simple humanoid."
103  );
104 
105 #ifdef PINOCCHIO_WITH_HPP_FCL
106  bp::def("buildSampleGeometryModelHumanoid",
107  static_cast <GeometryModel (*) (const Model&)> (pinocchio::python::buildSampleGeometryModelHumanoid),
108  bp::args("model"),
109  "Generate a (hard-coded) geometry model of a simple humanoid."
110  );
111 #endif
112 
113  }
114  }
115 
116 } // namespace pinocchio::python
void humanoid(ModelTpl< Scalar, Options, JointCollectionTpl > &model, bool usingFF=true)
Create a 28-DOF kinematic chain of a floating humanoid robot.
Main pinocchio namespace.
Definition: timings.cpp:30
void humanoidRandom(ModelTpl< Scalar, Options, JointCollectionTpl > &model, bool usingFF=true)
Create a humanoid kinematic tree with 6-DOF limbs and random joint placements.
JointCollectionTpl & model
void manipulator(ModelTpl< Scalar, Options, JointCollectionTpl > &model)
Create a 6-DOF kinematic chain shoulder-elbow-wrist.


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:04