parsers/sdf.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 CNRS
3 //
4 
5 #ifndef __pinocchio_parsers_sdf_hpp__
6 #define __pinocchio_parsers_sdf_hpp__
7 
12 
13 namespace pinocchio
14 {
15  namespace sdf
16  {
17 
43  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
46  const std::string & filename,
47  const GeometryType type,
48  GeometryModel & geomModel,
49  const std::string & rootLinkName = "",
50  const std::vector<std::string> & packageDirs = std::vector<std::string>(),
51  ::hpp::fcl::MeshLoaderPtr meshLoader = ::hpp::fcl::MeshLoaderPtr());
52 
76  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
80  const std::string & filename,
81  const GeometryType type,
82  GeometryModel & geomModel,
83  const std::string & packagePath,
84  ::hpp::fcl::MeshLoaderPtr meshLoader = ::hpp::fcl::MeshLoaderPtr())
85  {
86  const std::vector<std::string> dirs(1, packagePath);
87  return buildGeom(model, contact_models, filename, type, geomModel, dirs, meshLoader);
88  };
89 
114  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
117  const std::string & filename,
118  const GeometryType type,
119  GeometryModel & geomModel,
120  const std::string & rootLinkName,
121  const std::string & packagePath,
122  ::hpp::fcl::MeshLoaderPtr meshLoader = ::hpp::fcl::MeshLoaderPtr())
123  {
124  const std::vector<std::string> dirs(1, packagePath);
125  return buildGeom(model, filename, type, geomModel, rootLinkName, dirs, meshLoader);
126  };
127 
140  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
142  const std::string & xmlStream,
146  const std::string & rootLinkName = "",
147  const std::vector<std::string> & parentGuidance = {},
148  const bool verbose = false);
149 
162  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
163  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
164  const std::string & filename,
166  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
168  const std::string & rootLinkName = "",
169  const std::vector<std::string> & parentGuidance = {},
170  const bool verbose = false);
171 
180  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
181  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
182  const std::string & xmlStream,
183  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
185  const std::string & rootLinkName = "",
186  const std::vector<std::string> & parentGuidance = {},
187  const bool verbose = false);
188 
197  template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
198  ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
199  const std::string & filename,
200  ModelTpl<Scalar, Options, JointCollectionTpl> & model,
202  const std::string & rootLinkName = "",
203  const std::vector<std::string> & parentGuidance = {},
204  const bool verbose = false);
205 
206  } // namespace sdf
207 } // namespace pinocchio
208 
209 #include "pinocchio/parsers/sdf/model.hxx"
210 #include "pinocchio/parsers/sdf/geometry.hxx"
211 
212 #endif // ifndef __pinocchio_parsers_sdf_hpp__
pinocchio::sdf::buildModel
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModel(const std::string &filename, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel &rootJoint, ModelTpl< Scalar, Options, JointCollectionTpl > &model, PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel) &contact_models, const std::string &rootLinkName="", const std::vector< std::string > &parentGuidance={}, const bool verbose=false)
Build the model from a SDF file with a particular joint as root of the model tree inside the model gi...
model.hpp
pinocchio::sdf::buildGeom
GeometryModel & buildGeom(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::string &filename, const GeometryType type, GeometryModel &geomModel, const std::string &rootLinkName="", const std::vector< std::string > &packageDirs=std::vector< std::string >(), ::hpp::fcl::MeshLoaderPtr meshLoader=::hpp::fcl::MeshLoaderPtr())
Build The GeometryModel from a SDF file. Search for meshes in the directories specified by the user f...
simulation-pendulum.type
type
Definition: simulation-pendulum.py:18
pinocchio::RigidConstraintModelTpl
Definition: algorithm/constraints/fwd.hpp:14
filename
filename
urdf.hpp
pinocchio::JointModelTpl
Definition: multibody/joint/fwd.hpp:155
geometry.hpp
PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR
#define PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(T)
Definition: container/aligned-vector.hpp:13
pinocchio::GeometryType
GeometryType
Definition: multibody/geometry-object.hpp:24
pinocchio::RigidConstraintModel
RigidConstraintModelTpl< context::Scalar, context::Options > RigidConstraintModel
Definition: algorithm/fwd.hpp:24
pinocchio::GeometryModel
Definition: multibody/geometry.hpp:50
contact-cholesky.contact_models
list contact_models
Definition: contact-cholesky.py:25
contact-info.hpp
pinocchio::ModelTpl
Definition: context/generic.hpp:20
verbose
bool verbose
pinocchio::sdf::buildModelFromXML
ModelTpl< Scalar, Options, JointCollectionTpl > & buildModelFromXML(const std::string &xmlStream, const typename ModelTpl< Scalar, Options, JointCollectionTpl >::JointModel &rootJoint, ModelTpl< Scalar, Options, JointCollectionTpl > &model, PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel) &contact_models, const std::string &rootLinkName="", const std::vector< std::string > &parentGuidance={}, const bool verbose=false)
Build the model from an XML stream with a particular joint as root of the model tree inside the model...
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 Tue Jun 25 2024 02:42:40