From 1b9208640aaa41de1afb89a1ff18a8fa355293f0 Mon Sep 17 00:00:00 2001 From: "tong.fu" Date: Wed, 14 Jan 2026 11:18:35 +0100 Subject: [PATCH 1/6] [ROS2][fix] Check cv_bridge header To fix the build problem with ROS2 Jazzy --- ros2_wrapping/lidar_slam/src/LidarSlamNode.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ros2_wrapping/lidar_slam/src/LidarSlamNode.cxx b/ros2_wrapping/lidar_slam/src/LidarSlamNode.cxx index 606967841..4b8045c3a 100644 --- a/ros2_wrapping/lidar_slam/src/LidarSlamNode.cxx +++ b/ros2_wrapping/lidar_slam/src/LidarSlamNode.cxx @@ -30,7 +30,11 @@ #include #ifdef USE_CV_BRIDGE -#include + #if __has_include() + #include + #else + #include + #endif #endif //? #include -- GitLab From 78d1d47366d15c040ad694b863e3a4b3e1bb56ac Mon Sep 17 00:00:00 2001 From: "tong.fu" Date: Wed, 14 Jan 2026 16:14:39 +0100 Subject: [PATCH 2/6] [fix] Fix slam version for docker --- docker/install_slam.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/install_slam.bash b/docker/install_slam.bash index 9cb9ba626..41b8f7806 100644 --- a/docker/install_slam.bash +++ b/docker/install_slam.bash @@ -1,7 +1,7 @@ #!/bin/sh set -e -git clone https://gitlab.kitware.com/keu-computervision/slam -b feat/ROS2 slam/src/slam +git clone https://gitlab.kitware.com/keu-computervision/slam slam/src/slam cd slam source /opt/ros/$ROS_DISTRO/setup.bash colcon build --base-paths src/slam/ros2_wrapping --cmake-args -DCMAKE_BUILD_TYPE=Release -DENABLE_g2o=true -- GitLab From 530582fd8b2e574526cee6462d401f94c5b05a39 Mon Sep 17 00:00:00 2001 From: "tong.fu" Date: Thu, 15 Jan 2026 17:12:34 +0100 Subject: [PATCH 3/6] [docker] Update nanoflann version --- docker/deps_install_scripts/install_nanoflann.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/deps_install_scripts/install_nanoflann.sh b/docker/deps_install_scripts/install_nanoflann.sh index 09c8d8633..74280ee28 100644 --- a/docker/deps_install_scripts/install_nanoflann.sh +++ b/docker/deps_install_scripts/install_nanoflann.sh @@ -3,7 +3,7 @@ set -e readonly nanoflann_repo="https://github.com/jlblancoc/nanoflann.git" -readonly nanoflann_commit="v1.4.3" +readonly nanoflann_commit="v1.7.1" readonly nanoflann_root="$HOME/nanoflann" readonly nanoflann_src="$nanoflann_root/src" -- GitLab From e0ab4a951c99ee13993f87d2785fe5d9f9576cf6 Mon Sep 17 00:00:00 2001 From: "tong.fu" Date: Thu, 15 Jan 2026 17:12:55 +0100 Subject: [PATCH 4/6] [docker] Update docker image link --- README.md | 11 ++++++++--- docker/README.md | 4 +++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c3ecd3fff..0226435fe 100644 --- a/README.md +++ b/README.md @@ -149,9 +149,14 @@ The ROS1 wrapping has been tested on Linux only. Please refer to [ROS1/SlamRos1W ## ROS2 wrapping on Linux -You can download the ROS2 package in [the artifacts of the CI pipeline](https://gitlab.kitware.com/keu-computervision/slam/-/pipelines) for any version. +You can download the ROS2 package in [the artifacts of the CI pipeline](https://gitlab.kitware.com/keu-computervision/slam/-/pipelines) for any SLAM version. + +Full SLAM docker images for different ROS distributions are available: +- ROS2 Humble: [download link](https://send.kitware.io/download.php?id=3409&token=494aad1e318ae65ab997b866a310c66b) +- ROS2 Jazzy: [download link](https://send.kitware.io/download.php?id=3411&token=f87dedee1cc685db5ad800805ad805c1) + +A recent docker image can also be found in [the artifacts of master branch](https://gitlab.kitware.com/keu-computervision/slam/-/pipelines?page=1&scope=all&ref=master) if it was triggered manually. -A docker image can be found in [the artifacts of master branch](https://gitlab.kitware.com/keu-computervision/slam/-/pipelines?page=1&scope=all&ref=master) if it has been triggered manually. You can load and run this image with : ``` @@ -159,7 +164,7 @@ docker load -i slam_image.tar docker run -it --rm slam: bash ``` -replacing CURRENT_COMMIT with the image commit sha. +Replace CURRENT_COMMIT with the image commit sha. ### Dependencies diff --git a/docker/README.md b/docker/README.md index acca444b8..f0f399030 100644 --- a/docker/README.md +++ b/docker/README.md @@ -4,7 +4,9 @@ ### Download docker images -A full SLAM docker image is available on [this link](https://send.kitware.io/download.php?id=2329&token=yyoAxvfKEYECXOhxedzjkFMSVzkhKI66) +Full SLAM docker images for different ROS distributions are available: +- ROS2 Humble: [download link](https://send.kitware.io/download.php?id=3409&token=494aad1e318ae65ab997b866a310c66b) +- ROS2 Jazzy: [download link](https://send.kitware.io/download.php?id=3411&token=f87dedee1cc685db5ad800805ad805c1) Apply this command to add it locally to your system : -- GitLab From 2ac98615b2dc9fcba7b02b5b1c784964391b817d Mon Sep 17 00:00:00 2001 From: "tong.fu" Date: Mon, 19 Jan 2026 17:22:47 +0100 Subject: [PATCH 5/6] [doc] Change maintainer name --- docker/Dockerfile.env | 2 +- docker/Dockerfile.slam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile.env b/docker/Dockerfile.env index b013de0f1..31ff8593c 100644 --- a/docker/Dockerfile.env +++ b/docker/Dockerfile.env @@ -1,5 +1,5 @@ FROM osrf/ros:humble-desktop-full -LABEL maintainer="Julia Sanchez julia.sanchez@kitware.com" +LABEL maintainer="Tong Fu tong.fu@kitware.com" # Install Slam ROS dependencies RUN apt update diff --git a/docker/Dockerfile.slam b/docker/Dockerfile.slam index c4e31f35b..0371695d6 100644 --- a/docker/Dockerfile.slam +++ b/docker/Dockerfile.slam @@ -1,5 +1,5 @@ FROM gitlab.kitware.com:4567/keu-computervision/slam/ros2_env -LABEL maintainer="Julia Sanchez julia.sanchez@kitware.com" +LABEL maintainer="Tong Fu tong.fu@kitware.com" WORKDIR /root -- GitLab From 596b8f3265415ed9ac2f73c16f769dbe7974fb2a Mon Sep 17 00:00:00 2001 From: "tong.fu" Date: Mon, 19 Jan 2026 17:58:48 +0100 Subject: [PATCH 6/6] [doc] Update installation documentation --- README.md | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 0226435fe..fd4e66a09 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ This repository contains a SLAM system developed by Kitware, primarily based on 3D LiDAR. It also supports external sensors such as INS, IMU, GPS, and cameras to enhance SLAM accurancy. Paraview and ROS1 / ROS2 wrappers are provided for easier integration. -**/!\ Note: The support for ROS1 package is available in the [ROS1/SlamRos1Wrapping](https://gitlab.kitware.com/keu-computervision/slam/-/tree/ROS1/SlamRos1Wrapping?ref_type=heads) branch. Since ROS Noetic will reach end-of-life in May 2025, and the branch for ROS1 will no longer be maintained after that date.** +**/!\ Note: The support for ROS1 package is available in the [ROS1/SlamRos1Wrapping](https://gitlab.kitware.com/keu-computervision/slam/-/tree/ROS1/SlamRos1Wrapping?ref_type=heads) branch. Since ROS Noetic reached end-of-life in May 2025, and the branch for ROS1 is no longer maintained after that date.** It has been successfully tested on data from several common LiDAR sensors: - Velodyne (VLP-16, VLP-32c, HDL-32, HDL-64, VLS-128) @@ -58,6 +58,7 @@ Repo contents : - `ros2_wrapping/`: ROS2 packages to enable SLAM use on a ROS2 system. - `paraview_wrapping/`: ParaView plugin to enable SLAM use with ParaView/LidarView. - `ci/`: continuous integration files to automatically build and check *LidarSlam* lib. +- `docker`: Dockerfiles to build SLAM images - `CMakeLists.txt`: *CMakeLists* used to call to build core *LidarSlam* lib and *paraview_wrapping*. ## Core SLAM lib @@ -183,23 +184,25 @@ _Example:_ velodyne driver installation Install the updated Velodyne driver using: ``` -sudo apt install ros-$ROS_DISTRO-velodyne` +sudo apt install ros-$ROS_DISTRO-velodyne ``` ### Installation Clone this git repo directly into your colcon workspace (referred to as **colcon_ws** in the guide), under the src directory: - ```bash - cmake -E make_directory colcon_ws && cd colcon_ws - git clone https://gitlab.kitware.com/keu-computervision/slam.git src/slam --recursive +```bash +cmake -E make_directory colcon_ws && cd colcon_ws +git clone https://gitlab.kitware.com/keu-computervision/slam.git src/slam --recursive ``` The next sections describe how to install the required dependencies (both mandatory and optional) and to build the SLAM packages with the necessary features. **Prerequisite:** Install pcl-ros Before proceeding, ensure pcl-ros is installed. You can install it using apt as follows: - `sudo apt-get install -y ros-$ROS_VERSION-pcl-ros` +```bash +sudo apt-get install -y ros-$ROS_VERSION-pcl-ros +``` **NOTE**: Boost, g2o, Eigen, Ceres and PCL should be already installed from previous setup steps. @@ -208,17 +211,25 @@ Before proceeding, ensure pcl-ros is installed. You can install it using apt as This method applies if you have installed all required dependencies on your system, such as through package managers like `apt`. **NOTE**: The only missing dependency at this point should be nanoflann. You can install it using: - `sudo apt-get install -y libnanoflann-dev`. +```bash +sudo apt-get install -y libnanoflann-dev +``` -##### BUilding the SLAM packages +##### Building the SLAM packages Run the following command to build the ROS2 SLAM packages: -`colcon build --base-paths src/slam/ros2_wrapping` +```bash +colcon build --base-paths src/slam/ros2_wrapping +``` or for optimized performance (highly recommended when using Eigen), use: -`colcon build --base-paths src/slam/ros2_wrapping --cmake-args -DCMAKE_BUILD_TYPE=Release` +```bash +colcon build --base-paths src/slam/ros2_wrapping --cmake-args -DCMAKE_BUILD_TYPE=Release +``` The variable base_paths must point to the path of the ros2_wrapping folder. By default, this will build the *LidarSlam* library before ROS2 packages. If you prefer to use your system LidarSlam, set `BUILD_SLAM_LIB` to `OFF`: -`colcon build --base-paths src/slam/ros2_wrapping --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_SLAM_LIB=OFF` +```bash +colcon build --base-paths src/slam/ros2_wrapping --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_SLAM_LIB=OFF +``` #### With local dependencies @@ -288,13 +299,13 @@ Example : For Velodyne : ```bash ros2 launch lidar_slam slam_velodyne.launch.py use_sim_time:=false -ros2 lidar_slam slam_velodyne.launch.py use_sim_time:=false gps:=true # if GPS/SLAM calibration has to be run +ros2 lidar_slam slam_velodyne.launch.py use_sim_time:=false ``` For Ouster : ```bash ros2 launch lidar_slam slam_ouster.launch.py replay:=false -ros2 launch lidar_slam slam_ouster.launch.py replay:=false gps:=true # if GPS/SLAM calibration has to be run +ros2 launch lidar_slam slam_ouster.launch.py replay:=false ``` See [ros2_wrapping/lidar_slam/README.md](ros2_wrapping/lidar_slam/README.md) for more details. -- GitLab