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);
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_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.
container::aligned_vector< SE3 > jointPlacements
Placement (SE3) of the input of joint i regarding to the parent joint output li.
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 supports. supports[j] corresponds to the collection of all joints located on the path betwe...
Motion gravity
Spatial gravity of the model.
std::vector< std::string > names
Name of joint i
VectorXs upperPositionLimit
Upper joint configuration limit.
FrameVector frames
Vector of operational frames registered on the model.
VectorXs rotorInertia
Vector of rotor inertia parameters.
std::vector< IndexVector > subtrees
Vector of subtrees. subtree[j] corresponds to the subtree supported by the joint j. The first element of subtree[j] is the index of the joint j itself.
TangentVectorType effortLimit
Vector of maximal joint torques.
std::vector< int > nqs
Dimension of the joint i configuration subspace.
VectorXs lowerPositionLimit
Lower joint configuration limit.
int nframes
Number of operational frames.
VectorXs rotorGearRatio
Vector of rotor gear ratio parameters.
std::string name
Model name;.
std::vector< JointIndex > parents
Joint parent of joint i, denoted li (li==parents[i]).
container::aligned_vector< Inertia > inertias
Spatial inertias of the body i expressed in the supporting joint frame i.
std::vector< int > nvs
Dimension of the joint i tangent subspace.
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.