Skip to content

Add fuse odometry localization for the hangar_sim mobile base#790

Draft
bkanator wants to merge 1 commit into
mainfrom
feat/19667-fuse-odometry
Draft

Add fuse odometry localization for the hangar_sim mobile base#790
bkanator wants to merge 1 commit into
mainfrom
feat/19667-fuse-odometry

Conversation

@bkanator

Copy link
Copy Markdown

[written by AI]

Closes #19667.

Problem

hangar_sim's mobile base drove on raw MuJoCo odometry — too clean to exercise the real localization stack. To represent a real Ridgeback, the base needs fuse-fused odometry (wheel + IMU) with realistic drift, and beluga_amcl must localize reliably against it during Navigate to Clicked Point.

Approach

  • Fuse on by default (use_fuse=true): fuse fuses wheel odometry + IMU into /odom_filtered.
  • odomworld drift injection: with fuse on, odom_world_drift publishes a live odomworld transform from the fuse estimate, so AMCL sees real drift to correct while worldbase stays ground truth for whole-body planning. odom_topic stays on raw /odom — no manual swap.
  • Slip-aware wheel covariance (slip_aware_odom, new C++ node): republishes wheel odometry with a yaw covariance that grows during sustained in-place spin (mecanum rollers slip), so fuse defers to the IMU while spinning and trusts the wheels when driving straight.
  • AMCL tuning for the mecanum base: OmniMotionModel; alpha1 0.1→0.4 to stop yaw lock-loss during spins; update_min_a 0.1 with resample_interval 3 to correct often without particle depletion.
  • Turn-rate cap: wz_max 0.6 — below the velocity_smoother's 1.0 cap so it actually binds — keeps commanded spins within AMCL's correction bandwidth so the map tracks instead of lagging.
  • CPU reductions: odom_rate 50 Hz, tf_publish_rate 30 Hz, and the broadcaster update_rates decoupled from the high-rate control loop, giving the localization stack headroom.

Results

On a fresh sim with adequate CPU, a 40-goal aggressive-turning route reaches 40/40 goals at ~0.12 m ATE with no divergence, reproducibly across runs. The map still lags slightly during fast turns (inherent AMCL correction latency), but Navigate to Clicked Point reaches every goal.

Localization quality is CPU-bound: a co-scheduled second sim can starve AMCL into divergence even with this config, so run one sim per host when benchmarking.

Docs

Paired documentation PR: PickNikRobotics/moveit_pro#20578 (Localization Tuning + Whole-Body Mobile Architecture guides).

Manual verification

ros2 launch hangar_sim and run Navigate to Clicked Point to a goal that requires a large heading change; the robot reaches the clicked point. use_fuse:=false falls back to raw odometry.

Release notes

Enhancement: hangar_sim now localizes its mobile base with fuse odometry (wheel + IMU) and tuned beluga_amcl, so Navigate to Clicked Point reaches goals reliably during simulated navigation.

@bkanator bkanator added this to the 10.0.0 milestone Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ba40700-77c2-4bc6-806f-f4dc476b4c2e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@bkanator
bkanator force-pushed the feat/19667-fuse-odometry branch from 236f955 to 99cb7f5 Compare July 17, 2026 18:18
@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

@bkanator
bkanator force-pushed the feat/19667-fuse-odometry branch from 99cb7f5 to ecb0e20 Compare July 17, 2026 18:41
@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

…667)

Localize the Ridgeback mobile base with fuse (wheel + IMU) odometry and tuned
beluga_amcl so Navigate to Clicked Point reaches goals during simulated navigation.

- use_fuse defaults to true; fuse fuses wheel odometry + IMU into /odom_filtered.
- odom_world_drift publishes a live odom->world transform from the fuse estimate so
  AMCL corrects real drift while world->base stays ground truth for whole-body planning.
- slip_aware_odom (new node) forwards the active platform controller's odometry to fuse
  with a spin-aware yaw covariance, stitches the nav2 <-> whole-body controller handoff
  into one continuous stream, and holds the last pose across the brief switch gap so fuse
  never coasts (which otherwise jumped the estimate and flipped the map in whole-body).
- AMCL tuned for the mecanum base: OmniMotionModel, alpha1 0.4, update_min_a 0.1 with
  resample_interval 3.
- MPPI wz_max capped at 0.6 (below the velocity_smoother cap so it binds) to keep
  commanded spins within AMCL's correction bandwidth.
- odom/tf and broadcaster rates decoupled from the control loop for CPU headroom.
- base_gt MuJoCo site publishes ground-truth base TF for localization QA.

Closes #19667.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bkanator
bkanator force-pushed the feat/19667-fuse-odometry branch from ecb0e20 to 98ef35f Compare July 19, 2026 15:34
@github-actions

Copy link
Copy Markdown

MoveIt Pro Example WS - Objectives Integration Test Report

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.

1 participant