bindings/python/parsers/srdf.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2021 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 
18  Model & model, const std::string & xmlStream, const bool verbose = false)
19  {
20  std::istringstream iss(xmlStream);
22  }
23 
25  {
26 
27  bp::def(
28  "removeCollisionPairs",
29  static_cast<void (*)(const Model &, GeometryModel &, const std::string &, const bool)>(
31  (bp::arg("model"), bp::arg("geom_model"), bp::arg("srdf_filename"),
32  bp::arg("verbose") = false),
33  "Parse an SRDF file in order to remove some collision pairs for a specific GeometryModel.\n"
34  "Parameters:\n"
35  "Parameters:\n"
36  "\tmodel: model of the robot\n"
37  "\tgeom_model: geometry model of the robot\n"
38  "\tsrdf_filename: path to the SRDF file containing the collision pairs to remove\n"
39  "\tverbose: [optional] display to the current terminal some internal information");
40 
41  bp::def(
42  "removeCollisionPairsFromXML",
43  static_cast<void (*)(const Model &, GeometryModel &, const std::string &, const bool)>(
45  (bp::arg("model"), bp::arg("geom_model"), bp::arg("srdf_xml_stream"),
46  bp::arg("verbose") = false),
47  "Parse an SRDF file in order to remove some collision pairs for a specific GeometryModel.\n"
48  "Parameters:\n"
49  "Parameters:\n"
50  "\tmodel: model of the robot\n"
51  "\tgeom_model: geometry model of the robot\n"
52  "\tsrdf_xml_stream: XML stream containing the SRDF information with the collision pairs to "
53  "remove\n"
54  "\tverbose: [optional] display to the current terminal some internal information");
55 
56  bp::def(
57  "loadReferenceConfigurations",
58  static_cast<void (*)(Model &, const std::string &, const bool)>(
60  (bp::arg("model"), bp::arg("srdf_filename"), bp::arg("verbose") = false),
61  "Retrieve all the reference configurations of a given model from the SRDF file.\n"
62  "Parameters:\n"
63  "\tmodel: model of the robot\n"
64  "\tsrdf_filename: path to the SRDF file containing the reference configurations\n"
65  "\tverbose: [optional] display to the current terminal some internal information");
66 
67  bp::def(
68  "loadReferenceConfigurationsFromXML",
69  static_cast<void (*)(Model &, const std::string &, const bool)>(
71  (bp::arg("model"), bp::arg("srdf_xml_stream"), bp::arg("verbose") = false),
72  "Retrieve all the reference configurations of a given model from the SRDF file.\n"
73  "Parameters:\n"
74  "\tmodel: model of the robot\n"
75  "\tsrdf_xml_stream: XML stream containing the SRDF information with the reference "
76  "configurations\n"
77  "\tverbose: [optional] display to the current terminal some internal information");
78 
79  bp::def(
80  "loadRotorParameters",
81  static_cast<bool (*)(Model &, const std::string &, const bool)>(&srdf::loadRotorParameters),
82  (bp::arg("model"), bp::arg("srdf_filename"), bp::arg("verbose") = false),
83  "Load the rotor parameters of a given model from a SRDF file.\n"
84  "Results are stored in model.rotorInertia and model.rotorGearRatio."
85  "This function also fills the armature of the model."
86  "Parameters:\n"
87  "\tmodel: model of the robot\n"
88  "\tsrdf_filename: path to the SRDF file containing the rotor parameters\n"
89  "\tverbose: [optional] display to the current terminal some internal information");
90  }
91  } // namespace python
92 } // namespace pinocchio
boost::python
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::loadReferenceConfigurationsFromXML
void loadReferenceConfigurationsFromXML(Model &model, const std::string &xmlStream, const bool verbose=false)
Definition: bindings/python/parsers/srdf.cpp:17
python
srdf.hpp
pinocchio::python::exposeSRDFParser
void exposeSRDFParser()
Definition: bindings/python/parsers/srdf.cpp:24
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::ModelTpl
Definition: context/generic.hpp:20
verbose
bool verbose
srdf.hpp
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1116
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 Sat Jun 1 2024 02:40:38