Simple SLAM Package

Extract from Autoware.ai but improved the speed after refactor codes.

Introduction

Some words from README: https://github.com/Kin-Zhang/simple_ndt_slam

This package is extracted from autoware.ai 1.14.0 version, fix the empty tf problem, check the related pull request also and speed up the whole package, more efficient than pervious one, could run 10HZ stably in 4-core CPU

Package Usage:

  • Localization
  • Mapping
  • Mapping with ground point extract
  • [TODO] Dynamics points remove (Still doing expriments)

Effects shown here [remember modify the topic name on config]:

Running

Test on following system: Ubuntu 20.04 noetic, 18.04 melodic, 16.04 kinetic

Can run at any computer if using the docker

Option: docker

Provide the docker also:

# pull or build select one
docker pull zhangkin/ndt_mapping:refactor

docker build -t zhangkin/ndt_mapping:refactor .

Running inside:

docker run -it --net=host --name ndt_slam zhangkin/ndt_mapping:refactor /bin/zsh
cd src && git pull
cd .. && catkin build -DCMAKE_BUILD_TYPE=Release
roscore

# open another terminal
docker exec -it ndt_slam /bin/zsh
source devel/setup.zsh
roslaunch lidar_localizer ndt_mapping_docker.launch

Option: computer

Clone and running in your computer

mkdir -p ~/workspace/mapping_ws
cd ~/workspace/mapping_ws
git clone --recurse-submodules https://github.com/Kin-Zhang/simple_ndt_slam
mv simple_ndt_slam src

Install some dependences (glog, gflag)

cd src
sudo chmod +x ./assets/scripts/setup_lib.sh
sudo ./assets/scripts/setup_lib.sh

Opne src/packages/lidar_localizer/config/ndt_mapping.yaml, modify the topic name based on your robot setting:

lidar_topic: "/velodyne_points"

if you are running on the bag, remember to modify the bag path in the launch

<arg name="bag_file" default="/home/kin/bags/kitti/semantickitti_sequence11.bag" />
<node pkg="rosbag" type="play" name="bag_play" args="$(arg bag_file) --clock -r 0.8" required="false"/>

Build and run, please remember modify the config to point out correct topic name

cd ~/workspace/mapping_ws
catkin build -DCMAKE_BUILD_TYPE=Release
source devel/setup.zsh
roslaunch lidar_localizer ndt_mapping.launch

Running image with save map: