Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.15)
project(dcsam_examples)

# Set some compilation options.
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)

Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
```
2 changes: 1 addition & 1 deletion examples/icp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions examples/robust_pgo_mc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t> knownInliers;
gtsam::GncParams<gtsam::LevenbergMarquardtParams>::IndexVector knownInliers;

// Add all good measurements.
for (const auto& factor : graphWithOutliers) {
Expand Down Expand Up @@ -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<size_t> knownInliers;
gtsam::GncParams<gtsam::LevenbergMarquardtParams>::IndexVector knownInliers;

// Add all good measurements.
for (const auto& factor : graphWithOutliers) {
Expand Down