Skip to content

Add odom frame and ICP-based relocalization#9

Open
baishibona wants to merge 2 commits intoVectorRobotics:devfrom
iServeRobotics:feature/odom-frame-relocalization
Open

Add odom frame and ICP-based relocalization#9
baishibona wants to merge 2 commits intoVectorRobotics:devfrom
iServeRobotics:feature/odom-frame-relocalization

Conversation

@baishibona
Copy link
Copy Markdown

@baishibona baishibona commented Apr 3, 2026

Summary

  • Split TF tree from map→sensor to map→odom→sensor (standard ROS convention)
  • imu_preintegration_node now publishes odom→sensor TF (continuous) and map→odom TF (identity by default, updated by relocalization via /map_to_odom topic)
  • Added global_localization as a standalone SLAM-agnostic package — performs ICP against a prior PCD map, publishes map→odom corrections
  • Auto-launches in localization mode when MAP_PATH env is set (local_mode=true)
  • Added ODOM_FRAME parameter (default "odom") across config, launch, and parameter system
  • Standalone relocalization.launch.py also available for manual launch

Test plan

  • global_localization package builds successfully (colcon build --packages-select global_localization)
  • Build arise_slam_mid360 with GTSAM installed and verify compilation
  • Run in mapping mode (no MAP_PATH) — verify map→odom is identity, TF tree is map→odom→sensor
  • Run in localization mode with a prior PCD map — verify global_localization node starts, ICP aligns after /initialpose
  • Verify downstream consumers (nav2, local planner) work with the new odom frame

Split the TF tree from map->sensor to map->odom->sensor following
standard ROS conventions. The imu_preintegration node now publishes
both odom->sensor (continuous) and map->odom (identity by default,
updated by relocalization). Added global_localization.py (adapted from
FAST_LIO_LOCALIZATION2) which performs ICP against a prior PCD map and
publishes corrections on /map_to_odom. The node auto-launches when
MAP_PATH env is set (local_mode=true).
Copy link
Copy Markdown
Collaborator

@alexlin2 alexlin2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fantastic. Just a few small thing that I commented

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this can be it's own package? since the relocalization is not specific to arise_slam, can in the future we might replace arise with fastlio2 or another SLAM method

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!, updated.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should default to using the ENV MAP_PATH similar to

map_path_env = os.environ.get('MAP_PATH', '')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! updated.

Addresses PR feedback: relocalization is SLAM-agnostic so it belongs
in its own package. Moved global_localization.py and
relocalization.launch.py into src/slam/global_localization/ as a
proper ament_python package. Also default pcd_map_path from MAP_PATH
env variable in the relocalization launch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants