joints-data.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2019 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 run(Archive & ar,
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 }
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(Archive & ar,
48  const unsigned int /*version*/)
49  {
50  ar & make_nvp("S",joint_data.S());
51  ar & make_nvp("M",joint_data.M());
52  ar & make_nvp("v",joint_data.v());
53  ar & make_nvp("c",joint_data.c());
54 
55  ar & make_nvp("U",joint_data.U());
56  ar & make_nvp("Dinv",joint_data.Dinv());
57  ar & make_nvp("UDinv",joint_data.UDinv());
58  }
59  }
60 
61  template <class Archive, typename Scalar, int Options, int axis>
62  void serialize(Archive & ar,
64  const unsigned int version)
65  {
67  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
68  }
69 
70  template <class Archive, typename Scalar, int Options, int axis>
71  void serialize(Archive & ar,
73  const unsigned int version)
74  {
76  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
77  }
78 
79  template <class Archive, typename Scalar, int Options, int axis>
80  void serialize(Archive & ar,
82  const unsigned int version)
83  {
85  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
86  }
87 
88  template <class Archive, typename Scalar, int Options>
89  void serialize(Archive & ar,
91  const unsigned int version)
92  {
94  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
95  }
96 
97  template <class Archive, typename Scalar, int Options>
98  void serialize(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(Archive & ar,
109  const unsigned int version)
110  {
112  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
113  }
114 
115  template <class Archive, typename Scalar, int Options>
116  void serialize(Archive & ar,
118  const unsigned int version)
119  {
121  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
122  }
123 
124  template <class Archive, typename Scalar, int Options>
125  void serialize(Archive & ar,
127  const unsigned int version)
128  {
130  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
131  }
132 
133  template <class Archive, typename Scalar, int Options>
134  void serialize(Archive & ar,
136  const unsigned int version)
137  {
139  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
140  }
141 
142  template <class Archive, typename Scalar, int Options>
143  void serialize(Archive & ar,
145  const unsigned int version)
146  {
148  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
149  }
150 
151  template <class Archive, typename Scalar, int Options>
152  void serialize(Archive & ar,
154  const unsigned int version)
155  {
157  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
158  }
159 
160  template <class Archive, typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
161  void serialize(Archive & ar,
163  const unsigned int version)
164  {
166  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
167 
169  }
170 
171  template <class Archive, typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
172  void serialize(Archive & ar,
174  const unsigned int /*version*/)
175  {
177  ar & make_nvp("base_variant",base_object<JointDataVariant>(joint));
178  }
179 
180  template <class Archive, typename JointData>
181  void serialize(Archive & ar,
183  const unsigned int version)
184  {
185  typedef pinocchio::JointDataMimic<JointData> JointType;
186  fix::serialize(ar,static_cast<pinocchio::JointDataBase<JointType>&>(joint),version);
187 
188  ar & make_nvp("jdata",joint.jdata());
189  ar & make_nvp("scaling",joint.scaling());
190  ar & make_nvp("jointConfiguration",joint.jointConfiguration());
191  ar & make_nvp("jointVelocity",joint.jointVelocity());
192  }
193 
194  }
195 }
196 
197 #endif // ifndef __pinocchio_serialization_joints_data_hpp__
const Scalar & scaling() const
ConfigVector_t & jointConfiguration()
TangentVector_t & jointVelocity()
TansformTypeConstRef M() const
JointDataVector joints
Vector of joints.
UTypeConstRef U() const
static void run(Archive &ar, JointDataCompositeTpl< Scalar, Options, JointCollectionTpl > &joint_data)
Definition: joints-data.hpp:14
UDTypeConstRef UDinv() const
SE3::Scalar Scalar
Definition: conversions.cpp:13
const nvp< typename pinocchio::container::aligned_vector< T >::vector_base > make_nvp(const char *name, pinocchio::container::aligned_vector< T > &t)
DTypeConstRef Dinv() const
Main pinocchio namespace.
Definition: timings.cpp:30
JointCollectionDefault::JointDataVariant JointDataVariant
const JointData & jdata() const
void serialize(Archive &ar, pinocchio::JointDataMimic< JointData > &joint, const unsigned int version)
BiasTypeConstRef c() const
ConstraintTypeConstRef S() const
static void run(Archive &ar, T &object)
MotionTypeConstRef v() const


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:04