| Directory: | ./ |
|---|---|
| File: | include/pinocchio/serialization/frame.hpp |
| Date: | 2025-02-12 21:03:38 |
| Exec | Total | Coverage | |
|---|---|---|---|
| Lines: | 9 | 9 | 100.0% |
| Branches: | 7 | 14 | 50.0% |
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2019-2021 INRIA | ||
| 3 | // | ||
| 4 | |||
| 5 | #ifndef __pinocchio_serialization_frame_hpp__ | ||
| 6 | #define __pinocchio_serialization_frame_hpp__ | ||
| 7 | |||
| 8 | #include "pinocchio/multibody/frame.hpp" | ||
| 9 | |||
| 10 | #include "pinocchio/serialization/fwd.hpp" | ||
| 11 | #include "pinocchio/serialization/se3.hpp" | ||
| 12 | #include "pinocchio/serialization/inertia.hpp" | ||
| 13 | |||
| 14 | namespace boost | ||
| 15 | { | ||
| 16 | namespace serialization | ||
| 17 | { | ||
| 18 | |||
| 19 | template<class Archive, typename Scalar, int Options> | ||
| 20 | void | ||
| 21 | 2866 | serialize(Archive & ar, pinocchio::FrameTpl<Scalar, Options> & f, const unsigned int version) | |
| 22 | { | ||
| 23 |
1/2✓ Branch 2 taken 1433 times.
✗ Branch 3 not taken.
|
2866 | ar & make_nvp("name", f.name); |
| 24 |
1/2✓ Branch 2 taken 1433 times.
✗ Branch 3 not taken.
|
2866 | ar & make_nvp("parent", f.parentJoint); |
| 25 |
1/2✓ Branch 2 taken 1433 times.
✗ Branch 3 not taken.
|
2866 | ar & make_nvp("parentFrame", f.parentFrame); |
| 26 |
1/2✓ Branch 2 taken 1433 times.
✗ Branch 3 not taken.
|
2866 | ar & make_nvp("placement", f.placement); |
| 27 |
1/2✓ Branch 2 taken 1433 times.
✗ Branch 3 not taken.
|
2866 | ar & make_nvp("type", f.type); |
| 28 | |||
| 29 |
1/2✓ Branch 0 taken 1433 times.
✗ Branch 1 not taken.
|
2866 | if (version > 0) |
| 30 |
1/2✓ Branch 2 taken 1433 times.
✗ Branch 3 not taken.
|
2866 | ar & make_nvp("inertia", f.inertia); |
| 31 | 2866 | } | |
| 32 | |||
| 33 | template<typename Scalar, int Options> | ||
| 34 | struct version<pinocchio::FrameTpl<Scalar, Options>> | ||
| 35 | { | ||
| 36 | enum | ||
| 37 | { | ||
| 38 | value = 1 | ||
| 39 | }; | ||
| 40 | }; | ||
| 41 | |||
| 42 | } // namespace serialization | ||
| 43 | } // namespace boost | ||
| 44 | |||
| 45 | #endif // ifndef __pinocchio_serialization_frame_hpp__ | ||
| 46 |