All Projects → mit-acl → clipper

mit-acl / clipper

Licence: MIT license
graph-theoretic framework for robust pairwise data association

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
matlab
3953 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to clipper

Robotlib.jl
Robotics library written in the Julia programming language
Stars: ✭ 32 (-66.67%)
Mutual labels:  sensor-calibration
vicon2gt
Vicon-IMU fusion for groundtruth trajectory generation.
Stars: ✭ 41 (-57.29%)
Mutual labels:  sensor-calibration
simpleICP
Implementations of a rather simple version of the Iterative Closest Point algorithm in various languages.
Stars: ✭ 140 (+45.83%)
Mutual labels:  point-cloud-registration
superpose3d
register 3D point clouds using rotation, translation, and scale transformations.
Stars: ✭ 34 (-64.58%)
Mutual labels:  point-cloud-registration
rgbd ptam
Python implementation of RGBD-PTAM algorithm
Stars: ✭ 65 (-32.29%)
Mutual labels:  loop-closure
li slam ros2
ROS2 package of tightly-coupled lidar inertial ndt/gicp slam
Stars: ✭ 160 (+66.67%)
Mutual labels:  loop-closure
SALSA-Semantic-Assisted-SLAM
SALSA: Semantic Assisted Life-Long SLAM for Indoor Environments (16-833 SLAM Project at CMU)
Stars: ✭ 52 (-45.83%)
Mutual labels:  loop-closure
ndt map
SLAM package using NDT registration library of Autoware with loop-closure detection (odometry based) referenced from lego_loam.
Stars: ✭ 115 (+19.79%)
Mutual labels:  loop-closure
Awesome Point Cloud Analysis
A list of papers and datasets about point cloud analysis (processing)
Stars: ✭ 3,104 (+3133.33%)
Mutual labels:  point-cloud-registration
deepgmr
PyTorch implementation of DeepGMR: Learning Latent Gaussian Mixture Models for Registration (ECCV 2020 spotlight)
Stars: ✭ 97 (+1.04%)
Mutual labels:  point-cloud-registration

banner

CLIPPER: A Graph-Theoretic Framework for Robust Data Association

Data association is a fundamental problem in robotics and autonomy. CLIPPER provides a framework for robust, pairwise data association and is applicable in a wide variety of problems (e.g., point cloud registration, sensor calibration, place recognition, etc.). By leveraging the notion of geometric consistency, a graph is formed and the data association problem is reduced to the maximum clique problem. This NP-hard problem has been studied in many fields, including data association, and solutions techniques are either exact (and not scalable) or approximate (and potentially imprecise). CLIPPER relaxes this problem in a way that (1) allows guarantees to be made on the solution of the problem and (2) is applicable to weighted graphs, avoiding the loss of information due to binarization which is common in other data association work. These features allow CLIPPER to achieve high performance, even in the presence of extreme outliers.

This repo provides both MATLAB and C++ implementations of the CLIPPER framework. In addition, Python bindings, Python, C++, and MATLAB examples are included.

Citation

If you find this code useful in your research, please cite our paper:

  • P. C. Lusk, K. Fathian and J. P. How, "CLIPPER: A Graph-Theoretic Framework for Robust Data Association," 2021 IEEE International Conference on Robotics and Automation (ICRA), 2021, pp. 13828-13834, doi: 10.1109/ICRA48506.2021.9561069. (pdf) (video)
@inproceedings{lusk2021clipper,
  title={{CLIPPER}: A graph-theoretic framework for robust data association},
  author={Lusk, Parker C and Fathian, Kaveh and How, Jonathan P},
  booktitle={2021 IEEE International Conference on Robotics and Automation (ICRA)},
  pages={13828--13834},
  year={2021},
  organization={IEEE}
}

Getting Started

After cloning this repo, please build using cmake:

$ mkdir build
$ cd build
$ cmake ..
$ make

Once successful, the C++ tests can be run with ./test/tests (if -DBUILD_TESTS=ON is added to cmake .. command).

Python Bindings

If Python bindings are built (see configuration options below), then the clipper Python module will need to be installed before using. This can be done with

$ cd build
$ make pip-install

