From 8f17b5cfbb34a007a137b2aa4f8293f4cc3cf1b5 Mon Sep 17 00:00:00 2001 From: Ashwin Gupta Date: Fri, 1 Mar 2024 16:22:43 -0800 Subject: [PATCH] export Similarity3 specalized BetweenFactor to python --- gtsam/geometry/Similarity3.h | 12 ++++++++++++ gtsam/slam/slam.i | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gtsam/geometry/Similarity3.h b/gtsam/geometry/Similarity3.h index cd4af89bc0..05bd0431e1 100644 --- a/gtsam/geometry/Similarity3.h +++ b/gtsam/geometry/Similarity3.h @@ -202,6 +202,18 @@ class GTSAM_EXPORT Similarity3 : public LieGroup { /// @{ private: + + #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION + /** Serialization function */ + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int /*version*/) { + ar & BOOST_SERIALIZATION_NVP(R_); + ar & BOOST_SERIALIZATION_NVP(t_); + ar & BOOST_SERIALIZATION_NVP(s_); + } + #endif + /// Calculate expmap and logmap coefficients. static Matrix3 GetV(Vector3 w, double lambda); diff --git a/gtsam/slam/slam.i b/gtsam/slam/slam.i index 7135137bba..64977a2a5f 100644 --- a/gtsam/slam/slam.i +++ b/gtsam/slam/slam.i @@ -7,12 +7,13 @@ namespace gtsam { #include #include #include +#include // ###### #include template virtual class BetweenFactor : gtsam::NoiseModelFactor { BetweenFactor(size_t key1, size_t key2, const T& relativePose,