Line |
Branch |
Exec |
Source |
1 |
|
|
// |
2 |
|
|
// Copyright (c) 2019-2020 INRIA |
3 |
|
|
// |
4 |
|
|
|
5 |
|
|
#ifndef __pinocchio_serialization_model_hpp__ |
6 |
|
|
#define __pinocchio_serialization_model_hpp__ |
7 |
|
|
|
8 |
|
|
#include <boost/serialization/string.hpp> |
9 |
|
|
#include <boost/serialization/variant.hpp> |
10 |
|
|
#include <boost/serialization/vector.hpp> |
11 |
|
|
#include <boost/serialization/map.hpp> |
12 |
|
|
|
13 |
|
|
#include "pinocchio/serialization/fwd.hpp" |
14 |
|
|
#include "pinocchio/serialization/aligned-vector.hpp" |
15 |
|
|
#include "pinocchio/serialization/spatial.hpp" |
16 |
|
|
#include "pinocchio/serialization/eigen.hpp" |
17 |
|
|
#include "pinocchio/serialization/joints.hpp" |
18 |
|
|
#include "pinocchio/serialization/frame.hpp" |
19 |
|
|
|
20 |
|
|
namespace boost |
21 |
|
|
{ |
22 |
|
|
namespace serialization |
23 |
|
|
{ |
24 |
|
|
template< |
25 |
|
|
class Archive, |
26 |
|
|
typename Scalar, |
27 |
|
|
int Options, |
28 |
|
|
template<typename, int> |
29 |
|
|
class JointCollectionTpl> |
30 |
|
✗ |
void serialize( |
31 |
|
|
Archive & ar, |
32 |
|
|
pinocchio::ModelTpl<Scalar, Options, JointCollectionTpl> & model, |
33 |
|
|
const unsigned int /*version*/) |
34 |
|
|
{ |
35 |
|
✗ |
ar & make_nvp("nq", model.nq); |
36 |
|
✗ |
ar & make_nvp("nqs", model.nqs); |
37 |
|
✗ |
ar & make_nvp("idx_qs", model.idx_qs); |
38 |
|
✗ |
ar & make_nvp("nv", model.nv); |
39 |
|
✗ |
ar & make_nvp("nvs", model.nvs); |
40 |
|
✗ |
ar & make_nvp("idx_vs", model.idx_vs); |
41 |
|
✗ |
ar & make_nvp("njoints", model.njoints); |
42 |
|
✗ |
ar & make_nvp("nbodies", model.nbodies); |
43 |
|
✗ |
ar & make_nvp("nframes", model.nframes); |
44 |
|
✗ |
ar & make_nvp("parents", model.parents); |
45 |
|
✗ |
ar & make_nvp("children", model.children); |
46 |
|
✗ |
ar & make_nvp("names", model.names); |
47 |
|
✗ |
ar & make_nvp("supports", model.supports); |
48 |
|
✗ |
ar & make_nvp("subtrees", model.subtrees); |
49 |
|
✗ |
ar & make_nvp("gravity", model.gravity); |
50 |
|
✗ |
ar & make_nvp("name", model.name); |
51 |
|
|
|
52 |
|
✗ |
ar & make_nvp("referenceConfigurations", model.referenceConfigurations); |
53 |
|
✗ |
ar & make_nvp("armature", model.armature); |
54 |
|
✗ |
ar & make_nvp("rotorInertia", model.rotorInertia); |
55 |
|
✗ |
ar & make_nvp("rotorGearRatio", model.rotorGearRatio); |
56 |
|
✗ |
ar & make_nvp("friction", model.friction); |
57 |
|
✗ |
ar & make_nvp("damping", model.damping); |
58 |
|
✗ |
ar & make_nvp("effortLimit", model.effortLimit); |
59 |
|
✗ |
ar & make_nvp("velocityLimit", model.velocityLimit); |
60 |
|
✗ |
ar & make_nvp("lowerPositionLimit", model.lowerPositionLimit); |
61 |
|
✗ |
ar & make_nvp("upperPositionLimit", model.upperPositionLimit); |
62 |
|
|
|
63 |
|
✗ |
ar & make_nvp("inertias", model.inertias); |
64 |
|
✗ |
ar & make_nvp("jointPlacements", model.jointPlacements); |
65 |
|
|
|
66 |
|
✗ |
ar & make_nvp("joints", model.joints); |
67 |
|
✗ |
ar & make_nvp("frames", model.frames); |
68 |
|
|
} |
69 |
|
|
|
70 |
|
|
} // namespace serialization |
71 |
|
|
} // namespace boost |
72 |
|
|
|
73 |
|
|
#endif // ifndef __pinocchio_serialization_model_hpp__ |
74 |
|
|
|