Line |
Branch |
Exec |
Source |
1 |
|
|
// |
2 |
|
|
// Copyright (c) 2019 INRIA |
3 |
|
|
// |
4 |
|
|
|
5 |
|
|
#ifndef __pinocchio_serialization_joints_motion_hpp__ |
6 |
|
|
#define __pinocchio_serialization_joints_motion_hpp__ |
7 |
|
|
|
8 |
|
|
#include "pinocchio/serialization/fwd.hpp" |
9 |
|
|
|
10 |
|
|
#include <boost/serialization/split_free.hpp> |
11 |
|
|
#include <boost/serialization/vector.hpp> |
12 |
|
|
|
13 |
|
|
namespace boost |
14 |
|
|
{ |
15 |
|
|
namespace serialization |
16 |
|
|
{ |
17 |
|
|
|
18 |
|
|
template<class Archive, typename Scalar, int Options, int axis> |
19 |
|
✗ |
void serialize( |
20 |
|
|
Archive & ar, |
21 |
|
|
pinocchio::MotionRevoluteTpl<Scalar, Options, axis> & m, |
22 |
|
|
const unsigned int /*version*/) |
23 |
|
|
{ |
24 |
|
✗ |
ar & make_nvp("w", m.angularRate()); |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
template<class Archive, typename Scalar, int Options, int axis> |
28 |
|
✗ |
void serialize( |
29 |
|
|
Archive & ar, |
30 |
|
|
pinocchio::MotionPrismaticTpl<Scalar, Options, axis> & m, |
31 |
|
|
const unsigned int /*version*/) |
32 |
|
|
{ |
33 |
|
✗ |
ar & make_nvp("v", m.linearRate()); |
34 |
|
|
} |
35 |
|
|
|
36 |
|
|
template<class Archive, typename Scalar, int Options, int axis> |
37 |
|
✗ |
void serialize( |
38 |
|
|
Archive & ar, |
39 |
|
|
pinocchio::MotionHelicalTpl<Scalar, Options, axis> & m, |
40 |
|
|
const unsigned int /*version*/) |
41 |
|
|
{ |
42 |
|
✗ |
ar & make_nvp("w", m.angularRate()); |
43 |
|
✗ |
ar & make_nvp("v", m.linearRate()); |
44 |
|
|
} |
45 |
|
|
|
46 |
|
|
template<class Archive, typename Scalar, int Options> |
47 |
|
✗ |
void serialize( |
48 |
|
|
Archive & ar, |
49 |
|
|
pinocchio::MotionSphericalTpl<Scalar, Options> & m, |
50 |
|
|
const unsigned int /*version*/) |
51 |
|
|
{ |
52 |
|
✗ |
ar & make_nvp("angular", m.angular()); |
53 |
|
|
} |
54 |
|
|
|
55 |
|
|
template<class Archive, typename Scalar, int Options> |
56 |
|
✗ |
void serialize( |
57 |
|
|
Archive & ar, |
58 |
|
|
pinocchio::MotionTranslationTpl<Scalar, Options> & m, |
59 |
|
|
const unsigned int /*version*/) |
60 |
|
|
{ |
61 |
|
✗ |
ar & make_nvp("linear", m.linear()); |
62 |
|
|
} |
63 |
|
|
|
64 |
|
|
template<class Archive, typename Scalar, int Options> |
65 |
|
✗ |
void serialize( |
66 |
|
|
Archive & ar, pinocchio::MotionPlanarTpl<Scalar, Options> & m, const unsigned int /*version*/) |
67 |
|
|
{ |
68 |
|
✗ |
ar & make_nvp("data", m.data()); |
69 |
|
|
} |
70 |
|
|
|
71 |
|
|
template<class Archive, typename Scalar, int Options> |
72 |
|
✗ |
void serialize( |
73 |
|
|
Archive & ar, |
74 |
|
|
pinocchio::MotionRevoluteUnalignedTpl<Scalar, Options> & m, |
75 |
|
|
const unsigned int /*version*/) |
76 |
|
|
{ |
77 |
|
✗ |
ar & make_nvp("axis", m.axis()); |
78 |
|
✗ |
ar & make_nvp("w", m.angularRate()); |
79 |
|
|
} |
80 |
|
|
|
81 |
|
|
template<class Archive, typename Scalar, int Options> |
82 |
|
✗ |
void serialize( |
83 |
|
|
Archive & ar, |
84 |
|
|
pinocchio::MotionPrismaticUnalignedTpl<Scalar, Options> & m, |
85 |
|
|
const unsigned int /*version*/) |
86 |
|
|
{ |
87 |
|
✗ |
ar & make_nvp("axis", m.axis()); |
88 |
|
✗ |
ar & make_nvp("v", m.linearRate()); |
89 |
|
|
} |
90 |
|
|
|
91 |
|
|
template<class Archive, typename Scalar, int Options> |
92 |
|
✗ |
void serialize( |
93 |
|
|
Archive & ar, |
94 |
|
|
pinocchio::MotionHelicalUnalignedTpl<Scalar, Options> & m, |
95 |
|
|
const unsigned int /*version*/) |
96 |
|
|
{ |
97 |
|
✗ |
ar & make_nvp("axis", m.axis()); |
98 |
|
✗ |
ar & make_nvp("w", m.angularRate()); |
99 |
|
✗ |
ar & make_nvp("v", m.linearRate()); |
100 |
|
|
} |
101 |
|
|
} // namespace serialization |
102 |
|
|
} // namespace boost |
103 |
|
|
|
104 |
|
|
#endif // ifndef __pinocchio_serialization_joints_motion_hpp__ |
105 |
|
|
|