pinocchio  3.7.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
 
Loading...
Searching...
No Matches
joints-data.hpp
1//
2// Copyright (c) 2019-2020 INRIA
3//
4
5#ifndef __pinocchio_serialization_joints_data_hpp__
6#define __pinocchio_serialization_joints_data_hpp__
7
8namespace 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 {
17 using boost::serialization::make_nvp;
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
36namespace 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
65 template<
66 class Archive,
67 typename Scalar,
68 int Options,
69 template<typename, int> class JointCollection>
70 void serialize(
71 Archive & ar,
73 joint_data,
74 const unsigned int /*version*/)
75 {
76 ar & make_nvp("joint_q", joint_data.joint_q());
77 ar & make_nvp("joint_v", joint_data.joint_v());
78
79 ar & make_nvp("S", joint_data.S());
80 }
81
82 } // namespace fix
83
84 template<class Archive, typename Scalar, int Options, int axis>
85 void serialize(
86 Archive & ar,
88 const unsigned int version)
89 {
91 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
92 }
93
94 template<class Archive, typename Scalar, int Options, int axis>
95 void serialize(
96 Archive & ar,
98 const unsigned int version)
99 {
101 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
102 }
103
104 template<class Archive, typename Scalar, int Options, int axis>
105 void serialize(
106 Archive & ar,
108 const unsigned int version)
109 {
111 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
112 }
113
114 template<class Archive, typename Scalar, int Options, int axis>
115 void serialize(
116 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(
126 Archive & ar,
128 const unsigned int version)
129 {
131 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
132 }
133
134 template<class Archive, typename Scalar, int Options>
135 void serialize(
136 Archive & ar,
138 const unsigned int version)
139 {
141 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
142 }
143
144 template<class Archive, typename Scalar, int Options>
145 void serialize(
146 Archive & ar,
148 const unsigned int version)
149 {
151 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
152 }
153
154 template<class Archive, typename Scalar, int Options>
155 void serialize(
156 Archive & ar,
158 const unsigned int version)
159 {
161 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
162 }
163
164 template<class Archive, typename Scalar, int Options>
165 void serialize(
166 Archive & ar,
168 const unsigned int version)
169 {
171 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
172 }
173
174 template<class Archive, typename Scalar, int Options>
175 void serialize(
176 Archive & ar,
178 const unsigned int version)
179 {
181 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
182 }
183
184 template<class Archive, typename Scalar, int Options>
185 void serialize(
186 Archive & ar,
188 const unsigned int version)
189 {
191 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
192 }
193
194 template<class Archive, typename Scalar, int Options>
195 void serialize(
196 Archive & ar,
198 const unsigned int version)
199 {
201 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
202 }
203
204 template<class Archive, typename Scalar, int Options>
205 void serialize(
206 Archive & ar,
208 const unsigned int version)
209 {
211 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
212 }
213
214 template<class Archive, typename Scalar, int Options>
215 void serialize(
216 Archive & ar,
218 const unsigned int version)
219 {
221 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
222 }
223
224 template<
225 class Archive,
226 typename Scalar,
227 int Options,
228 template<typename S, int O> class JointCollectionTpl>
229 void serialize(
230 Archive & ar,
232 const unsigned int version)
233 {
235 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
237 }
238
239 template<
240 class Archive,
241 typename Scalar,
242 int Options,
243 template<typename S, int O> class JointCollectionTpl>
244 void serialize(
245 Archive & ar,
247 const unsigned int /*version*/)
248 {
249 typedef typename JointCollectionTpl<Scalar, Options>::JointDataVariant JointDataVariant;
250 ar & make_nvp("base_variant", base_object<JointDataVariant>(joint));
251 }
252
253 template<
254 class Archive,
255 typename Scalar,
256 int Options,
257 template<typename S, int O> class JointCollectionTpl>
258 void serialize(
259 Archive & ar,
261 const unsigned int version)
262 {
263 ar & make_nvp("jdata", joint.jdata());
264
265 ar & make_nvp("m_q_transform", joint.q_transformed());
266 ar & make_nvp("m_v_transform", joint.v_transformed());
267
269 fix::serialize(ar, static_cast<pinocchio::JointDataBase<JointType> &>(joint), version);
270 }
271
272 } // namespace serialization
273} // namespace boost
274
275#endif // ifndef __pinocchio_serialization_joints_data_hpp__
Main pinocchio namespace.
Definition treeview.dox:11