From 26f57ce3b2b84a068761adb4dc5c740861a419ac Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Thu, 22 Feb 2024 15:07:24 -0500 Subject: [PATCH 1/7] wrap barometric factor --- gtsam/base/std_optional_serialization.h | 3 +++ gtsam/navigation/BarometricFactor.h | 2 +- gtsam/navigation/navigation.i | 21 +++++++++++++++++++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/gtsam/base/std_optional_serialization.h b/gtsam/base/std_optional_serialization.h index 5c250eab43..ac0c16c877 100644 --- a/gtsam/base/std_optional_serialization.h +++ b/gtsam/base/std_optional_serialization.h @@ -56,6 +56,8 @@ namespace std { template<> struct is_trivially_move_constructible& t, const unsigned int version) { } // namespace serialization } // namespace boost #endif +#endif diff --git a/gtsam/navigation/BarometricFactor.h b/gtsam/navigation/BarometricFactor.h index 38677ed589..70cae8d367 100644 --- a/gtsam/navigation/BarometricFactor.h +++ b/gtsam/navigation/BarometricFactor.h @@ -91,7 +91,7 @@ class GTSAM_EXPORT BarometricFactor : public NoiseModelFactorN { -0.00649; } - inline double baroOut(const double& meters) { + inline double baroOut(const double& meters) const { double temp = 15.04 - 0.00649 * meters; return 101.29 * std::pow(((temp + 273.1) / 288.08), 5.256); } diff --git a/gtsam/navigation/navigation.i b/gtsam/navigation/navigation.i index 8e6090e06a..92864c18a0 100644 --- a/gtsam/navigation/navigation.i +++ b/gtsam/navigation/navigation.i @@ -294,7 +294,7 @@ virtual class GPSFactor : gtsam::NonlinearFactor{ // Testable void print(string s = "", const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter) const; - bool equals(const gtsam::GPSFactor& expected, double tol); + bool equals(const gtsam::NonlinearFactor& expected, double tol); // Standard Interface gtsam::Point3 measurementIn() const; @@ -307,12 +307,29 @@ virtual class GPSFactor2 : gtsam::NonlinearFactor { // Testable void print(string s = "", const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter) const; - bool equals(const gtsam::GPSFactor2& expected, double tol); + bool equals(const gtsam::NonlinearFactor& expected, double tol); // Standard Interface gtsam::Point3 measurementIn() const; }; +#include +virtual class BarometricFactor : gtsam::NonlinearFactor { + BarometricFactor(); + BarometricFactor(size_t key, size_t baroKey, const double& baroIn, + const gtsam::noiseModel::Base* model); + + // Testable + void print(string s = "", const gtsam::KeyFormatter& keyFormatter = + gtsam::DefaultKeyFormatter) const; + bool equals(const gtsam::NonlinearFactor& expected, double tol); + + // Standard Interface + const double& measurementIn() const; + double heightOut(double n) const; + double baroOut(const double& meters) const; +}; + #include virtual class Scenario { gtsam::Pose3 pose(double t) const; From a47539506b3a6893de31bc95b1b9a9b9a5149096 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Mon, 26 Feb 2024 08:39:47 -0500 Subject: [PATCH 2/7] undo serialization header change --- gtsam/base/std_optional_serialization.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/gtsam/base/std_optional_serialization.h b/gtsam/base/std_optional_serialization.h index ac0c16c877..5c250eab43 100644 --- a/gtsam/base/std_optional_serialization.h +++ b/gtsam/base/std_optional_serialization.h @@ -56,8 +56,6 @@ namespace std { template<> struct is_trivially_move_constructible& t, const unsigned int version) { } // namespace serialization } // namespace boost #endif -#endif From 9b2c4787ac7132cd04f44139da7b0286ac491434 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Mon, 26 Feb 2024 08:44:36 -0500 Subject: [PATCH 3/7] Revert "Merge pull request #1719 from talregev/TalR/python_tbb_ubuntu_22_04" This reverts commit f724f303889cbde32b097289d64cc771a9ee4369, reversing changes made to 448132af2746ff7164db88ac2cadd93cedbd0813. --- .github/workflows/build-python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index d8dfce0ee7..de9d755ba5 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -29,7 +29,7 @@ jobs: name: [ ubuntu-20.04-gcc-9, - ubuntu-22.04-gcc-9-tbb, + ubuntu-20.04-gcc-9-tbb, ubuntu-20.04-clang-9, macOS-11-xcode-13.4.1, windows-2019-msbuild, @@ -43,8 +43,8 @@ jobs: compiler: gcc version: "9" - - name: ubuntu-22.04-gcc-9-tbb - os: ubuntu-22.04 + - name: ubuntu-20.04-gcc-9-tbb + os: ubuntu-20.04 compiler: gcc version: "9" flag: tbb From 67cf8706d837126c96586b16e9cbbb147169a84b Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Mon, 26 Feb 2024 08:50:51 -0500 Subject: [PATCH 4/7] Revert "Merge pull request #1714 from talregev/TalR/remove_swap" This reverts commit 448132af2746ff7164db88ac2cadd93cedbd0813, reversing changes made to 2dfd15e16ce072931ee58e33866383919b38d8c0. --- .github/workflows/build-python.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index de9d755ba5..520e94c09b 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -145,6 +145,12 @@ jobs: echo "GTSAM_WITH_TBB=ON" >> $GITHUB_ENV echo "GTSAM Uses TBB" + - name: Set Swap Space (Linux) + if: runner.os == 'Linux' + uses: pierotofy/set-swap-space@master + with: + swap-size-gb: 6 + - name: Install System Dependencies (Linux, macOS) if: runner.os != 'Windows' run: | From 0d7d159203ad5fa436b755ddd0133afd5668e0a1 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Mon, 26 Feb 2024 09:14:39 -0500 Subject: [PATCH 5/7] fix for boost serialization collision --- gtsam/base/std_optional_serialization.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtsam/base/std_optional_serialization.h b/gtsam/base/std_optional_serialization.h index 5c250eab43..079cb77456 100644 --- a/gtsam/base/std_optional_serialization.h +++ b/gtsam/base/std_optional_serialization.h @@ -56,6 +56,7 @@ namespace std { template<> struct is_trivially_move_constructible& t, const unsigned int version) { } // namespace serialization } // namespace boost #endif +#endif From 2379cfab9a366fac203a2ef15329194cefd127d8 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Mon, 26 Feb 2024 09:35:46 -0500 Subject: [PATCH 6/7] change C++ version to check against --- gtsam/base/std_optional_serialization.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam/base/std_optional_serialization.h b/gtsam/base/std_optional_serialization.h index 079cb77456..34556ada45 100644 --- a/gtsam/base/std_optional_serialization.h +++ b/gtsam/base/std_optional_serialization.h @@ -56,7 +56,7 @@ namespace std { template<> struct is_trivially_move_constructible Date: Mon, 26 Feb 2024 17:04:15 -0500 Subject: [PATCH 7/7] correctly fix name collisions due to newly merged Boost PR --- gtsam/base/std_optional_serialization.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gtsam/base/std_optional_serialization.h b/gtsam/base/std_optional_serialization.h index 34556ada45..2fc829a859 100644 --- a/gtsam/base/std_optional_serialization.h +++ b/gtsam/base/std_optional_serialization.h @@ -55,8 +55,14 @@ namespace std { template<> struct is_trivially_move_constructible