SLAM-agnostic ICP-based relocalization against a prior PCD map. Publishes a map -> odom correction on /map_to_odom so any SLAM backend that subscribes can broadcast the full TF tree:
map -> odom -> sensor
In mapping mode (no prior map), map -> odom is identity.
The global_localization node loads a prior PCD map, subscribes to any SLAM's registered cloud and odometry topics (configurable), and periodically runs ICP to align the current scan against the map. The resulting correction is published on /map_to_odom. The SLAM backend (e.g. arise_slam's imu_preintegration_node) subscribes and broadcasts it as the map -> odom TF.
Relocalization is triggered by publishing an initial pose estimate (e.g. from RViz "2D Pose Estimate"), then refines continuously at freq_localization Hz.
Set the MAP_PATH environment variable before launching. The global localization node starts automatically:
export MAP_PATH=/path/to/map # expects map.pcd at this path + .pcd
ros2 launch arise_slam_mid360 arize_slam.launch.pyThis sets local_mode:=true and relocalization_map_path:=/path/to/map.pcd automatically.
Then in RViz, use 2D Pose Estimate to set the initial pose and trigger the first ICP alignment.
Launch SLAM and relocalization separately:
# Terminal 1: SLAM
ros2 launch arise_slam_mid360 arize_slam.launch.py
# Terminal 2: Relocalization
ros2 launch global_localization relocalization.launch.py pcd_map_path:=/path/to/map.pcd| Parameter | Default | Description |
|---|---|---|
pcd_map_path |
(required) | Path to the .pcd map file |
cloud_topic |
/registered_scan |
Registered point cloud from SLAM |
odom_topic |
/state_estimation |
Odometry from SLAM |
map_voxel_size |
0.4 |
Voxel size for downsampling global map (m) |
scan_voxel_size |
0.1 |
Voxel size for downsampling current scan (m) |
freq_localization |
0.5 |
ICP refinement frequency (Hz) |
localization_threshold |
0.8 |
Min ICP fitness score to accept alignment |
fov |
6.28 |
Field of view for map cropping (rad) |
fov_far |
300.0 |
Max range for map cropping (m) |
Python: open3d, ros2_numpy, tf_transformations, numpy