# or directly using pip (e.g., to control which python version)
$ python3 -m pip install build/bindings/python # 'python3 -m' ensures appropriate pip version is used

Note: if using Python2 (e.g., < ROS Noetic), you must tell pybind11 to use Python2.7. Do this with adding the flag -DPYBIND11_PYTHON_VERSION=2.7 to the cmake .. command. You may have to remove your build directory and start over to ensure nothing is cached. You should see that pybind11 finds a Python2.7 interpreter and libraries.

A Python example notebook can be found in examples.

MATLAB Bindings

If MATLAB is installed on your computer and MATLAB bindings are requested (see configuration options below), then cmake will attempt to find your MATLAB installation and subsequently generate a set of MEX files so that CLIPPER can be used in MATLAB.

Note that in addition to the C++/MEX version of CLIPPER's dense cluster finder, we provide a reference MATLAB version of our projected gradient ascent approach to finding dense clusters.

Please find MATLAB examples here.

Configuring the Build

The following cmake options are available when building CLIPPER:

Option Description Default
BUILD_BINDINGS_PYTHON Uses pybind11 to create Python bindings for CLIPPER ON
BUILD_BINDINGS_MATLAB Attempts to build MEX files which are required for the MATLAB examples. A MATLAB installation is required. Gracefully fails if not found. OFF
BUILD_TESTS Builds C++ tests OFF
BUILD_BENCHMARKS Builds C++ timing benchmarks OFF
ENABLE_MKL Attempts to use Intel MKL (if installed) with Eigen for accelerated linear algebra. OFF
ENABLE_BLAS Attempts to use a BLAS with Eigen for accelerated linear algebra. OFF

Note: The options ENABLE_MKL and ENABLE_BLAS are mutually exclusive.

These cmake options can be set using the syntax cmake -DENABLE_MKL=ON .. or using the ccmake . command (both from the build dir).

Performance with MKL vs BLAS

On Intel CPUs, MKL should be preferred as it offers superior performance over other general BLAS packages. Also note that on Ubuntu, OpenBLAS (sudo apt install libopenblas-dev) provides better performance than the default installed blas.

With MKL, we have found an almost 2x improvement in runtime over the MATLAB implementation. On an i9, the C++/MKL implementation can solve problems with 1000 associations in 70 ms.

Note: Currently, MATLAB bindings do not work if either BLAS or MKL are enabled. Python bindings do not work if MKL is enabled.

Including in Another C++ Project

A simple way to include clipper as a shared library in another C++ project is via cmake. This method will automatically clone and build clipper, making the resulting library accessible in your main project. In the project CMakeLists.txt you can add

set(CLIPPER_DIR "${CMAKE_CURRENT_BINARY_DIR}/clipper-download" CACHE INTERNAL "CLIPPER build dir" FORCE)
set(BUILD_BINDINGS_MATLAB OFF CACHE BOOL "")
set(BUILD_TESTS OFF CACHE BOOL "")
set(ENABLE_MKL OFF CACHE BOOL "")
set(ENABLE_BLAS OFF CACHE BOOL "")
configure_file(cmake/clipper.cmake.in ${CLIPPER_DIR}/CMakeLists.txt IMMEDIATE @ONLY)
execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . WORKING_DIRECTORY ${CLIPPER_DIR})
execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY ${CLIPPER_DIR})
add_subdirectory(${CLIPPER_DIR}/src ${CLIPPER_DIR}/build)

where cmake/clipper.cmake.in looks like

cmake_minimum_required(VERSION 3.10)
project(clipper-download NONE)

include(ExternalProject)
ExternalProject_Add(clipper
    GIT_REPOSITORY      "https://github.com/mit-acl/clipper"
    GIT_TAG             main
    SOURCE_DIR          "${CMAKE_CURRENT_BINARY_DIR}/src"
    BINARY_DIR          "${CMAKE_CURRENT_BINARY_DIR}/build"
    CONFIGURE_COMMAND   ""
    BUILD_COMMAND       ""
    INSTALL_COMMAND     ""
    TEST_COMMAND        ""
)

Then, you can link your project with clipper using the syntax target_link_libraries(yourproject clipper).


This research is supported by Ford Motor Company.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].