bindings/python/parsers/srdf.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2021 CNRS INRIA
3 //
4 
8 
9 #include <boost/python.hpp>
10 
11 namespace pinocchio
12 {
13  namespace python
14  {
15 
16  namespace bp = boost::python;
17 
19  const Model & model,
21  const bp::object & filename,
22  const bool verbose = false)
23  {
25  }
26 
28  Model & model, const bp::object & filename, const bool verbose = false)
29  {
31  }
32 
34  Model & model, const std::string & xmlStream, const bool verbose = false)
35  {
36  std::istringstream iss(xmlStream);
38  }
39 
40  bool loadRotorParameters(Model & model, const bp::object & filename, const bool verbose = false)
41  {
43  }
44 
46  {
47 
48  bp::def(
49  "removeCollisionPairs",
50  static_cast<void (*)(const Model &, GeometryModel &, const bp::object &, const bool)>(
52  (bp::arg("model"), bp::arg("geom_model"), bp::arg("srdf_filename"),
53  bp::arg("verbose") = false),
54  "Parse an SRDF file in order to remove some collision pairs for a specific GeometryModel.\n"
55  "Parameters:\n"
56  "Parameters:\n"
57  "\tmodel: model of the robot\n"
58  "\tgeom_model: geometry model of the robot\n"
59  "\tsrdf_filename: path to the SRDF file containing the collision pairs to remove\n"
60  "\tverbose: [optional] display to the current terminal some internal information");
61 
62  bp::def(
63  "removeCollisionPairsFromXML",
64  static_cast<void (*)(const Model &, GeometryModel &, const std::string &, const bool)>(
66  (bp::arg("model"), bp::arg("geom_model"), bp::arg("srdf_xml_stream"),
67  bp::arg("verbose") = false),
68  "Parse an SRDF file in order to remove some collision pairs for a specific GeometryModel.\n"
69  "Parameters:\n"
70  "Parameters:\n"
71  "\tmodel: model of the robot\n"
72  "\tgeom_model: geometry model of the robot\n"
73  "\tsrdf_xml_stream: XML stream containing the SRDF information with the collision pairs to "
74  "remove\n"
75  "\tverbose: [optional] display to the current terminal some internal information");
76 
77  bp::def(
78  "loadReferenceConfigurations",
79  static_cast<void (*)(Model &, const bp::object &, const bool)>(
81  (bp::arg("model"), bp::arg("srdf_filename"), bp::arg("verbose") = false),
82  "Retrieve all the reference configurations of a given model from the SRDF file.\n"
83  "Parameters:\n"
84  "\tmodel: model of the robot\n"
85  "\tsrdf_filename: path to the SRDF file containing the reference configurations\n"
86  "\tverbose: [optional] display to the current terminal some internal information");
87 
88  bp::def(
89  "loadReferenceConfigurationsFromXML",
90  static_cast<void (*)(Model &, const std::string &, const bool)>(
92  (bp::arg("model"), bp::arg("srdf_xml_stream"), bp::arg("verbose") = false),
93  "Retrieve all the reference configurations of a given model from the SRDF file.\n"
94  "Parameters:\n"
95  "\tmodel: model of the robot\n"
96  "\tsrdf_xml_stream: XML stream containing the SRDF information with the reference "
97  "configurations\n"
98  "\tverbose: [optional] display to the current terminal some internal information");
99 
100  bp::def(
101  "loadRotorParameters",
102  static_cast<bool (*)(Model &, const bp::object &, const bool)>(&loadRotorParameters),
103  (bp::arg("model"), bp::arg("srdf_filename"), bp::arg("verbose") = false),
104  "Load the rotor parameters of a given model from a SRDF file.\n"
105  "Results are stored in model.rotorInertia and model.rotorGearRatio."
106  "This function also fills the armature of the model."
107  "Parameters:\n"
108  "\tmodel: model of the robot\n"
109  "\tsrdf_filename: path to the SRDF file containing the rotor parameters\n"
110  "\tverbose: [optional] display to the current terminal some internal information");
111  }
112  } // namespace python
113 } // namespace pinocchio
pinocchio::python::path
std::string path(const bp::object &path)
python pathlib.Path | str -> C++ std::string
Definition: path.cpp:13
boost::python
path.hpp
pinocchio::python::loadReferenceConfigurations
void loadReferenceConfigurations(Model &model, const bp::object &filename, const bool verbose=false)
Definition: bindings/python/parsers/srdf.cpp:27
pinocchio::srdf::removeCollisionPairsFromXML
void removeCollisionPairsFromXML(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, GeometryModel &geom_model, const std::string &xmlString, const bool verbose=false)
Deactive all possible collision pairs mentioned in the SRDF file.
pinocchio::python::loadRotorParameters
bool loadRotorParameters(Model &model, const bp::object &filename, const bool verbose=false)
Definition: bindings/python/parsers/srdf.cpp:40
filename
filename
pinocchio::python::loadReferenceConfigurationsFromXML
void loadReferenceConfigurationsFromXML(Model &model, const std::string &xmlStream, const bool verbose=false)
Definition: bindings/python/parsers/srdf.cpp:33
python
srdf.hpp
append-urdf-model-with-another-model.geom_model
geom_model
Definition: append-urdf-model-with-another-model.py:25
pinocchio::python::exposeSRDFParser
void exposeSRDFParser()
Definition: bindings/python/parsers/srdf.cpp:45
pinocchio::srdf::loadRotorParameters
bool loadRotorParameters(ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::string &filename, const bool verbose=false)
Load the rotor params of a given model associated to a SRDF file. It throws if the SRDF file is incor...
pinocchio::srdf::loadReferenceConfigurations
void loadReferenceConfigurations(ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::string &filename, const bool verbose=false)
Get the reference configurations of a given model associated to a SRDF file. It throws if the SRDF fi...
pinocchio::srdf::loadReferenceConfigurationsFromXML
void loadReferenceConfigurationsFromXML(ModelTpl< Scalar, Options, JointCollectionTpl > &model, std::istream &xmlStream, const bool verbose=false)
Get the reference configurations of a given model associated to a SRDF file. It throws if the SRDF fi...
pinocchio::GeometryModel
Definition: multibody/geometry.hpp:50
pinocchio::python::removeCollisionPairs
void removeCollisionPairs(const Model &model, GeometryModel &geom_model, const bp::object &filename, const bool verbose=false)
Definition: bindings/python/parsers/srdf.cpp:18
pinocchio::ModelTpl
Definition: context/generic.hpp:20
verbose
bool verbose
srdf.hpp
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1082
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27
pinocchio::srdf::removeCollisionPairs
void removeCollisionPairs(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, GeometryModel &geom_model, const std::string &filename, const bool verbose=false)
Deactive all possible collision pairs mentioned in the SRDF file. It throws if the SRDF file is incor...


pinocchio
Author(s):
autogenerated on Fri Nov 1 2024 02:41:48