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 
11 
12 #ifdef PINOCCHIO_WITH_CXX11_SUPPORT
13  #include <memory>
14 #endif
15 
17 // forward declaration of the unique type from urdfdom which is expose.
18 namespace urdf
19 {
20  class ModelInterface;
21 }
22 
23 namespace hpp
24 {
25  namespace fcl
26  {
27  class MeshLoader;
28  typedef std::shared_ptr<MeshLoader> MeshLoaderPtr;
29  } // namespace fcl
30 } // namespace hpp
32 
33 namespace pinocchio
34 {
35  namespace urdf
36  {
37 
48  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
49  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
50  const std::string & filename,
52  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
53  const bool verbose = false);
54 
63  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
64  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
65  const std::string & filename,
66  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
67  const bool verbose = false);
68 
81  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
82  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
83  const std::shared_ptr<::urdf::ModelInterface> urdfTree,
85  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
86  const bool verbose = false);
87 
98  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
99  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
100  const std::shared_ptr<::urdf::ModelInterface> urdfTree,
101  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
102  const bool verbose = false);
103 
116  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
117  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
118  const std::string & xml_stream,
120  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
121  const bool verbose = false);
122 
133  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
134  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
135  const std::string & xml_stream,
136  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
137  const bool verbose = false);
138 
163  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
164  GeometryModel & buildGeom(
165  const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
166  const std::string & filename,
167  const GeometryType type,
168  GeometryModel & geom_model,
169  const std::vector<std::string> & package_paths = std::vector<std::string>(),
170  ::hpp::fcl::MeshLoaderPtr mesh_loader = ::hpp::fcl::MeshLoaderPtr());
171 
195  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
198  const std::string & filename,
199  const GeometryType type,
201  const std::string & package_path,
202  hpp::fcl::MeshLoaderPtr mesh_loader = hpp::fcl::MeshLoaderPtr())
203 
204  {
205  const std::vector<std::string> dirs(1, package_path);
206  return buildGeom(model, filename, type, geom_model, dirs, mesh_loader);
207  }
208 
233  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
236  const std::istream & xml_stream,
237  const GeometryType type,
239  const std::vector<std::string> & package_paths = std::vector<std::string>(),
240  hpp::fcl::MeshLoaderPtr mesh_loader = hpp::fcl::MeshLoaderPtr());
241 
265  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
268  const std::istream & xml_stream,
269  const GeometryType type,
271  const std::string & package_path,
272  hpp::fcl::MeshLoaderPtr mesh_loader = hpp::fcl::MeshLoaderPtr())
273 
274  {
275  const std::vector<std::string> dirs(1, package_path);
276  return buildGeom(model, xml_stream, type, geom_model, dirs, mesh_loader);
277  }
278 
279  } // namespace urdf
280 } // namespace pinocchio
281 
282 #include "pinocchio/parsers/urdf/model.hxx"
283 #include "pinocchio/parsers/urdf/geometry.hxx"
284 
285 #endif // ifndef __pinocchio_parsers_urdf_hpp__
model.hpp
simulation-pendulum.type
type
Definition: simulation-pendulum.py:18
pinocchio::urdf::buildModel
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModel(const std::string &filename, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel &rootJoint, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false)
Build the model from a URDF file with a particular joint as root of the model tree inside the model g...
filename
filename
hpp
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 ...
pinocchio::urdf::buildModelFromXML
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModelFromXML(const std::string &xml_stream, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel &rootJoint, ModelTpl< Scalar, Options, JointCollectionTpl > &model, const bool verbose=false)
Build the model from an XML stream with a particular joint as root of the model tree inside the model...
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:50
pinocchio::ModelTpl
Definition: context/generic.hpp:20
pinocchio::model
JointCollectionTpl & model
Definition: joint-configuration.hpp:1116
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27
pinocchio::ModelTpl::JointModel
JointModelTpl< Scalar, Options, JointCollectionTpl > JointModel
Definition: multibody/model.hpp:73


pinocchio
Author(s):
autogenerated on Fri Jun 7 2024 02:40:50