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/fwd.hpp" 14 #include "pinocchio/serialization/aligned-vector.hpp" 15 #include "pinocchio/serialization/spatial.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);
47 ar & make_nvp(
"friction",model.
friction);
48 ar & make_nvp(
"damping",model.
damping);
54 ar & make_nvp(
"inertias",model.inertias);
55 ar & make_nvp(
"jointPlacements",model.jointPlacements);
57 ar & make_nvp(
"joints",model.
joints);
58 ar & make_nvp(
"frames",model.
frames);
64 #endif // ifndef __pinocchio_multibody_model_serialization_hpp__ std::vector< int > idx_vs
Starting index of the joint i in the tangent configuration space.
JointModelVector joints
Model of joint i, encapsulated in a JointModelAccessor.
int njoints
Number of joints.
ConfigVectorMap referenceConfigurations
Map of reference configurations, indexed by user given names.
int nv
Dimension of the velocity vector space.
std::vector< IndexVector > supports
Vector of joint supports. supports[j] corresponds to the collection of all joints located on the path...
Motion gravity
Spatial gravity of the model.
std::vector< std::string > names
Name of joint i
FrameVector frames
Vector of operational frames registered on the model.
std::vector< IndexVector > subtrees
Vector of joint subtrees. subtree[j] corresponds to the subtree supported by the joint j...
TangentVectorType effortLimit
Vector of maximal joint torques.
std::vector< int > nqs
Dimension of the joint i configuration subspace.
int nframes
Number of operational frames.
ConfigVectorType upperPositionLimit
Upper joint configuration limit.
TangentVectorType friction
Vector of joint friction parameters.
ConfigVectorType lowerPositionLimit
Lower joint configuration limit.
std::string name
Model name;.
std::vector< JointIndex > parents
Joint parent of joint i, denoted li (li==parents[i]).
std::vector< int > nvs
Dimension of the joint i tangent subspace.
TangentVectorType rotorInertia
Vector of rotor inertia parameters.
TangentVectorType damping
Vector of joint damping parameters.
TangentVectorType velocityLimit
Vector of maximal joint velocities.
int nbodies
Number of bodies.
int nq
Dimension of the configuration vector representation.
std::vector< int > idx_qs
Starting index of the joint i in the configuration space.
TangentVectorType rotorGearRatio
Vector of rotor gear ratio parameters.