parsers/urdf.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2021 CNRS INRIA
3 // Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
4 //
5 
6 #ifndef __pinocchio_parsers_urdf_hpp__
7 #define __pinocchio_parsers_urdf_hpp__
8 
12 
13 #include <memory>
14 
16 // forward declaration of the unique type from urdfdom which is expose.
17 namespace urdf
18 {
19  class ModelInterface;
20 }
22 
23 namespace pinocchio
24 {
25  namespace urdf
26  {
27 
40  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
41  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
42  const std::string & filename,
44  const std::string & rootJointName,
45  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
46  const bool verbose = false,
47  const bool mimic = false);
48 
60  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
61  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
62  const std::string & filename,
64  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
65  const bool verbose = false,
66  const bool mimic = false);
67 
77  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
78  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
79  const std::string & filename,
80  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
81  const bool verbose = false,
82  const bool mimic = false);
83 
97  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
98  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
99  const std::shared_ptr<::urdf::ModelInterface> urdfTree,
101  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
102  const bool verbose = false,
103  const bool mimic = false);
104 
119  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
120  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
121  const std::shared_ptr<::urdf::ModelInterface> urdfTree,
123  const std::string & rootJointName,
124  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
125  const bool verbose = false,
126  const bool mimic = false);
127 
139  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
140  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
141  const std::shared_ptr<::urdf::ModelInterface> urdfTree,
142  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
143  const bool verbose = false,
144  const bool mimic = false);
145 
160  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
161  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
162  const std::string & xml_stream,
164  const std::string & rootJointName,
165  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
166  const bool verbose = false,
167  const bool mimic = false);
168 
182  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
183  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
184  const std::string & xml_stream,
186  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
187  const bool verbose = false,
188  const bool mimic = false);
189 
201  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
202  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
203  const std::string & xml_stream,
204  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
205  const bool verbose = false,
206  const bool mimic = false);
207 
232  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
233  GeometryModel & buildGeom(
234  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
235  const std::string & filename,
236  const GeometryType type,
237  GeometryModel & geom_model,
238  const std::vector<std::string> & package_paths = std::vector<std::string>(),
240 
264  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
267  const std::string & filename,
268  const GeometryType type,
270  const std::string & package_path,
272 
273  {
274  const std::vector<std::string> dirs(1, package_path);
275  return buildGeom(model, filename, type, geom_model, dirs, mesh_loader);
276  }
277 
302  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
305  const std::istream & xml_stream,
306  const GeometryType type,
308  const std::vector<std::string> & package_paths = std::vector<std::string>(),
310 
334  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
337  const std::istream & xml_stream,
338  const GeometryType type,
340  const std::string & package_path,
342 
343  {
344  const std::vector<std::string> dirs(1, package_path);
345  return buildGeom(model, xml_stream, type, geom_model, dirs, mesh_loader);
346  }
347 
348  } // namespace urdf
349 } // namespace pinocchio
350 
351 #include "pinocchio/parsers/urdf/model.hxx"
352 #include "pinocchio/parsers/urdf/geometry.hxx"
353 
354 #endif // ifndef __pinocchio_parsers_urdf_hpp__
common_symbols.type
type
Definition: common_symbols.py:34
model.hpp
pinocchio::urdf::buildModelFromXML
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModelFromXML(const std::string &xml_stream, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel &rootJoint, const std::string &rootJointName, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false, const bool mimic=false)
Build the model from an XML stream with a particular joint as root of the model tree inside the model...
hpp::fcl::MeshLoaderPtr
std::shared_ptr< MeshLoader > MeshLoaderPtr
Definition: meshloader-fwd.hpp:25
filename
filename
geometry.hpp
pinocchio::urdf::buildGeom
GeometryModel & buildGeom(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::string &filename, const GeometryType type, GeometryModel &geom_model, const std::vector< std::string > &package_paths=std::vector< std::string >(), ::hpp::fcl::MeshLoaderPtr mesh_loader=::hpp::fcl::MeshLoaderPtr())
Build The GeometryModel from a URDF file. Search for meshes in the directories specified by the user ...
meshloader-fwd.hpp
append-urdf-model-with-another-model.geom_model
geom_model
Definition: append-urdf-model-with-another-model.py:26
urdf
Definition: types.hpp:29
pinocchio::GeometryType
GeometryType
Definition: multibody/geometry-object.hpp:24
pinocchio::GeometryModel
Definition: multibody/geometry.hpp:54
pinocchio::ModelTpl
Definition: context/generic.hpp:20
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1082
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:33
pinocchio::ModelTpl::JointModel
JointModelTpl< Scalar, Options, JointCollectionTpl > JointModel
Definition: multibody/model.hpp:72
pinocchio::urdf::buildModel
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModel(const std::string &filename, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel &rootJoint, const std::string &rootJointName, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false, const bool mimic=false)
Build the model from a URDF file with a particular joint as root of the model tree inside the model g...


pinocchio
Author(s):
autogenerated on Thu Apr 10 2025 02:42:22