Skip to content

Modular, open-source implementations of continuous-time simultaneous localization and mapping algorithms.

License

Notifications You must be signed in to change notification settings

VIS4ROB-lab/HyperSLAM

HyperSLAM

Modular, open-source implementations of continuous-time simultaneous localization and mapping algorithms.
Report Issues or Request Features


About

HyperSLAM provides an extensive and modular software stack which targets the challenging task of Continuous-Time Simultaneous Localization and Mapping (CTSLAM) in a principled manner, and aims to evolve into an indispensable link between discrete- and continuous-time optimizations for fusing sensory information from arbitrary sensor suites in real-time. The current release focuses on continuous-time representations (i.e. B-Splines) and formulates the continuous-time SLAM problem as an online, sliding window, Non-Linear-Least-Squares (NLLS) optimization based on the Ceres solver.

Note: Development on HyperSLAM-related repositories has been discontinued. If you are interested in obtaining the original software stack related to our publication "Continuous-Time Stereo-Inertial Odometry" (provided as is), please feel free to contact us.

If you use the HyperSLAM ecosystem, please cite it as below.

@article{RAL2022Hug,
    author={Hug, David and B\"anninger, Philipp and Alzugaray, Ignacio and Chli, Margarita},
    journal={IEEE Robotics and Automation Letters},
    title={Continuous-Time Stereo-Inertial Odometry},
    year={2022},
    volume={7},
    number={3},
    pages={6455-6462},
    doi={10.1109/LRA.2022.3173705}
}

Setup & Installation

Preliminaries

This framework relies on relatively new features in the C++ standard and, hence, relies on recent GNU (GCC/G++) compilers as well as novel language standards defined in C++17 and C++20. Furthermore, the main development and testing was done on Ubuntu 20.04 LTS (Focal Fossa) with ROS Noetic Ninjemys, which can be set up as explained below.

  • Install Ubuntu 20.04 LTS (Focal Fossa) or Ubuntu 18.04 LTS (Bionic Beaver).

  • Install CMake and GNU (GCC/G++) alternatives.

    # Install essentials.
    sudo apt update
    sudo apt install build-essential cmake git
    
    # Remove alternatives.
    sudo update-alternatives --remove-all gcc 
    sudo update-alternatives --remove-all g++
    
    # Install compilers.
    sudo apt install gcc-10 g++-10 gcc-9 g++-9
    
    # Set alternatives.
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 20
    sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
    
    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 10
    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 20
    sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
    
    sudo update-alternatives --set cc /usr/bin/gcc
    sudo update-alternatives --set c++ /usr/bin/g++
    
    # Configure alternatives.
    sudo update-alternatives --config gcc
    sudo update-alternatives --config g++
    
  • Install ROS Noetic Ninjemys (20.04) or ROS Melodic Morenia (18.04), depending on the selected Ubuntu version, by following the official installation documentation or the outlined steps below.

    # Setup sources.
    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" \
    > /etc/apt/sources.list.d/ros-latest.list'
    
    # Setup keys.
    sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' \
    --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
    
    # Update index.
    sudo apt update
    
    # Install ROS.
    sudo apt install ros-noetic-desktop-full
    
    # Source the installation.
    echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    
    echo "source /opt/ros/noetic/setup.zsh" >> ~/.zshrc
    source ~/.zshrc
    

Dependencies

Aside from the previous requirements, HyperSLAM also exposes several, additional dependencies: BLAS, LAPACK, gflags (installation from source), glog, gtest (installation from source), gbench (installation from source), Boost, Eigen, OpenCV (installation from source or with additional modules), Ceres Solver 2.0 (or higher versions) and yaml-cpp, which are installed as follows. Note, this step may become obsolete in the future with the introduction of an automated installation.

# Install glog.
# Note: MUST be installed from source!

# Install packages.
sudo apt install libatlas-base-dev libgflags-dev \
googletest libbenchmark-dev libboost-all-dev libeigen3-dev libopencv-dev \
libsuitesparse-dev libceres-dev libyaml-cpp-dev

# Install the Cerese solver.
# Note: MUST be installed from source (with version 2.0 or higher)!

IDE Setup (optional)

We recommend using CLion as the IDE of choice. Having followed this installation guide, and having cloned and loaded the HyperSLAM repository, two additional steps are required to correctly source the ROS installation. Specifically, CMAKE_PREFIX_PATH=/opt/ros/noetic/share/ must be added to the environment variables under Setting > Build, Execution, Deployment > CMake. A similar step is required to use the shared ROS libraries by adding LD_LIBRARY_PATH=/opt/ros/noetic/lib to the runtime environment.

Build & Run

All executables are written to the bin folder, and the two flags HYPER_ENABLE_TESTING and HYPER_ENABLE_BENCHMARKING are used to control whether the testing and benchmarking executables are compiled alongside the main executable.

# Configuration.
mkdir build && cd build
cmake ..

# Compilation
make -j8 (-DHYPER_ENABLE_TESTING -DHYPER_ENABLE_BENCHMARKING)

We refer to the README.md in the evaluation folder to run HyperSLAM.

Literature

  1. Continuous-Time Stereo-Inertial Odometry, Hug et al. (2022)
  2. HyperSLAM: A Generic and Modular Approach to Sensor Fusion and Simultaneous
    Localization And Mapping in Continuous-Time, Hug and Chli (2020)
  3. Efficient Derivative Computation for Cumulative B-Splines on Lie Groups, Sommer et al. (2020)
  4. A Micro Lie Theory for State Estimation in Robotics, Solà et al. (2018)
  5. A Primer on the Differential Calculus of 3D Orientations, Bloesch et al. (2016)
  6. A Generic Camera Model and Calibration Method for Conventional,
    Wide-Angle, and Fish-Eye Lenses, Kannala and Brandt (2006)
  7. Single View Point Omnidirectional Camera Calibration from Planar Grids, Mei and Rives (2007)

Updates

24.10.22 Release of HyperSLAM (beta).
25.07.22 Release of HyperSensors submodule.
19.07.22 Release of HyperState submodule.
17.06.22 Release of HyperVariables submodule.

Contact

Admin - David Hug, Leonhardstrasse 21, 8092 Zürich, ETH Zürich, Switzerland
Maintainer - Philipp Bänninger, Leonhardstrasse 21, 8092 Zürich, ETH Zürich, Switzerland
Maintainer - Ignacio Alzugaray, Leonhardstrasse 21, 8092 Zürich, ETH Zürich, Switzerland

License

HyperSLAM is distributed under the BSD-3-Clause License.

About

Modular, open-source implementations of continuous-time simultaneous localization and mapping algorithms.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks