src/serialization/geometry.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2021 INRIA
3 //
4 
5 #ifndef __pinocchio_serialization_multibody_geometry_hpp__
6 #define __pinocchio_serialization_multibody_geometry_hpp__
7 
8 #include <boost/serialization/vector.hpp>
9 #include <boost/serialization/map.hpp>
10 
11 #ifdef PINOCCHIO_WITH_HPP_FCL
12  #define HPP_FCL_SKIP_EIGEN_BOOST_SERIALIZATION
13  #include <hpp/fcl/serialization/collision_data.h>
14  #undef HPP_FCL_SKIP_EIGEN_BOOST_SERIALIZATION
15 #endif // PINOCCHIO_WITH_HPP_FCL
16 
17 #include "pinocchio/multibody/geometry.hpp"
18 #include "pinocchio/serialization/aligned-vector.hpp"
19 #include "pinocchio/serialization/spatial.hpp"
20 
21 namespace boost
22 {
23  namespace serialization
24  {
25  template<class Archive>
26  void serialize(Archive & ar,
27  pinocchio::CollisionPair & collision_pair,
28  const unsigned int /*version*/)
29  {
30  ar & make_nvp("pair",base_object<pinocchio::CollisionPair::Base>(collision_pair));
31  }
32 
33  template<class Archive>
34  void serialize(Archive & ar,
36  const unsigned int /*version*/)
37  {
38  ar & make_nvp("oMg",geom_data.oMg);
39 
40  ar & make_nvp("activeCollisionPairs",geom_data.activeCollisionPairs);
41 
42 #ifdef PINOCCHIO_WITH_HPP_FCL
43  ar & make_nvp("distanceRequests",geom_data.distanceRequests);
44  ar & make_nvp("distanceResults",geom_data.distanceResults);
45  ar & make_nvp("collisionRequests",geom_data.collisionRequests);
46  ar & make_nvp("collisionResults",geom_data.collisionResults);
47 
48  ar & make_nvp("radius",geom_data.radius);
49 
50  ar & make_nvp("collisionPairIndex",geom_data.collisionPairIndex);
51 #endif // PINOCCHIO_WITH_HPP_FCL
52 
53  ar & make_nvp("innerObjects",geom_data.innerObjects);
54  ar & make_nvp("outerObjects",geom_data.outerObjects);
55  }
56 
57  } // namespace serialization
58 } // namespace boost
59 
60 #endif // ifndef __pinocchio_serialization_multibody_geometry_hpp__
std::map< JointIndex, GeomIndexList > innerObjects
Map over vector GeomModel::geometryObjects, indexed by joints.
std::vector< bool > activeCollisionPairs
Vector of collision pairs.
std::map< JointIndex, GeomIndexList > outerObjects
A list of associated collision GeometryObjects to a given joint Id.
const nvp< typename pinocchio::container::aligned_vector< T >::vector_base > make_nvp(const char *name, pinocchio::container::aligned_vector< T > &t)
void serialize(Archive &ar, pinocchio::container::aligned_vector< T > &v, const unsigned int version)


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:03