 |
pinocchio
2.5.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
|
|
5 #ifndef __pinocchio_multibody_model_serialization_hpp__
6 #define __pinocchio_multibody_model_serialization_hpp__
8 #include <boost/serialization/string.hpp>
9 #include <boost/serialization/variant.hpp>
10 #include <boost/serialization/vector.hpp>
11 #include <boost/serialization/map.hpp>
13 #include "pinocchio/serialization/aligned-vector.hpp"
14 #include "pinocchio/serialization/spatial.hpp"
15 #include "pinocchio/serialization/eigen.hpp"
16 #include "pinocchio/serialization/joints.hpp"
17 #include "pinocchio/serialization/frame.hpp"
21 namespace serialization
23 template<
class Archive,
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
24 void serialize(Archive & ar,
28 ar & make_nvp(
"nq",model.
nq);
29 ar & make_nvp(
"nqs",model.
nqs);
30 ar & make_nvp(
"idx_qs",model.
idx_qs);
31 ar & make_nvp(
"nv",model.
nv);
32 ar & make_nvp(
"nvs",model.
nvs);
33 ar & make_nvp(
"idx_vs",model.
idx_vs);
34 ar & make_nvp(
"njoints",model.
njoints);
35 ar & make_nvp(
"nbodies",model.
nbodies);
36 ar & make_nvp(
"nframes",model.
nframes);
37 ar & make_nvp(
"parents",model.
parents);
38 ar & make_nvp(
"names",model.
names);
39 ar & make_nvp(
"supports",model.
supports);
40 ar & make_nvp(
"subtrees",model.
subtrees);
41 ar & make_nvp(
"gravity",model.
gravity);
42 ar & make_nvp(
"name",model.
name);
52 ar & make_nvp(
"inertias",model.inertias);
53 ar & make_nvp(
"jointPlacements",model.jointPlacements);
55 ar & make_nvp(
"joints",model.
joints);
56 ar & make_nvp(
"frames",model.
frames);
62 #endif // ifndef __pinocchio_multibody_model_serialization_hpp__
std::vector< int > idx_qs
Starting index of the joint i in the configuration space.
int nq
Dimension of the configuration vector representation.
ConfigVectorMap referenceConfigurations
Map of reference configurations, indexed by user given names.
int nv
Dimension of the velocity vector space.
JointModelVector joints
Model of joint i, encapsulated in a JointModelAccessor.
int njoints
Number of joints.
VectorXs rotorInertia
Vector of rotor inertia parameters.
Motion gravity
Spatial gravity of the model.
int nframes
Number of operational frames.
std::vector< IndexVector > subtrees
Vector of joint subtrees. subtree[j] corresponds to the subtree supported by the joint j....
std::vector< IndexVector > supports
Vector of joint supports. supports[j] corresponds to the collection of all joints located on the path...
std::vector< int > nqs
Dimension of the joint i configuration subspace.
std::vector< std::string > names
Name of joint i
FrameVector frames
Vector of operational frames registered on the model.
TangentVectorType effortLimit
Vector of maximal joint torques.
VectorXs upperPositionLimit
Upper joint configuration limit.
VectorXs rotorGearRatio
Vector of rotor gear ratio parameters.
std::vector< JointIndex > parents
Joint parent of joint i, denoted li (li==parents[i]).
VectorXs lowerPositionLimit
Lower joint configuration limit.
std::string name
Model name;.
TangentVectorType velocityLimit
Vector of maximal joint velocities.
std::vector< int > idx_vs
Starting index of the joint i in the tangent configuration space.
int nbodies
Number of bodies.
std::vector< int > nvs
Dimension of the joint i tangent subspace.