SSL_SLAM2: Lightweight 3-D Localization and Mapping for Solid-State LiDAR (mapping and localization separated) ICRA 2021

Overview

SSL_SLAM2

Lightweight 3-D Localization and Mapping for Solid-State LiDAR (Intel Realsense L515 as an example)

This repo is an extension work of SSL_SLAM. Similar to RTABMAP, SSL_SLAM2 separates the mapping module and localization module. Map saving and map optimization is enabled in the mapping unit. Map loading and localization is enabled in the localziation unit.

This code is an implementation of paper "Lightweight 3-D Localization and Mapping for Solid-State LiDAR", published in IEEE Robotics and Automation Letters, 2021 paper

A summary video demo can be found at Video

Modifier: Wang Han, Nanyang Technological University, Singapore

Running speed: 20 Hz on Intel NUC, 30 Hz on PC

1. Solid-State Lidar Sensor Example

1.1 Scene reconstruction example

1.2 Localization with built map

1.3 Comparison

2. Prerequisites

2.1 Ubuntu and ROS

Ubuntu 64-bit 18.04.

ROS Melodic. ROS Installation

2.2. Ceres Solver

Follow Ceres Installation.

2.3. PCL

Follow PCL Installation.

Tested with 1.8.1

2.4. GTSAM

Follow GTSAM Installation.

2.5. Trajectory visualization

For visualization purpose, this package uses hector trajectory sever, you may install the package by

sudo apt-get install ros-melodic-hector-trajectory-server

Alternatively, you may remove the hector trajectory server node if trajectory visualization is not needed

3. Sensor Setup

If you have new Realsense L515 sensor, you may follow the below setup instructions

3.1 L515

3.2 Librealsense

Follow Librealsense Installation

3.3 Realsense_ros

Copy realsense_ros package to your catkin folder

    cd ~/catkin_ws/src
    git clone https://github.com/IntelRealSense/realsense-ros.git
    cd ..
    catkin_make

4. Build SSL_SLAM2

4.1 Clone repository:

    cd ~/catkin_ws/src
    git clone https://github.com/wh200720041/ssl_slam2.git
    cd ..
    catkin_make
    source ~/catkin_ws/devel/setup.bash

4.2 Download test rosbag

You may download our recorded data: MappingTest.bag (3G) and LocalizationTest.bag (6G)if you dont have realsense L515, and by defult the file should be under home/user/Downloads

unzip the file (it may take a while to unzip)

cd ~/Downloads
unzip LocalizationTest.zip
unzip MappingTest.zip

4.3 Map Building

map optimization and building

    roslaunch ssl_slam2 ssl_slam2_mapping.launch

The map optimization is performed based on loop closure, you have to specify the loop clousre manually in order to trigger global optimization. To save map, open a new terminal and

  rosservice call /save_map

Upon calling the serviece, the map will be automatically saved. It is recommended to have a loop closure to reduce the drifts. Once the service is called, loop closure will be checked. For example, in the rosbag provided, the loop closure appears at frame 1060-1120, thus, when you see "total_frame 1070" or "total_frame 1110" you may immediately type

  rosservice call /save_map

Since the current frame is between 1060 and 1120, the loop closure will be triggered automatically and the global map will be optimized and saved

4.4 Localization

Type

    roslaunch ssl_slam2 ssl_slam2_localization.launch

If your map is large, it may takes a while to load

4.5 Parameters Explanation

The map size depends on number of keyframes used. The more keyframes used for map buildin, the larger map will be.

min_map_update_distance: distance threshold to add a keyframe. higher means lower update rate. min_map_update_angle: angle threshold to add a keyframe. higher means lower update rate. min_map_update_frame: time threshold to add a keyframe. higher means lower update rate.

4.6 Relocalization

The relocalization module under tracking loss is still under development. You must specify the robot init pose w.r.t. the map coordinate if the starting position is not the origin of map. You can set this by

    <param name="offset_x" type="double" value="0.0" />
    <param name="offset_y" type="double" value="0.0" />
    <param name="offset_yaw" type="double" value="0.0" />

