This is a C example with CMake management. Note that this example requires the
Point Cloud Library (PCL) ≥ 1.8 for reading
.pcd
files. You can install the library by the following command:
sudo apt install -y libpcl-dev
To build the project, please choose a proper one and execute the corresponding script:
- Pros: You don't need to install the KCP library (libkcp) to the system.
- Cons: You have to set a path to the KCP repository, and you need to re-compile KCP for each project.
mkdir build && cd build
cmake ..
make
- Pros: You can import the KCP library anywhere, without the path to the KCP repository. Moreover, you can re-use the shared library.
- Cons: You have to install the KCP library (libkcp) to the system.
mkdir build && cd build
cmake .. -DFIND_KCP_FROM_SYSTEM=ON
make
./main
The main function will read two point clouds from data, and perform the scan matching using KCP.