diff --git a/README.md b/README.md index c3ecd3fff0964cd0df0ab1c362289a180db2abbc..fd4e66a095759be387bb7ec3a61a79ec5e44ee73 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 @@ -149,9 +150,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 +165,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 @@ -178,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. @@ -203,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 @@ -283,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. diff --git a/docker/Dockerfile.env b/docker/Dockerfile.env index b013de0f13950593fa24eb87599c2bb1971d21c9..31ff8593c0d2072b609ed69dd45a210cc9f02bde 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 c4e31f35b225cd5472088352b519a11a56b829b9..0371695d67dc2cfd7f21873c9ac080e0b9d92dca 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 diff --git a/docker/README.md b/docker/README.md index acca444b89f72cfef5047f6d1be812548ecd0c67..f0f39903000f5e1e88ff7e1ea7340060a5a7ea10 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 : diff --git a/docker/deps_install_scripts/install_nanoflann.sh b/docker/deps_install_scripts/install_nanoflann.sh index 09c8d8633e7fc0d6713a3333a141e2347adf77b1..74280ee282fc8525161a0b94ca762b21cbff3c29 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" diff --git a/docker/install_slam.bash b/docker/install_slam.bash index 9cb9ba6262d91485b0fd8c20803f6a09b25a5143..41b8f780636c0921dc6c8da4b0b9d2cef511ad6c 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 diff --git a/ros2_wrapping/lidar_slam/src/LidarSlamNode.cxx b/ros2_wrapping/lidar_slam/src/LidarSlamNode.cxx index 60696784138d026ee3970a3e54cc3ace5dd21505..4b8045c3a08630fb2f83f0b76d5abe38b771df5e 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