How to install mp2p_icp:

Probably the easiest way to get mp2p_icp:

sudo apt install ros-${ROS_DISTRO}-mp2p-icp

Clone the project git repository and its submodules:

mkdir -p ~/code/mp2p_icp && cd ~/code/mp2p_icp
git clone --recurse-submodules
  • A C++17 compiler

  • CMake >=3.4

  • MRPT >= 2.11.5

Follow the installation instructions for MRPT

sudo apt install ros-$ROS_DISTRO-mrpt2
# MRPT, from this PPA, or from its ROS package, or build from sources if preferred:
sudo add-apt-repository ppa:joseluisblancoc/mrpt
sudo apt update
sudo apt install libmrpt-dev mrpt-apps

Classic cmake stuff:

mkdir build-Release
cmake -B build-Release -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build-Release
(cd build-Release  && make test)  # to run tests

You can build mp2p_icp within a ROS 2 workspace using colcon, just as with any other package:

mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone --recurse-submodules
cd ~/ros2_ws/
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
. install/setup.bash