Skip to content

This repository has some example codes of pose graph optimization of a pose gragh based on GTSAM.

Notifications You must be signed in to change notification settings

TakuOkawara/pose_adjustment_demo

Repository files navigation

Overview

  • This repository has some examples of pose adjustment using a pose graph.
  • All pose graphs are implemented as a factor graph defined by GTSAM.
  • This repository was used for demonstration of this seminar.
    • セミナー名: SLAM(自己位置推定・地図構築)の基礎と高性能化技術および実装・実応用のポイント

Dependencies

  • gtsam
    • Library for factor graph optimization
  • iridescence
    • Library for visualization

We tested all codes with Ubuntu 22.04.

Preparation to execute sample codes

  • Please execute the following commands before executing sample codes.
  • All sample codes assume that you are in the build directory made by the following command.
git clone https://github.com/TakuOkawara/pose_adjustment_demo.git
cd pose_adjustment_demo
mkdir build
cd build

How to execute each sample code

  • This example is a small pose graph optimization using a pose graph.
  • We made this example referring to official gtsam tutorial
  • This code can be executed by the following commands
cd build
cmake ..
make
./small_pose_adjustment_2d 
  • This example is 2D pose graph optimization using a pose graph.
  • This code uses the Manhattan dataset.
  • This code can be executed by the following commands
cd build
cmake ..
make
./pose_adjustment_2d 
image
  • This example is 3D pose graph optimization using a pose graph.
  • This code uses the Sphere dataset.
  • This code can be executed by the following commands
cd build
cmake ..
make
./pose_adjustment_3d 
image
  • This example is 3D pose graph optimization using a pose graph implemented by a custom factor.
  • The custom factor is created by inheriting the NoiseModelFactor; thus this code is a tutorial to make a new factor (constraint for SLAM) using GTSAM.
    • This custom between factor is the same as gtsam::BetweenFactor< gtsam::Pose3 >.
  • Custom factors are important for implementing novel factors that are still not implemented in the official GTSAM repository, such as full_linear_wheel_odometry_factor
    • full_linear_wheel_odometry_factor is a custom factor to consider wheel slippage and wheel radius errors for skid-steering robots.
  • This code also uses the Sphere dataset; thus this result is the same as pose_adjustment_3d.cpp.
  • This code can be executed by the following commands
cd build
cmake ..
make
./pose_adjustment_3d_with_customfactor 

Trouble shooting

error while loading shared libraries: libmetis-gtsam.so: cannot open shared object file: No such file or directory

Please execute the following commands when the above execution error occurs.

echo "export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
source ~/.bashrc

About

This repository has some example codes of pose graph optimization of a pose gragh based on GTSAM.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published