bindings/python/multibody/sample-models.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2020 CNRS INRIA
3 //
4 
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;
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;
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(
71  "buildSampleModelHumanoidRandom",
73  "Generate a (hard-coded) model of a humanoid robot with 6-DOF limbs and random joint "
74  "placements.\nOnly meant for unit tests.");
75 
76  bp::def(
77  "buildSampleModelHumanoidRandom",
79  bp::args("using_free_flyer"),
80  "Generate a (hard-coded) model of a humanoid robot with 6-DOF limbs and random joint "
81  "placements.\nOnly meant for unit tests.");
82 
83  bp::def(
84  "buildSampleModelManipulator",
86  "Generate a (hard-coded) model of a simple manipulator.");
87 
88 #ifdef PINOCCHIO_WITH_HPP_FCL
89  bp::def(
90  "buildSampleGeometryModelManipulator",
91  static_cast<GeometryModel (*)(const Model &)>(
92  pinocchio::python::buildSampleGeometryModelManipulator),
93  bp::args("model"), "Generate a (hard-coded) geometry model of a simple manipulator.");
94 #endif
95 
96  bp::def(
97  "buildSampleModelHumanoid",
99  "Generate a (hard-coded) model of a simple humanoid.");
100 
101  bp::def(
102  "buildSampleModelHumanoid",
103  static_cast<Model (*)(bool)>(pinocchio::python::buildSampleModelHumanoid),
104  bp::args("using_free_flyer"), "Generate a (hard-coded) model of a simple humanoid.");
105 
106 #ifdef PINOCCHIO_WITH_HPP_FCL
107  bp::def(
108  "buildSampleGeometryModelHumanoid",
109  static_cast<GeometryModel (*)(const Model &)>(
110  pinocchio::python::buildSampleGeometryModelHumanoid),
111  bp::args("model"), "Generate a (hard-coded) geometry model of a simple humanoid.");
112 #endif
113  }
114  } // namespace python
115 
116 } // namespace pinocchio
pinocchio::python::buildSampleModelHumanoid
Model buildSampleModelHumanoid()
Definition: bindings/python/multibody/sample-models.cpp:45
boost::python
pinocchio::buildModels::humanoidRandom
void humanoidRandom(ModelTpl< Scalar, Options, JointCollectionTpl > &model, bool usingFF=true)
Create a humanoid kinematic tree with 6-DOF limbs and random joint placements.
pinocchio::buildModels::manipulator
void manipulator(ModelTpl< Scalar, Options, JointCollectionTpl > &model)
Create a 6-DOF kinematic chain shoulder-elbow-wrist.
python
pinocchio::buildModels::humanoid
void humanoid(ModelTpl< Scalar, Options, JointCollectionTpl > &model, bool usingFF=true)
Create a 28-DOF kinematic chain of a floating humanoid robot.
pinocchio::python::exposeSampleModels
void exposeSampleModels()
Definition: bindings/python/multibody/sample-models.cpp:68
pinocchio::python::buildSampleModelManipulator
Model buildSampleModelManipulator()
Definition: bindings/python/multibody/sample-models.cpp:29
pinocchio::GeometryModel
Definition: multibody/geometry.hpp:50
sample-models.hpp
pinocchio::ModelTpl
Definition: context/generic.hpp:20
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1082
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27
pinocchio::python::buildSampleModelHumanoidRandom
Model buildSampleModelHumanoidRandom()
Definition: bindings/python/multibody/sample-models.cpp:15


pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:32