4.7 Running speed

The realsense is running at 30Hz and some computer may not be able to support such high processing rate. You may reduce the processing rate by skipping frames. You can do thid by setting the

<param name="skip_frames" type="int" value="1" />

1 implies no skip frames, i.e., 30Hz; implies skip 1 frames, i.e., 15Hz. For small map building, you can do it online. however, it is recommended to record a rosbag and build map offline for large mapping since the dense map cannot be generated in real-time.

5 Map Building with multiple loop closure places

5.1 Dataset

You may download a larger dataset LargeMappingTest.bag (10G), and by defult the file should be under home/user/Downloads

unzip the file (it may take a while to unzip)

cd ~/Downloads
unzip LargeMappingTest.zip

5.2 Map Building

Two loop closure places appear at frame 0-1260 and 1270-3630, i.e., frame 0 and frame 1260 are the same place, frame 1270 adn 3630 are the same place. Run

    roslaunch ssl_slam2 ssl_slam2_large_mapping.launch

open a new terminal, when you see "total_frame 1260", immediately type

  rosservice call /save_map

when you see "total_frame 3630", immediately type again

  rosservice call /save_map

6. Citation

If you use this work for your research, you may want to cite the paper below, your citation will be appreciated

@article{wang2021lightweight,
  author={H. {Wang} and C. {Wang} and L. {Xie}},
  journal={IEEE Robotics and Automation Letters}, 
  title={Lightweight 3-D Localization and Mapping for Solid-State LiDAR}, 
  year={2021},
  volume={6},
  number={2},
  pages={1801-1807},
  doi={10.1109/LRA.2021.3060392}}
