joints-data.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2019-2020 INRIA
3 //
4 
5 #ifndef __pinocchio_serialization_joints_data_hpp__
6 #define __pinocchio_serialization_joints_data_hpp__
7 
8 namespace pinocchio
9 {
10  template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
11  struct Serialize<JointDataCompositeTpl<Scalar, Options, JointCollectionTpl>>
12  {
13  template<typename Archive>
14  static void
16  {
18 
19  ar & make_nvp("joints", joint_data.joints);
20  ar & make_nvp("iMlast", joint_data.iMlast);
21  ar & make_nvp("pjMi", joint_data.pjMi);
22 
23  ar & make_nvp("S", joint_data.S);
24  ar & make_nvp("M", joint_data.M);
25  ar & make_nvp("v", joint_data.v);
26  ar & make_nvp("c", joint_data.c);
27 
28  ar & make_nvp("U", joint_data.U);
29  ar & make_nvp("Dinv", joint_data.Dinv);
30  ar & make_nvp("UDinv", joint_data.UDinv);
31  ar & make_nvp("StU", joint_data.StU);
32  }
33  };
34 } // namespace pinocchio
35 
36 namespace boost
37 {
38  namespace serialization
39  {
40 
41  // For some older version of gcc, we have to rely on an additional namespace
42  // to avoid ambiguous call to boost::serialization::serialize
43  namespace fix
44  {
45  template<class Archive, typename Derived>
46  void serialize(
47  Archive & ar,
49  const unsigned int /*version*/)
50  {
51  ar & make_nvp("joint_q", joint_data.joint_q());
52  ar & make_nvp("joint_v", joint_data.joint_v());
53 
54  ar & make_nvp("S", joint_data.S());
55  ar & make_nvp("M", joint_data.M());
56  ar & make_nvp("v", joint_data.v());
57  ar & make_nvp("c", joint_data.c());
58 
59  ar & make_nvp("U", joint_data.U());
60  ar & make_nvp("Dinv", joint_data.Dinv());
61  ar & make_nvp("UDinv", joint_data.UDinv());
62  ar & make_nvp("StU", joint_data.StU());
63  }
64  } // namespace fix
65 
66  template<class Archive, typename Scalar, int Options, int axis>
67  void serialize(
68  Archive & ar,
70  const unsigned int version)
71  {
74  }
75 
76  template<class Archive, typename Scalar, int Options, int axis>
77  void serialize(
78  Archive & ar,
80  const unsigned int version)
81  {
84  }
85 
86  template<class Archive, typename Scalar, int Options, int axis>
87  void serialize(
88  Archive & ar,
90  const unsigned int version)
91  {
94  }
95 
96  template<class Archive, typename Scalar, int Options, int axis>
97  void serialize(
98  Archive & ar,
100  const unsigned int version)
101  {
103  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
104  }
105 
106  template<class Archive, typename Scalar, int Options>
107  void serialize(
108  Archive & ar,
110  const unsigned int version)
111  {
113  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
114  }
115 
116  template<class Archive, typename Scalar, int Options>
117  void serialize(
118  Archive & ar,
120  const unsigned int version)
121  {
123  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
124  }
125 
126  template<class Archive, typename Scalar, int Options>
127  void serialize(
128  Archive & ar,
130  const unsigned int version)
131  {
133  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
134  }
135 
136  template<class Archive, typename Scalar, int Options>
137  void serialize(
138  Archive & ar,
140  const unsigned int version)
141  {
143  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
144  }
145 
146  template<class Archive, typename Scalar, int Options>
147  void serialize(
148  Archive & ar,
150  const unsigned int version)
151  {
153  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
154  }
155 
156  template<class Archive, typename Scalar, int Options>
157  void serialize(
158  Archive & ar,
160  const unsigned int version)
161  {
163  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
164  }
165 
166  template<class Archive, typename Scalar, int Options>
167  void serialize(
168  Archive & ar,
170  const unsigned int version)
171  {
173  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
174  }
175 
176  template<class Archive, typename Scalar, int Options>
177  void serialize(
178  Archive & ar,
180  const unsigned int version)
181  {
183  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
184  }
185 
186  template<class Archive, typename Scalar, int Options>
187  void serialize(
188  Archive & ar,
190  const unsigned int version)
191  {
193  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
194  }
195 
196  template<class Archive, typename Scalar, int Options>
197  void serialize(
198  Archive & ar,
200  const unsigned int version)
201  {
203  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
204  }
205 
206  template<
207  class Archive,
208  typename Scalar,
209  int Options,
210  template<typename S, int O> class JointCollectionTpl>
211  void serialize(
212  Archive & ar,
214  const unsigned int version)
215  {
217  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
218 
220  }
221 
222  template<
223  class Archive,
224  typename Scalar,
225  int Options,
226  template<typename S, int O> class JointCollectionTpl>
227  void serialize(
228  Archive & ar,
230  const unsigned int /*version*/)
231  {
233  ar & make_nvp("base_variant", base_object<JointDataVariant>(joint));
234  }
235 
236  template<class Archive, typename JointData>
237  void serialize(
238  Archive & ar, pinocchio::JointDataMimic<JointData> & joint, const unsigned int version)
239  {
240  typedef pinocchio::JointDataMimic<JointData> JointType;
241  fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
242 
243  ar & make_nvp("jdata", joint.jdata());
244  ar & make_nvp("scaling", joint.scaling());
245  }
246 
247  } // namespace serialization
248 } // namespace boost
249 
250 #endif // ifndef __pinocchio_serialization_joints_data_hpp__
pinocchio::Serialize::run
static void run(Archive &ar, T &object)
pinocchio::JointDataBase::v
MotionTypeConstRef v() const
Definition: joint-data-base.hpp:211
pinocchio::Serialize
Definition: serialization/fwd.hpp:18
pinocchio::JointDataMimic::scaling
const Scalar & scaling() const
Definition: joint-mimic.hpp:523
pinocchio::JointDataFreeFlyerTpl
Definition: multibody/joint/fwd.hpp:114
boost::serialization::fix::serialize
void serialize(Archive &ar, pinocchio::JointDataBase< Derived > &joint_data, const unsigned int)
Definition: joints-data.hpp:46
boost::serialization::serialize
void serialize(Archive &ar, Eigen::Map< PlainObjectBase, MapOptions, StrideType > &m, const unsigned int version)
Definition: serialization/eigen.hpp:222
pinocchio::JointDataRevoluteUnalignedTpl
Definition: multibody/joint/fwd.hpp:42
pinocchio::JointDataCompositeTpl::c
Bias_t c
Definition: joint-composite.hpp:134
pinocchio::Options
Options
Definition: joint-configuration.hpp:1082
pinocchio::JointDataPrismaticTpl
Definition: multibody/joint/fwd.hpp:91
pinocchio::JointDataBase
Definition: joint-data-base.hpp:161
pinocchio::JointDataCompositeTpl::joints
JointDataVector joints
Vector of joints.
Definition: joint-composite.hpp:120
pinocchio::JointDataBase::M
TansformTypeConstRef M() const
Definition: joint-data-base.hpp:203
version
Definition: version.py:1
pinocchio::python::Scalar
context::Scalar Scalar
Definition: admm-solver.cpp:29
pinocchio::JointDataHelicalUnalignedTpl
Definition: multibody/joint/fwd.hpp:69
pinocchio::JointDataMimic
Definition: joint-mimic.hpp:309
pinocchio::JointDataHelicalTpl
Definition: multibody/joint/fwd.hpp:62
boost
pinocchio::JointDataTpl
Definition: multibody/joint/fwd.hpp:162
pinocchio::JointDataCompositeTpl::U
U_t U
Definition: joint-composite.hpp:137
boost::serialization::make_nvp
const nvp< pinocchio::container::aligned_vector< T > > make_nvp(const char *name, pinocchio::container::aligned_vector< T > &t)
Definition: serialization/aligned-vector.hpp:37
pinocchio::JointDataCompositeTpl::StU
D_t StU
Definition: joint-composite.hpp:140
pinocchio::python::Options
@ Options
Definition: expose-contact-inverse-dynamics.cpp:22
pinocchio::Serialize< JointDataCompositeTpl< Scalar, Options, JointCollectionTpl > >::run
static void run(Archive &ar, JointDataCompositeTpl< Scalar, Options, JointCollectionTpl > &joint_data)
Definition: joints-data.hpp:15
pinocchio::JointDataPlanarTpl
Definition: multibody/joint/fwd.hpp:122
pinocchio::JointDataTranslationTpl
Definition: multibody/joint/fwd.hpp:130
pinocchio::JointDataBase::S
ConstraintTypeConstRef S() const
Definition: joint-data-base.hpp:195
pinocchio::JointDataRevoluteTpl
Definition: multibody/joint/fwd.hpp:35
pinocchio::JointDataMimic::jdata
const JointData & jdata() const
Definition: joint-mimic.hpp:514
pinocchio::JointDataCompositeTpl::Dinv
D_t Dinv
Definition: joint-composite.hpp:138
pinocchio::JointDataBase::StU
DTypeConstRef StU() const
Definition: joint-data-base.hpp:252
pinocchio::JointDataBase::U
UTypeConstRef U() const
Definition: joint-data-base.hpp:228
pinocchio::JointDataBase::Dinv
DTypeConstRef Dinv() const
Definition: joint-data-base.hpp:236
pinocchio::JointDataSphericalTpl
Definition: multibody/joint/fwd.hpp:77
pinocchio::JointDataCompositeTpl::M
Transformation_t M
Definition: joint-composite.hpp:132
pinocchio::JointDataCompositeTpl::UDinv
UD_t UDinv
Definition: joint-composite.hpp:139
pinocchio::JointDataSphericalZYXTpl
Definition: multibody/joint/fwd.hpp:85
pinocchio::JointDataBase::joint_q
ConfigVectorTypeConstRef joint_q() const
Definition: joint-data-base.hpp:177
serialization
Definition: serialization.py:1
pinocchio::JointDataRevoluteUnboundedUnalignedTpl
Definition: multibody/joint/fwd.hpp:50
pinocchio::JointDataBase::UDinv
UDTypeConstRef UDinv() const
Definition: joint-data-base.hpp:244
pinocchio::JointDataCompositeTpl
Definition: multibody/joint/fwd.hpp:148
pinocchio::JointDataVariant
JointCollectionDefault::JointDataVariant JointDataVariant
Definition: joint-collection.hpp:206
pinocchio::JointDataUniversalTpl
Definition: multibody/joint/fwd.hpp:106
pinocchio::JointDataCompositeTpl::v
Motion_t v
Definition: joint-composite.hpp:133
pinocchio::JointDataCompositeTpl::S
Constraint_t S
Definition: joint-composite.hpp:131
pinocchio::JointDataBase::joint_v
TangentVectorTypeConstRef joint_v() const
Definition: joint-data-base.hpp:186
pinocchio::JointDataPrismaticUnalignedTpl
Definition: multibody/joint/fwd.hpp:98
pinocchio::JointDataBase::c
BiasTypeConstRef c() const
Definition: joint-data-base.hpp:219
pinocchio::JointDataRevoluteUnboundedTpl
Definition: multibody/joint/fwd.hpp:57
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:31