-
Notifications
You must be signed in to change notification settings - Fork 1
Tutorials: 3D Mapping (ros1)
This tutorial is not up to date with the recent changes in the mapper. Refer to the ROS 2 version of the mapping guide instead: https://norlab-icp-mapper.readthedocs.io/en/latest/UsingInRos/#__tabbed_2_2
This tutorial was created by Simon-Pierre Deschênes (Thanks 🎉). Note that a newer, ROS 2 version of this tutorial exists. You can find it here.
Copy the content from the Google Drive link in a folder named demo/ in your home folder.
(This tutorial is a copy from the PDF that you will find in the downloaded folder)
cd ~/
mkdir repos && cd repos/
git clone https://github.com/ethz-asl/libnabo.git
cd libnabo/
mkdir build && cd build/
cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
N.B.: By default, parallel compilation is disabled. You can add the -j option followed by a number to set the maximum number of parallel jobs after the make command to allow a faster compilation. If you put nothing after -j , there will be no limit to the number of jobs.
cd ~/repos/
git clone https://github.com/ethz-asl/libpointmatcher.git
cd libpointmatcher/
mkdir build && cd build/
cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
cd ~/repos/
git clone https://github.com/norlab-ulaval/norlab_icp_mapper.git
cd norlab_icp_mapper/
mkdir build && cd build/
cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
cd ~/
mkdir -p catkin_ws/src && cd catkin_ws/src/
git clone -b melodic https://github.com/norlab-ulaval/libpointmatcher_ros.git
cd ~/catkin_ws/src/
git clone -b melodic https://github.com/norlab-ulaval/norlab_icp_mapper_ros.git
cd ~/catkin_ws/src/
git clone -b melodic https://github.com/norlab-ulaval/mapper_config_template.git
cd ~/catkin_ws/
catkin_make
Behind the scenes, the mapper node takes a lidar point cloud, registers it in the existing map using libpointmatcher and add it at the right place in the map. All of this is done while keeping track of the pose of the robot. During this process, some filters are applied on point clouds before and after map updates. Furthermore, between map updates (slow), the mapper continuously localizes the robot in the map (fast) to ensure good localization at all times.
The mapper configuration template contains four important files :
- params/icp_config.yaml : This file contains the ICP parameters used by libpointmatcher to do the registration of new point clouds in the map.
- params/input_filters_config.yaml : This file contains the list of filters which are applied to the new point clouds before being processed.
- params/map_post_filters_config.yaml : This file contains the list of filters which are applied to the map after adding the new point cloud.
- launch/mapper.launch : This file contains general mapping parameters (e.g. map density, map update conditions, etc.)
Open the file ~/catkin_ws/src/mapper_config_template/launch/mapper.launch and change the following parameter: points_in : velodyne_points -> rslidar32_points
roscore
rosparam set use_sim_time true
roslaunch mapper_config_template mapper.launch
rviz -d ~/demo/config.rviz
rosbag play ~/demo/demo.bag --clock --keep-alive
Open the file ~/catkin_ws/src/mapper_config_template/launch/mapper.launch
and change
the following parameter:
min_dist_new_point : 0.03 -> 0.1
Open the file ~/catkin_ws/src/mapper_config_template/launch/mapper.launch
and change the following parameters:
-
map_update_condition
:overlap
->distance
-
map_update_distance
:0.5
->5
Open the file ~/catkin_ws/src/mapper_config_template/params/input_filters_config.yaml
and add the following lines:
- BoundingBoxDataPointsFilter:
xMin: -1.5
xMax: 0.5
yMin: -1
yMax: 1
zMin: -1
zMax: 0.5
removeInside: 1
Open the file ~/catkin_ws/src/mapper_config_template/params/map_post_filters_config.yaml
and add the following lines:
- SurfaceNormalDataPointsFilter:
knn: 15
- CutAtDescriptorThresholdDataPointsFilter:
descName: probabilityDynamic
useLargerThan: 1
threshold: 0.8
Open the file ~/catkin_ws/src/mapper_config_template/launch/mapper.launch
and change the following parameter:
compute_prob_dynamic
: false
-> true
rosservice call /save_map "map_file_name:
data: '$HOME/demo/demo.vtk'"
A detailed tutorial about the YAML configuration file of libpointmatcher is available here. Finally, a full list of the mapper parameters and their description can be found here.
- Warthog Teach and Repeat (ROS1)
- Warthog Teach and Repeat (ROS2)
- Time Synchronization
- Deployment of Robotic Total Stations (RTS)
- Deployment of the backpack GPS
- Warthog Emlid GPS
- Atlans-C INS
- How to use a CB Radio when going in the forest
- IP forwarding
- Lessons Learned
- Robots' 3D Models
- Order Management
- Fast track Master → PhD
- Intellectual Property
- Repository Guidelines
- TF Cheatsheet
- Montmorency Forest Wintertime Dataset
- RTS-GT Dataset 2023
- Deschenes2021 Dataset
- TIGS Dataset
- DRIVE Datasets
- BorealHDR
- TimberSeg 1.0
- DARPA Subterranean Challenge - Urban Dataset
- How to upload a dataset to VALERIA
- ROS1 Bridge
- Migrating a repository to ROS2 (Humble)
- ROS2 and rosbags
- MCAP rosbags
- DDS Configuration (work in progress)
- Using a USB Microphone with ROS2
- ROS2 in VSCode
- ROS2 Troubleshooting