diff --git a/tesseract_task_composer/planning/include/tesseract_task_composer/planning/profiles/ruckig_trajectory_smoothing_profile.h b/tesseract_task_composer/planning/include/tesseract_task_composer/planning/profiles/ruckig_trajectory_smoothing_profile.h index 8b99bce65b..40132a64ab 100644 --- a/tesseract_task_composer/planning/include/tesseract_task_composer/planning/profiles/ruckig_trajectory_smoothing_profile.h +++ b/tesseract_task_composer/planning/include/tesseract_task_composer/planning/profiles/ruckig_trajectory_smoothing_profile.h @@ -64,6 +64,11 @@ struct RuckigTrajectorySmoothingCompositeProfile : public Profile /** @brief max_jerk_scaling_factor The max jerk scaling factor passed to the solver */ double max_jerk_scaling_factor{ 1.0 }; + +protected: + friend class boost::serialization::access; + template + void serialize(Archive&, const unsigned int); // NOLINT }; struct RuckigTrajectorySmoothingMoveProfile : public Profile @@ -96,6 +101,7 @@ struct RuckigTrajectorySmoothingMoveProfile : public Profile }; } // namespace tesseract_planning +BOOST_CLASS_EXPORT_KEY(tesseract_planning::RuckigTrajectorySmoothingCompositeProfile) BOOST_CLASS_EXPORT_KEY(tesseract_planning::RuckigTrajectorySmoothingMoveProfile) #endif // TESSERACT_TASK_COMPOSER_RUCKIG_TRAJECTORY_SMOOTHING_PROFILE_H diff --git a/tesseract_task_composer/planning/src/profiles/ruckig_trajectory_smoothing_profile.cpp b/tesseract_task_composer/planning/src/profiles/ruckig_trajectory_smoothing_profile.cpp index 12113f0cf6..471fcff534 100644 --- a/tesseract_task_composer/planning/src/profiles/ruckig_trajectory_smoothing_profile.cpp +++ b/tesseract_task_composer/planning/src/profiles/ruckig_trajectory_smoothing_profile.cpp @@ -52,6 +52,17 @@ std::size_t RuckigTrajectorySmoothingCompositeProfile::getStaticKey() return std::type_index(typeid(RuckigTrajectorySmoothingCompositeProfile)).hash_code(); } +template +void RuckigTrajectorySmoothingCompositeProfile::serialize(Archive& ar, const unsigned int /*version*/) +{ + ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Profile); + ar& BOOST_SERIALIZATION_NVP(duration_extension_fraction); + ar& BOOST_SERIALIZATION_NVP(max_duration_extension_factor); + ar& BOOST_SERIALIZATION_NVP(max_velocity_scaling_factor); + ar& BOOST_SERIALIZATION_NVP(max_acceleration_scaling_factor); + ar& BOOST_SERIALIZATION_NVP(max_jerk_scaling_factor); +} + RuckigTrajectorySmoothingMoveProfile::RuckigTrajectorySmoothingMoveProfile() : Profile(RuckigTrajectorySmoothingMoveProfile::getStaticKey()) { @@ -81,5 +92,7 @@ void RuckigTrajectorySmoothingMoveProfile::serialize(Archive& ar, const unsigned } // namespace tesseract_planning #include +TESSERACT_SERIALIZE_ARCHIVES_INSTANTIATE(tesseract_planning::RuckigTrajectorySmoothingCompositeProfile) TESSERACT_SERIALIZE_ARCHIVES_INSTANTIATE(tesseract_planning::RuckigTrajectorySmoothingMoveProfile) +BOOST_CLASS_EXPORT_IMPLEMENT(tesseract_planning::RuckigTrajectorySmoothingCompositeProfile) BOOST_CLASS_EXPORT_IMPLEMENT(tesseract_planning::RuckigTrajectorySmoothingMoveProfile)