From d6ef5454990827a525a79515b6f13a1df1852443 Mon Sep 17 00:00:00 2001 From: Ayush Baid Date: Mon, 28 Dec 2020 22:05:12 +0530 Subject: [PATCH 1/2] Wrapping Cal3Bundler's prior and GeneralSFMFactor2 --- gtsam/gtsam.i | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gtsam/gtsam.i b/gtsam/gtsam.i index 3a6c6edf1..c37a83b8a 100644 --- a/gtsam/gtsam.i +++ b/gtsam/gtsam.i @@ -2505,7 +2505,7 @@ class NonlinearISAM { #include #include -template}> +template}> virtual class PriorFactor : gtsam::NoiseModelFactor { PriorFactor(size_t key, const T& prior, const gtsam::noiseModel::Base* noiseModel); T prior() const; @@ -2651,7 +2651,7 @@ typedef gtsam::GeneralSFMFactor Gene typedef gtsam::GeneralSFMFactor GeneralSFMFactorCal3DS2; typedef gtsam::GeneralSFMFactor, gtsam::Point3> GeneralSFMFactorCal3Bundler; -template +template virtual class GeneralSFMFactor2 : gtsam::NoiseModelFactor { GeneralSFMFactor2(const gtsam::Point2& measured, const gtsam::noiseModel::Base* model, size_t poseKey, size_t landmarkKey, size_t calibKey); gtsam::Point2 measured() const; @@ -2659,6 +2659,9 @@ virtual class GeneralSFMFactor2 : gtsam::NoiseModelFactor { // enabling serialization functionality void serialize() const; }; +typedef gtsam::GeneralSFMFactor2 GeneralSFMFactor2Cal3_S2; +typedef gtsam::GeneralSFMFactor2 GeneralSFMFactor2Cal3DS2; +typedef gtsam::GeneralSFMFactor2 GeneralSFMFactor2Cal3Bundler; #include class SmartProjectionParams { From c7c0c77a12d52327e130e1c659c305d5ac4b647f Mon Sep 17 00:00:00 2001 From: Ayush Baid Date: Tue, 29 Dec 2020 08:53:19 +0530 Subject: [PATCH 2/2] Adding Cal3DS2 prior factor and using template instead of typedefs --- gtsam/gtsam.i | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gtsam/gtsam.i b/gtsam/gtsam.i index 870f3edc0..69b8bfebf 100644 --- a/gtsam/gtsam.i +++ b/gtsam/gtsam.i @@ -2520,7 +2520,7 @@ class NonlinearISAM { #include #include -template}> +template}> virtual class PriorFactor : gtsam::NoiseModelFactor { PriorFactor(size_t key, const T& prior, const gtsam::noiseModel::Base* noiseModel); T prior() const; @@ -2666,7 +2666,7 @@ typedef gtsam::GeneralSFMFactor Gene typedef gtsam::GeneralSFMFactor GeneralSFMFactorCal3DS2; typedef gtsam::GeneralSFMFactor, gtsam::Point3> GeneralSFMFactorCal3Bundler; -template +template virtual class GeneralSFMFactor2 : gtsam::NoiseModelFactor { GeneralSFMFactor2(const gtsam::Point2& measured, const gtsam::noiseModel::Base* model, size_t poseKey, size_t landmarkKey, size_t calibKey); gtsam::Point2 measured() const; @@ -2674,9 +2674,6 @@ virtual class GeneralSFMFactor2 : gtsam::NoiseModelFactor { // enabling serialization functionality void serialize() const; }; -typedef gtsam::GeneralSFMFactor2 GeneralSFMFactor2Cal3_S2; -typedef gtsam::GeneralSFMFactor2 GeneralSFMFactor2Cal3DS2; -typedef gtsam::GeneralSFMFactor2 GeneralSFMFactor2Cal3Bundler; #include class SmartProjectionParams {