{"id":18683135,"url":"https://github.com/wh200720041/ssl_slam2","last_synced_at":"2025-10-26T22:46:51.485Z","repository":{"id":41389211,"uuid":"339994586","full_name":"wh200720041/ssl_slam2","owner":"wh200720041","description":"SSL_SLAM2: Lightweight 3-D Localization and Mapping for Solid-State LiDAR (mapping and localization separated)  ICRA 2021","archived":false,"fork":false,"pushed_at":"2024-03-24T07:48:36.000Z","size":32374,"stargazers_count":360,"open_issues_count":19,"forks_count":67,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-29T19:05:40.635Z","etag":null,"topics":["lidar","robotics","slam"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wh200720041.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-18T09:13:03.000Z","updated_at":"2025-02-15T05:31:07.000Z","dependencies_parsed_at":"2024-03-24T08:40:22.916Z","dependency_job_id":null,"html_url":"https://github.com/wh200720041/ssl_slam2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wh200720041%2Fssl_slam2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wh200720041%2Fssl_slam2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wh200720041%2Fssl_slam2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wh200720041%2Fssl_slam2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wh200720041","download_url":"https://codeload.github.com/wh200720041/ssl_slam2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393570,"owners_count":20931813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lidar","robotics","slam"],"created_at":"2024-11-07T10:13:52.706Z","updated_at":"2025-10-26T22:46:46.454Z","avatar_url":"https://github.com/wh200720041.png","language":"C++","funding_links":[],"categories":["Softwares and Libraries"],"sub_categories":[],"readme":"# SSL_SLAM2\n## Lightweight 3-D Localization and Mapping for Solid-State LiDAR (Intel Realsense L515 as an example)\n\n### This repo is an extension work of [SSL_SLAM](https://github.com/wh200720041/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.\n\nThis 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](https://arxiv.org/pdf/2102.03800.pdf)\n\nA summary video demo can be found at [Video](https://youtu.be/Uy_2MKwUDN8) \n\n**Modifier:** [Wang Han](http://wanghan.pro), Nanyang Technological University, Singapore\n\nRunning speed: 20 Hz on Intel NUC, 30 Hz on PC\n\n## 1. Solid-State Lidar Sensor Example\n### 1.1 Scene reconstruction example\n\u003cp align='center'\u003e\n\u003ca href=\"https://youtu.be/D2xt_5xm_Ew\"\u003e\n\u003cimg width=\"65%\" src=\"/img/mapping.gif\"/\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n### 1.2 Localization with built map \n\u003cp align='center'\u003e\n\u003ca href=\"https://youtu.be/D2xt_5xm_Ew\"\u003e\n\u003cimg width=\"65%\" src=\"/img/localization.gif\"/\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n### 1.3 Comparison\n\u003cp align='center'\u003e\n\u003ca href=\"https://youtu.be/D2xt_5xm_Ew\"\u003e\n\u003cimg width=\"65%\" src=\"/img/comparison.gif\"/\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## 2. Prerequisites\n### 2.1 **Ubuntu** and **ROS**\nUbuntu 64-bit 20.04.\n\nROS Noetic. [ROS Installation](http://wiki.ros.org/ROS/Installation)\n\n### 2.2. **Ceres Solver**\nFollow [Ceres Installation](http://ceres-solver.org/installation.html).\n\n### 2.3. **PCL**\nFollow [PCL Installation](http://www.pointclouds.org/downloads/linux.html).\n\nTested with 1.8.1\n\n### 2.4. **GTSAM**\nFollow [GTSAM Installation](https://gtsam.org/get_started/).\n\n### 2.5. **Trajectory visualization**\nFor visualization purpose, this package uses hector trajectory sever, you may install the package by \n```\nsudo apt-get install ros-noetic-hector-trajectory-server\n```\nAlternatively, you may remove the hector trajectory server node if trajectory visualization is not needed\n\n## 3. Sensor Setup\nIf you have new Realsense L515 sensor, you may follow the below setup instructions\n\n### 3.1 L515\n\u003cp align='center'\u003e\n\u003cimg width=\"35%\" src=\"/img/realsense_L515.jpg\"/\u003e\n\u003c/p\u003e\n\n### 3.2 Librealsense\nFollow [Librealsense Installation](https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md)\n\n### 3.3 Realsense_ros\nCopy [realsense_ros](https://github.com/IntelRealSense/realsense-ros) package to your catkin folder\n```\n    cd ~/catkin_ws/src\n    git clone https://github.com/IntelRealSense/realsense-ros.git\n    cd ..\n    catkin_make\n```\n\n## 4. Build SSL_SLAM2\n### 4.1 Clone repository:\n```\n    cd ~/catkin_ws/src\n    git clone https://github.com/wh200720041/ssl_slam2.git\n    cd ..\n    catkin_make\n    source ~/catkin_ws/devel/setup.bash\n```\n\n### 4.2 Download test rosbag\nYou may download our recorded data: [MappingTest.bag](https://drive.google.com/file/d/1XRXKkq3TsUiM4o9_bWL8t9HqWHswfgWo/view?usp=sharing) (3G) and [LocalizationTest.bag](https://drive.google.com/file/d/1-5j_jgraus0gJkpFRZS5hFUiKlT7aQtG/view?usp=sharing) (6G)if you dont have realsense L515, and by defult the file should be under home/user/Downloads\n\nunzip the file (it may take a while to unzip) \n```\ncd ~/Downloads\nunzip LocalizationTest.zip\nunzip MappingTest.zip\n```\n\n### 4.3 Map Building\nmap optimization and building\n```\n    roslaunch ssl_slam2 ssl_slam2_mapping.launch\n```\nThe 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 \n```\n  rosservice call /save_map\n```\nUpon 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. \nFor 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 \n```\n  rosservice call /save_map\n```\nSince the current frame is between 1060 and 1120, the loop closure will be triggered automatically and the global map will be optimized and saved \n\n### 4.4 Localization\n\nType\n```\n    roslaunch ssl_slam2 ssl_slam2_localization.launch\n```\nIf your map is large, it may takes a while to load\n\n### 4.5 Parameters Explanation\nThe map size depends on number of keyframes used. The more keyframes used for map buildin, the larger map will be. \n\nmin_map_update_distance: distance threshold to add a keyframe. higher means lower update rate. \nmin_map_update_angle: angle threshold to add a keyframe. higher means lower update rate. \nmin_map_update_frame: time threshold to add a keyframe. higher means lower update rate. \n\n\n### 4.6 Relocalization\nThe 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  \n```\n    \u003cparam name=\"offset_x\" type=\"double\" value=\"0.0\" /\u003e\n    \u003cparam name=\"offset_y\" type=\"double\" value=\"0.0\" /\u003e\n    \u003cparam name=\"offset_yaw\" type=\"double\" value=\"0.0\" /\u003e\n```\n\n### 4.7 Running speed\nThe 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. \nYou can do thid by setting the \n```\n\u003cparam name=\"skip_frames\" type=\"int\" value=\"1\" /\u003e\n```\n1 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.\n\n## 5 Map Building with multiple loop closure places \n### 5.1 Dataset\nYou may download a larger dataset [LargeMappingTest.bag](https://drive.google.com/file/d/18HWUpgv7G6MV6brtbA4uEluTOgxDEdX3/view?usp=sharing) (10G), and by defult the file should be under home/user/Downloads\n\nunzip the file (it may take a while to unzip) \n```\ncd ~/Downloads\nunzip LargeMappingTest.zip\n```\n\n### 5.2 Map Building\nTwo 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\n```\n    roslaunch ssl_slam2 ssl_slam2_large_mapping.launch\n```\nopen a new terminal, when you see \"total_frame 1260\", immediately type\n```\n  rosservice call /save_map\n```\nwhen you see \"total_frame 3630\", immediately type again\n```\n  rosservice call /save_map\n```\n\n## 6. Citation\nIf you use this work for your research, you may want to cite the paper below, your citation will be appreciated \n```\n@article{wang2021lightweight,\n  author={H. {Wang} and C. {Wang} and L. {Xie}},\n  journal={IEEE Robotics and Automation Letters}, \n  title={Lightweight 3-D Localization and Mapping for Solid-State LiDAR}, \n  year={2021},\n  volume={6},\n  number={2},\n  pages={1801-1807},\n  doi={10.1109/LRA.2021.3060392}}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwh200720041%2Fssl_slam2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwh200720041%2Fssl_slam2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwh200720041%2Fssl_slam2/lists"}