| Directory: | ./ |
|---|---|
| File: | include/pinocchio/serialization/model.hpp |
| Date: | 2025-02-12 21:03:38 |
| Exec | Total | Coverage | |
|---|---|---|---|
| Lines: | 32 | 32 | 100.0% |
| Branches: | 30 | 60 | 50.0% |
| 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> class JointCollectionTpl> | ||
| 29 | 54 | void serialize( | |
| 30 | Archive & ar, | ||
| 31 | pinocchio::ModelTpl<Scalar, Options, JointCollectionTpl> & model, | ||
| 32 | const unsigned int /*version*/) | ||
| 33 | { | ||
| 34 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("nq", model.nq); |
| 35 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("nqs", model.nqs); |
| 36 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("idx_qs", model.idx_qs); |
| 37 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("nv", model.nv); |
| 38 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("nvs", model.nvs); |
| 39 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("idx_vs", model.idx_vs); |
| 40 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("njoints", model.njoints); |
| 41 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("nbodies", model.nbodies); |
| 42 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("nframes", model.nframes); |
| 43 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("parents", model.parents); |
| 44 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("children", model.children); |
| 45 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("names", model.names); |
| 46 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("supports", model.supports); |
| 47 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("subtrees", model.subtrees); |
| 48 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("gravity", model.gravity); |
| 49 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("name", model.name); |
| 50 | |||
| 51 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("referenceConfigurations", model.referenceConfigurations); |
| 52 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("armature", model.armature); |
| 53 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("rotorInertia", model.rotorInertia); |
| 54 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("rotorGearRatio", model.rotorGearRatio); |
| 55 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("friction", model.friction); |
| 56 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("damping", model.damping); |
| 57 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("effortLimit", model.effortLimit); |
| 58 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("velocityLimit", model.velocityLimit); |
| 59 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("lowerPositionLimit", model.lowerPositionLimit); |
| 60 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("upperPositionLimit", model.upperPositionLimit); |
| 61 | |||
| 62 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("inertias", model.inertias); |
| 63 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("jointPlacements", model.jointPlacements); |
| 64 | |||
| 65 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("joints", model.joints); |
| 66 |
1/2✓ Branch 2 taken 27 times.
✗ Branch 3 not taken.
|
54 | ar & make_nvp("frames", model.frames); |
| 67 | 54 | } | |
| 68 | |||
| 69 | } // namespace serialization | ||
| 70 | } // namespace boost | ||
| 71 | |||
| 72 | #endif // ifndef __pinocchio_serialization_model_hpp__ | ||
| 73 |