-
Notifications
You must be signed in to change notification settings - Fork 15
5. 🔀 Multi‐Session Mapping
ScaRF-SLAM supports multi-session mapping by reusing the pose graph and saved reconstruction graph from an earlier session. The second SLAM session can load the first session's OV-SLAM pose graph so cross-session loop closures can refine the trajectory. The second mapping run can then load the first session's saved ScaRF-SLAM optimization graph so both sessions are optimized and fused in a shared map.
Each completed mapping session writes a graph artifact under:
$SESSION_FOLDER/recon/<trajectory>/opt_graph_<suffix>
Pass this directory to --prev_slam_folder when extending a map. You can also pass the previous session folder itself if it contains exactly one recon/*/opt_graph*/manifest.json; if multiple graph artifacts exist, pass the exact graph directory.
Terminal 1:
ros2 launch launch/run_ov_slam.launch.py \
output_path:=$SESSION_ONE_FOLDERTerminal 2:
ros2 bag play $SESSION_ONE_DATA_BAG --clock --rate 0.5python3 run_mapping.py \
--slam_folder $SESSION_ONE_FOLDER \
--input_bag $SESSION_ONE_FOLDER/ov_slam/ov_slam_bag \
--config config/scarf_slam/ori_insta_slam.yamlLoad the first session's OV-SLAM pose graph when starting the second session:
ros2 launch launch/run_ov_slam.launch.py \
output_path:=$SESSION_TWO_FOLDER \
pose_graph_load_path:=$SESSION_ONE_FOLDER/ov_slam/pose_graphThen play the second session data bag:
ros2 bag play $SESSION_TWO_DATA_BAG --clock --rate 0.5Load the first session's ScaRF-SLAM graph when running mapping for the second session:
python3 run_mapping.py \
--slam_folder $SESSION_TWO_FOLDER \
--input_bag $SESSION_TWO_FOLDER/ov_slam/ov_slam_bag \
--prev_slam_folder $SESSION_ONE_FOLDER/recon/ov_slam/opt_graph_<suffix> \
--config config/scarf_slam/ori_insta_slam.yamlYou can use ORI R01 as the first session and ORI R02 as the second session for a compact multi-session mapping check.