Comments
  • How to apply the trajectory to point cloud from the bags?

    How to apply the trajectory to point cloud from the bags?

    Hi,@wh200720041. I am trying to apply your work to do some 3D reconstructions. But I am not familiar with the ROS, so maybe I make some basic mistakes. I output the trajectory from /odom as your said https://github.com/wh200720041/ssl_slam/issues/14#issuecomment-792251212 And I also output the original point from the bag. However, the pcl::transformPointCloud for output pose and the original point goes completely wrong, what I am miss? The pose and pcd are obtained through odomEstimationLocalizationNode.cpp

    I make a fork, maybe you can point out the problem. Thanks.

    https://github.com/cdb0y511/ssl_slam2/blob/fec5de0e21c49801e9a5ccfb6c921929ada04855/src/odomEstimationLocalizationNode.cpp#L127

    https://github.com/cdb0y511/ssl_slam2/blob/fec5de0e21c49801e9a5ccfb6c921929ada04855/src/odomEstimationLocalizationNode.cpp#L99

    opened by cdb0y511 18
  • Problem with L515

    Problem with L515

    Hello, first of all impresive work. I have my L515 connected and facing the following problem after running the " roslaunch ssl_slam ssl_slam_mapping.launch". image

    I am completely new in ROS. Thank you very much for your time.

    opened by avgilias 6
  • About function LaseProcessingClass::featureExtraction

    About function LaseProcessingClass::featureExtraction

    Hi @wh200720041

    I'm still studying your masterpiece. but there is a question I can`t understand.
    

    Code block in function LaseProcessingClass::featureExtraction

    double last_angle = atan2(pc_in->points[0].z,pc_in->points[0].y) * 180 / M_PI; double angle = atan2(pc_in->points[i].x,pc_in->points[i].z) * 180 / M_PI; ... if(fabs(angle - last_angle) > 0.05){ .... } ...

    Why could angle and last_angle subtract? What`s the meaning?

    BRs

    opened by e04su3184 1
  • double free or corruption (out) error when start the launch

    double free or corruption (out) error when start the launch

    process[ssl_slam2_map_optimization_node-3]: started with pid [29347]
    double free or corruption (out)
    process[baselink2cam_tf-4]: started with pid [29391]
    process[rviz-5]: started with pid [29393]
    process[ssl_slam2/trajectory_server_ssl_slam-6]: started with pid [29398]
    [ssl_slam2_map_optimization_node-3] process has died [pid 29347, exit code -6, cmd /home/jzx/l515_slam/devel/lib/ssl_slam2/ssl_slam2_map_optimization_node __name:=ssl_slam2_map_optimization_node __log:=/home/jzx/.ros/log/4f8913b2-bf8b-11ec-b172-000ec672fdee/ssl_slam2_map_optimization_node-3.log].
    
    opened by jzx-gooner 1
  • ERROR: service [/save_map]

    ERROR: service [/save_map]

    Hello, i have a problem with the command "rosservice call /save map".

    • i am following the "4.3 Map Building" procedure, but when i use the "rosservice call /save map" command in my second terminal tab, i get the following error:

    ERROR: service [/save_map] responded with an error: : [pcl::PCDWriter::writeASCII] Could not open file for writing!

    • also in the first terminal tab that i am using the command "roslaunch ssl_slam2 ssl_slam2_mapping.launch" i get the following error for a moment:

    [ERROR] [1642414934.582664157, 1642414849.721206964]: Exception thrown while processing service call: : [pcl::PCDWriter::writeASCII] Could not open file for writing!

    Picture of my terminal:

    error

    • i solved it by typing "rosrun pcl_ros pointcloud_to_pcd input:=/map" instead of "rosservice call /save map" but i would like to check if i get better results with the loop closure that you describe.

    Could you help me? Thank you in advance for your time.

    opened by BellosC 2
  • use with a camera towards the ceiling

    use with a camera towards the ceiling

    hi I install a L515 upper on the robot, it's towards the ceiling. Now I always get a rotable map and transform. I see in the laserProcessingClass.cpp and modify the line 20~27, for change the coordinate transform for my install style, but it lead to feature Extraction fail . and then I try to change the final tranform result in odomEstimationLocalizationClass.cpp and add another transform to change what br.sendTransform(), but it also can not get the right map or transform.Do you have any idea for my case?

    opened by gongyue666 0
  • Build problem

    Build problem

    Hi!

    I could build ssl_slam without problems, but when I try with ssl_slam2, I can't build. Have you changed some library version?

    I would like to copy the log error, but is too long.

    opened by Carlosmct 1
Owner
Wang Han 王晗
I am currently a Phd Candidate at Nanyang Technological University, Singapore, specialize in computer vision and robotics
Wang Han 王晗
This repository is an open-source implementation of the ICRA 2021 paper: Locus: LiDAR-based Place Recognition using Spatiotemporal Higher-Order Pooling.

Locus This repository is an open-source implementation of the ICRA 2021 paper: Locus: LiDAR-based Place Recognition using Spatiotemporal Higher-Order

Robotics and Autonomous Systems Group 96 Dec 15, 2022
SafePicking: Learning Safe Object Extraction via Object-Level Mapping, ICRA 2022

SafePicking Learning Safe Object Extraction via Object-Level Mapping Kentaro Wad

Kentaro Wada 49 Oct 24, 2022
CSAC - Collaborative Semantic Aggregation and Calibration for Separated Domain Generalization

CSAC Introduction This repository contains the implementation code for paper: Co

ScottYuan 5 Jul 22, 2022
Poisson Surface Reconstruction for LiDAR Odometry and Mapping

Poisson Surface Reconstruction for LiDAR Odometry and Mapping Surfels TSDF Our Approach Table: Qualitative comparison between the different mapping te

Photogrammetry & Robotics Bonn 305 Dec 21, 2022
LVI-SAM: Tightly-coupled Lidar-Visual-Inertial Odometry via Smoothing and Mapping

LVI-SAM This repository contains code for a lidar-visual-inertial odometry and mapping system, which combines the advantages of LIO-SAM and Vins-Mono

Tixiao Shan 1.1k Dec 27, 2022
T-LOAM: Truncated Least Squares Lidar-only Odometry and Mapping in Real-Time

T-LOAM: Truncated Least Squares Lidar-only Odometry and Mapping in Real-Time The first Lidar-only odometry framework with high performance based on tr

Pengwei Zhou 183 Dec 1, 2022
Project Aquarium is a SUSE-sponsored open source project aiming at becoming an easy to use, rock solid storage appliance based on Ceph.

Project Aquarium Project Aquarium is a SUSE-sponsored open source project aiming at becoming an easy to use, rock solid storage appliance based on Cep

Aquarist Labs 73 Jul 21, 2022
BRepNet: A topological message passing system for solid models

BRepNet: A topological message passing system for solid models This repository contains the an implementation of BRepNet: A topological message passin

Autodesk AI Lab 42 Dec 30, 2022
Range Image-based LiDAR Localization for Autonomous Vehicles Using Mesh Maps

Range Image-based 3D LiDAR Localization This repo contains the code for our ICRA2021 paper: Range Image-based LiDAR Localization for Autonomous Vehicl

Photogrammetry & Robotics Bonn 208 Dec 15, 2022
chen2020iros: Learning an Overlap-based Observation Model for 3D LiDAR Localization.

Overlap-based 3D LiDAR Monte Carlo Localization This repo contains the code for our IROS2020 paper: Learning an Overlap-based Observation Model for 3D

Photogrammetry & Robotics Bonn 219 Dec 15, 2022
DLL: Direct Lidar Localization

DLL: Direct Lidar Localization Summary This package presents DLL, a direct map-based localization technique using 3D LIDAR for its application to aeri

Service Robotics Lab 127 Dec 16, 2022
ICRA 2021 "Towards Precise and Efficient Image Guided Depth Completion"

PENet: Precise and Efficient Depth Completion This repo is the PyTorch implementation of our paper to appear in ICRA2021 on "Towards Precise and Effic

null 232 Dec 25, 2022
the official code for ICRA 2021 Paper: "Multimodal Scale Consistency and Awareness for Monocular Self-Supervised Depth Estimation"

G2S This is the official code for ICRA 2021 Paper: Multimodal Scale Consistency and Awareness for Monocular Self-Supervised Depth Estimation by Hemang

NeurAI 4 Jul 27, 2022
Spatial Intention Maps for Multi-Agent Mobile Manipulation (ICRA 2021)

spatial-intention-maps This code release accompanies the following paper: Spatial Intention Maps for Multi-Agent Mobile Manipulation Jimmy Wu, Xingyua

Jimmy Wu 70 Jan 2, 2023
Offcial repository for the IEEE ICRA 2021 paper Auto-Tuned Sim-to-Real Transfer.

Offcial repository for the IEEE ICRA 2021 paper Auto-Tuned Sim-to-Real Transfer.

null 47 Jun 30, 2022
Code for "FGR: Frustum-Aware Geometric Reasoning for Weakly Supervised 3D Vehicle Detection", ICRA 2021

FGR This repository contains the python implementation for paper "FGR: Frustum-Aware Geometric Reasoning for Weakly Supervised 3D Vehicle Detection"(I

Yi Wei 31 Dec 8, 2022
Official code for "EagerMOT: 3D Multi-Object Tracking via Sensor Fusion" [ICRA 2021]

EagerMOT: 3D Multi-Object Tracking via Sensor Fusion Read our ICRA 2021 paper here. Check out the 3 minute video for the quick intro or the full prese

Aleksandr Kim 276 Dec 30, 2022
Code for the RA-L (ICRA) 2021 paper "SeqNet: Learning Descriptors for Sequence-Based Hierarchical Place Recognition"

SeqNet: Learning Descriptors for Sequence-Based Hierarchical Place Recognition [ArXiv+Supplementary] [IEEE Xplore RA-L 2021] [ICRA 2021 YouTube Video]

Sourav Garg 63 Dec 12, 2022
Official PyTorch implementation of the ICRA 2021 paper: Adversarial Differentiable Data Augmentation for Autonomous Systems.

Adversarial Differentiable Data Augmentation This repository provides the official PyTorch implementation of the ICRA 2021 paper: Adversarial Differen

Manli 3 Oct 15, 2022