From 6fc75200892351ab54deb3558d437d912b03d8bd Mon Sep 17 00:00:00 2001 From: Parker Lusk Date: Sun, 29 Jan 2023 16:47:29 -0500 Subject: [PATCH] update to gtsam 4.2a8 --- CMakeLists.txt | 4 ++-- README.md | 13 ++++++------- examples/icp.cpp | 2 +- examples/robust_pgo_mc.cpp | 4 ++-- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 380da1b..e64c943 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.15) project(dcsam_examples) # Set some compilation options. @@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD 17) add_compile_options(-Wall -Wpedantic -Wextra) # External package dependencies. -find_package(GTSAM 4.1 REQUIRED) +find_package(GTSAM 4.2 REQUIRED) find_package(Eigen3 3.3 REQUIRED) find_package(dcsam REQUIRED) diff --git a/README.md b/README.md index 5e4a3a1..686b8a3 100644 --- a/README.md +++ b/README.md @@ -12,19 +12,18 @@ introducing inlier/outlier discrete hypotheses for untrusted loop closure edges. To build the ICP and robust PGO examples: ```bash -~/$ mkdir build -~/$ cd build -~/build$ cmake .. -~/build$ make -j +~ $ mkdir build +~ $ cd build +~/build $ cmake .. +~/build $ make -j ``` To run the ICP example: ```bash -~/build/examples$ ./icp (path to source cloud) (path to target cloud) +~/build/examples $ ./icp (path to source cloud) (path to target cloud) ``` To run the robust pose-graph optimization example: ```bash - -~/build/examples$ ./robust_pgo_mc [.g2o file] [outlier rate (int >= 0; default 0)] [is3D (0/1; default 1)] [num trials (default 1)] +~/build/examples $ ./robust_pgo_mc [.g2o file] [outlier rate (int >= 0; default 0)] [is3D (0/1; default 1)] [num trials (default 1)] ``` diff --git a/examples/icp.cpp b/examples/icp.cpp index 552268c..964ad28 100644 --- a/examples/icp.cpp +++ b/examples/icp.cpp @@ -91,7 +91,7 @@ int main(int argc, char** argv) { for (size_t i = 0; i < source.size(); i++) { initial_discrete[gtsam::Symbol('d', i)] = 0; } - initial_values.insert(poseKey[0], gtsam::Pose3::identity()); + initial_values.insert(poseKey[0], gtsam::Pose3::Identity()); // Compute the first iterate. dcsam.update(hfg, initial_values, initial_discrete); diff --git a/examples/robust_pgo_mc.cpp b/examples/robust_pgo_mc.cpp index 4a302e5..f102525 100644 --- a/examples/robust_pgo_mc.cpp +++ b/examples/robust_pgo_mc.cpp @@ -61,7 +61,7 @@ void run_experiment3D(const gtsam::NonlinearFactorGraph& graph, // Keep track of known inliers (odometry) for GNC. size_t known_inlier_idx = 0; - std::vector knownInliers; + gtsam::GncParams::IndexVector knownInliers; // Add all good measurements. for (const auto& factor : graphWithOutliers) { @@ -433,7 +433,7 @@ void run_experiment2D(const gtsam::NonlinearFactorGraph& graph, // Keep track of known inliers (odometry) for GNC. size_t known_inlier_idx = 0; - std::vector knownInliers; + gtsam::GncParams::IndexVector knownInliers; // Add all good measurements. for (const auto& factor : graphWithOutliers) {