pinocchio  3.7.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
 
Loading...
Searching...
No Matches
mjcf.hpp
1//
2// Copyright (c) 2024 INRIA CNRS
3//
4
5#ifndef __pinocchio_parsers_mjcf_hpp__
6#define __pinocchio_parsers_mjcf_hpp__
7
8#include "pinocchio/multibody/model.hpp"
9#include "pinocchio/parsers/urdf.hpp"
10#include "pinocchio/multibody/model.hpp"
11#include "pinocchio/multibody/geometry.hpp"
12#include "pinocchio/algorithm/contact-info.hpp"
13
14namespace pinocchio
15{
16 namespace mjcf
17 {
18
27 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
28 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
29 const std::string & filename,
30 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
31 const bool verbose = false);
32
41 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
42 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
43 const std::string & xmlStream,
44 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
45 const bool verbose = false);
46
47 // TODO: update description, buildModel with contact model
48 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
49 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
50 const std::string & filename,
51 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
52 PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel) & contact_models,
53 const bool verbose = false);
54
55 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
56 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
57 const std::string & xmlStream,
58 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
59 PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel) & contact_models,
60 const bool verbose = false);
61
72 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
73 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
74 const std::string & filename,
75 const typename ModelTpl<Scalar, Options, JointCollectionTpl>::JointModel & rootJoint,
76 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
77 const bool verbose = false);
78
79 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
80 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
81 const std::string & xmlStream,
82 const typename ModelTpl<Scalar, Options, JointCollectionTpl>::JointModel & rootJoint,
83 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
84 const bool verbose = false);
85
97 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
98 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
99 const std::string & filename,
100 const typename ModelTpl<Scalar, Options, JointCollectionTpl>::JointModel & rootJoint,
101 const std::string & rootJointName,
102 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
103 const bool verbose = false);
104
105 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
106 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
107 const std::string & xmlStream,
108 const typename ModelTpl<Scalar, Options, JointCollectionTpl>::JointModel & rootJoint,
109 const std::string & rootJointName,
110 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
111 const bool verbose = false);
112
123 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
124 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
125 const std::string & filename,
126 const typename ModelTpl<Scalar, Options, JointCollectionTpl>::JointModel & rootJoint,
127 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
128 PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel) & contact_models,
129 const bool verbose = false);
130
131 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
132 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
133 const std::string & xmlStream,
134 const typename ModelTpl<Scalar, Options, JointCollectionTpl>::JointModel & rootJoint,
135 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
136 PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel) & contact_models,
137 const bool verbose);
138
150 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
151 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModel(
152 const std::string & filename,
153 const typename ModelTpl<Scalar, Options, JointCollectionTpl>::JointModel & rootJoint,
154 const std::string & rootJointName,
155 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
156 PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel) & contact_models,
157 const bool verbose = false);
158
170 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
171 ModelTpl<Scalar, Options, JointCollectionTpl> & buildModelFromXML(
172 const std::string & xmlStream,
173 const typename ModelTpl<Scalar, Options, JointCollectionTpl>::JointModel & rootJoint,
174 const std::string & rootJointName,
175 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
176 PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel) & contact_models,
177 const bool verbose = false);
178
197 template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
198 GeometryModel & buildGeom(
199 ModelTpl<Scalar, Options, JointCollectionTpl> & model,
200 const std::string & filename,
201 const GeometryType type,
202 GeometryModel & geom_model,
203 ::hpp::fcl::MeshLoaderPtr mesh_loader = ::hpp::fcl::MeshLoaderPtr());
204
205 } // namespace mjcf
206} // namespace pinocchio
207
208#include "pinocchio/parsers/mjcf/model.hxx"
209#include "pinocchio/parsers/mjcf/geometry.hxx"
210
211#endif // ifndef __pinocchio_parsers_mjcf_hpp__
Main pinocchio namespace.
Definition treeview.dox:11