Skip to content

Commit 8f17b5c

Browse files
committed
export Similarity3 specalized BetweenFactor to python
1 parent 9d70605 commit 8f17b5c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

gtsam/geometry/Similarity3.h

+12
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,18 @@ class GTSAM_EXPORT Similarity3 : public LieGroup<Similarity3, 7> {
202202
/// @{
203203

204204
private:
205+
206+
#ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
207+
/** Serialization function */
208+
friend class boost::serialization::access;
209+
template<class Archive>
210+
void serialize(Archive & ar, const unsigned int /*version*/) {
211+
ar & BOOST_SERIALIZATION_NVP(R_);
212+
ar & BOOST_SERIALIZATION_NVP(t_);
213+
ar & BOOST_SERIALIZATION_NVP(s_);
214+
}
215+
#endif
216+
205217
/// Calculate expmap and logmap coefficients.
206218
static Matrix3 GetV(Vector3 w, double lambda);
207219

gtsam/slam/slam.i

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ namespace gtsam {
77
#include <gtsam/geometry/Cal3DS2.h>
88
#include <gtsam/geometry/SO4.h>
99
#include <gtsam/navigation/ImuBias.h>
10+
#include <gtsam/geometry/Similarity3.h>
1011

1112
// ######
1213

1314
#include <gtsam/slam/BetweenFactor.h>
1415
template <T = {double, Vector, gtsam::Point2, gtsam::Point3, gtsam::Rot2, gtsam::SO3,
15-
gtsam::SO4, gtsam::Rot3, gtsam::Pose2, gtsam::Pose3,
16+
gtsam::SO4, gtsam::Rot3, gtsam::Pose2, gtsam::Pose3, gtsam::Similarity3,
1617
gtsam::imuBias::ConstantBias}>
1718
virtual class BetweenFactor : gtsam::NoiseModelFactor {
1819
BetweenFactor(size_t key1, size_t key2, const T& relativePose,

0 commit comments

Comments
 (0)