iterative closest points
CEV ICP algorithm library
Loading...
Searching...
No Matches
Introduction

Overview

Scan-matching is a method for localization that uses high-frequency LiDAR data. This project is Ethan's implementation of algorithms for scan-matching. Please read this document to learn more about the math.

Item Location
Documentation icp::ICP
Repository https://github.com/cornellev/icp
Contents Overview
Features
Install
Usage

Features

  • ICP library for integration with robotics systems and other use cases
  • Interactive (graphical) visualization of point clouds

Install

Warning
This section applies only to Unix-like operating systems, such as MacOS and Linux.

First, download and install the dependencies. Only eigen3 is necessary for the library. If you only wish to build the library, install eigen3 only. The remaining dependencies are only for the visualization tool.

Dependency Library Location (at which) Header Location (under which)
eigen3 N/A /usr/local/include/eigen3/
SDL2 $(sdl2-config --cflags) $(sdl2-config --libs)
My SDL2 wrapper /usr/local/lib/libsdlwrapper.a /usr/local/include/sdlwrapper/
libcmdapp2 /usr/local/lib/libcmdapp.a /usr/local/include/
libconfig /usr/local/lib/libconfig.a /usr/local/include/

There is also a dependency on simple-test if you want to run the tests (make test). Please follow the installation instructions there.

It is likely that you already have SDL installed. If not, follow the instructions at the link provided (which goes to the SDL website). Do the same for eigen3. Then, to download and install the remaining dependencies, run

# install libcmdapp
git clone https://github.com/ethanuppal/libcmdapp2.git
cd libcmdapp2
sudo make install
cd ..
# install libconfig
git clone https://github.com/ethanuppal/config.git
cd config
sudo make install
cd ..
# install sdl-wrapper
git clone https://github.com/cornellev/sdl-wrapper.git
cd config
sudo make install
cd ..

If you encounter any errors in this process, please open an issue on the corresponding repositories, and I will try to resolve it as soon as possible.

Finally, you can clone the icp repository.

git clone https://github.com/cornellev/icp.git
cd icp

You should run make test to make sure everything has been setup correctly for the library.

Usage

Library

Follow the instructions in the INSTALL.md document to install locally. The library contains tested implementations of different ICP algorithms. Common to all of them is the icp::ICP interface, the documentation for which describes how to construct and use these implementations. Read the documentation of the specific implementations for more information:

Optionally, read Writing an ICP Instance to use your own ICP implementations.

Visualization & Benchmarking Tool

The following command visualizes the two LiDAR scans at the given files. Instructions are printed to standard output.

make
./main \
-S ex_data/scan1/first.conf \
-D ex_data/scan1/second.conf \
--method vanilla \
--gui

You can benchmark with make bench; by default, this will pass -mvanilla.

The program itself can be built with

make

which will create an executable named main in the working directory. You can query ./main -h and ./main -v for usage and versioning information.