From 894605be3f5ff7365c3f3a5330bdb25b509a05ff Mon Sep 17 00:00:00 2001 From: yotams Date: Tue, 5 Apr 2022 08:51:03 +0300 Subject: [PATCH] added wrapper for ProjectionFactorRollingShutter --- gtsam_unstable/gtsam_unstable.i | 26 ++++++++++++++++++++++++++ python/README.md | 1 + 2 files changed, 27 insertions(+) diff --git a/gtsam_unstable/gtsam_unstable.i b/gtsam_unstable/gtsam_unstable.i index dd66e7a73..08cd45e18 100644 --- a/gtsam_unstable/gtsam_unstable.i +++ b/gtsam_unstable/gtsam_unstable.i @@ -797,4 +797,30 @@ virtual class ProjectionFactorPPPC : gtsam::NoiseModelFactor { typedef gtsam::ProjectionFactorPPPC ProjectionFactorPPPCCal3_S2; typedef gtsam::ProjectionFactorPPPC ProjectionFactorPPPCCal3DS2; +#include +virtual class ProjectionFactorRollingShutter : gtsam::NoiseModelFactor { + ProjectionFactorRollingShutter(const gtsam::Point2& measured, double alpha, const gtsam::noiseModel::Base* noiseModel, + size_t poseKey_a, size_t poseKey_b, size_t pointKey, const gtsam::Cal3_S2* K); + + ProjectionFactorRollingShutter(const gtsam::Point2& measured, double alpha, const gtsam::noiseModel::Base* noiseModel, + size_t poseKey_a, size_t poseKey_b, size_t pointKey, const gtsam::Cal3_S2* K, gtsam::Pose3& body_P_sensor); + + ProjectionFactorRollingShutter(const gtsam::Point2& measured, double alpha, const gtsam::noiseModel::Base* noiseModel, + size_t poseKey_a, size_t poseKey_b, size_t pointKey, const gtsam::Cal3_S2* K, bool throwCheirality, + bool verboseCheirality); + + ProjectionFactorRollingShutter(const gtsam::Point2& measured, double alpha, const gtsam::noiseModel::Base* noiseModel, + size_t poseKey_a, size_t poseKey_b, size_t pointKey, const gtsam::Cal3_S2* K, bool throwCheirality, + bool verboseCheirality, gtsam::Pose3& body_P_sensor); + + gtsam::Point2 measured() const; + double alpha() const; + gtsam::Cal3_S2* calibration() const; + bool verboseCheirality() const; + bool throwCheirality() const; + + // enabling serialization functionality + void serialize() const; +}; + } //\namespace gtsam diff --git a/python/README.md b/python/README.md index 54436df93..278d62094 100644 --- a/python/README.md +++ b/python/README.md @@ -8,6 +8,7 @@ For instructions on updating the version of the [wrap library](https://github.co ## Requirements +- Cmake >= 3.15 - If you want to build the GTSAM python library for a specific python version (eg 3.6), use the `-DGTSAM_PYTHON_VERSION=3.6` option when running `cmake` otherwise the default interpreter will be used. - If the interpreter is inside an environment (such as an anaconda environment or virtualenv environment),