Note that:
- the simplest way to quickly run is that directly download my old session results + new session bag (
RB2), performing F2F. - harder way is download my old session bag (
PK1) + new session bag (RB2), single session mode to build the old session data ofPK1. Then use the new session bag to incremental mapping onPK1. - The hardest way is to adapt to your own data.
-
download data. For demo results you can directly download the old session results.
old session bag ( PK1)new session bag ( RB2)old session results .png)


You can also use the single session mode to generate the map data of the old session, just set parameters useMultiMode as false. Check the map folder, three files must exists, key_point_frame, pose_graph.g2o and optimized_poses_tum.txt.
-
set important parameters of file path:
save_directory,map_directory,bag_path.<param name="save_directory" type="string" value="/home/xchu/data/pose_slam_prior_result/"/> <param name="map_directory" type="string" value="/home/xchu/data/prior_map/PK01/"/> <!--set your data bag path--> <arg name="bag_path" default="/media/xchu/新加卷/HKUSTGZ-DATASET/2023-10-28-19-09-04-Parkinglot-RedBird02/Parkinglot-RedBird-2023-10-28-19-09-04.bag"/>
-
run launch file, blue trajectoty for the old session and red for the new session.
roslaunch ms_mapping ms.launch
only save data for the new session part, finally use the python scripts to get the merged map for analysis.
rosservice call /save_map
| RB3 data bag | PK1-RB2 results | PK1-RB2-RB3 results |
|---|---|---|
![]() |
![]() |
![]() |
- Now we have merging
RB02based onPK01, we can directly get the necessary data. We have 3760 key-frames with 8820 poses. Note that thefinal_map_lidar.pcdrepresents the merged map ofPK1andRB2, but only theRB2part.
We need manually copy the keyframes of PK01 into the PK1-RB2-TEST/key_point_frame folder, then the number of poses is equal to the keyframes. (you can directly download my data here)
use python scripts multi-session-map-merger2.py to get the merged map of PK1 and RB2. And move it to
PK1-RB2-TEST folder, renamed as map.pcd.
- set parameters in
ms.launch.map_directoryset as the new folderPK1-RB2-TEST.
<param name="map_directory" type="string" value="/home/xchu/data/pose_slam_prior_result/PK1-RB2-TEST/"/>
<arg name="bag_path" default="/media/xchu/新加卷/HKUSTGZ-DATASET/2023-11-26_redbird_03/2023-11-26-19-36-49.bag"/>
<arg name="sequence" default="PK1-RB2-RB3-TEST"/>- get the initial pose. Directly run the
ms.launchand quickly stop it to get the first point cloud ofPK01and map.
roslaunch ms_mapping ms.launchset the initial pose in ms.yaml
run ms.launch again, and this time it will succeed!
roslaunch ms_mapping ms.launchsave results
rosservice call /save_map -
use python scripts multi-session-map-merger2.py to get the merged map again.
use scripts multi-session-map-merger_writetum.py to generate the separate trjectory
python3 multi-session-map-merger_writetum.pyuse scripts tum-trajectory-plotter.py plot the results:
python3 tum-trajectory-plotter.py![]() |
![]() |
|---|
Lets take CP5 as the old session, and use CP2 to do incremental mapping base on it.
- Build the base map using single-session uncertainty SLAM. It's important to know the cov of each edge in pose graph. Keyframes number must be the same with the poses number.
-
Set the base map as prior map folder, and preparing for the parameters of Ms-Mapping (initial pose). You can use Cloudcompare to align the first point cloud (at the map folder) with the base map to get the initial pose. (This problem can be solved when you integrate a place recognition algorithm into our system).
-
Run the Ms-Mapping and save the merged data. The keyframe folder only save the keyframes of the new session data.
- Use the python scripts to get and visualize all the session trajectory and session map, together with the merged map.
![]() |
![]() |
|---|
-
set the new base map
CP5-CP2for the next mapping round. You need to add the keyframes ofCP5into this folder. There must be amap.pcdfile in the map folder. Check the keyframes number with the pose files.
We provide example merged data for 8 sessions here, The session order is: CP5-CP2-CS1-CC1-PK1-IA3-IA4-NG. One must clean the separate map to remove the point cloud noise caused by the glass, since this study do not focus on this. The cleaned map also can be download here. Note that these example data may be updated since it is not the best results.
#trjectory
python3 tum-trajectory-plotter.py
#map
pcl_viewer merged_map_session_*![]() |
![]() |
|---|
































