Skip to content

Restore Fusion (Madgwick) AHRS as default alongside VQF#394

Merged
JanuszBedkowski merged 3 commits intoMapsHD:mainfrom
Jakubach:restore-fusion-ahrs
Mar 9, 2026
Merged

Restore Fusion (Madgwick) AHRS as default alongside VQF#394
JanuszBedkowski merged 3 commits intoMapsHD:mainfrom
Jakubach:restore-fusion-ahrs

Conversation

@Jakubach
Copy link
Contributor

@Jakubach Jakubach commented Mar 9, 2026

Summary

  • Re-add Fusion (Madgwick) AHRS library removed in PR Added imu preintegration and migrated from Madgwick to VQF algorithm for orientation estimation #391, restoring it as the default AHRS
  • VQF remains available as an alternative, selectable via use_vqf toggle in GUI or TOML config
  • GUI shows Fusion-specific params (convention, gain) or VQF-specific params based on toggle
  • TOML save/load is fully backward compatible — old config files without use_vqf/fusion_gain load correctly with struct defaults (Fusion enabled, gain=0.5)

Changes

  • 3rdparty/Fusion submodule re-activated
  • CMakeLists.txt: Fusion subdirectory added
  • lidar_odometry_utils.h: use_vqf (default false) and fusion_gain (default 0.5) params
  • lidar_odometry.cpp: dual AHRS path in calculate_trajectory()
  • lidar_odometry_gui.cpp + precision_forestry.cpp: conditional GUI for Fusion/VQF params
  • toml_io.h: new params registered in POINTERS and CATEGORIES
  • Both build targets (lidar_odometry_step_1, precision_forestry) compile and link correctly

Test plan

  • Build on Linux with both targets
  • Load old TOML (without use_vqf) — verify Fusion is default, no errors
  • Toggle VQF in GUI, save TOML, reload — verify persistence
  • Run lidar odometry with Fusion (default) and VQF — verify both produce valid trajectories

Jakubach added 3 commits March 9, 2026 13:29
Re-add Fusion library that was removed in PR MapsHD#391 (VQF migration).
Fusion is now the default AHRS (use_vqf=false), with VQF available
as an alternative via GUI toggle or TOML parameter.

- Add use_vqf bool and fusion_gain params to LidarOdometryParams
- Dual AHRS path in calculate_trajectory() and alternative_approach()
- GUI: conditional display of Fusion/VQF params based on toggle
- TOML: backward compatible (missing keys use struct defaults)
- Re-activate Fusion submodule and CMake integration
Per-worker orientation estimation now uses Fusion or VQF based on
use_vqf toggle, instead of always using VQF.

- Rename enum: *_vqf_vel -> *_ahrs_vel (int values 5-7 unchanged)
- Add use_vqf, fusion_gain, fusion_convention to IntegrationParams
- Add Fusion include/link to core CMakeLists
- Seed Fusion AHRS with initial orientation from trajectory (no cold start)
- Pass gyro bias estimated from stationary samples to per-worker Fusion
- Add gyro_bias_dps to IntegrationParams and estimated_gyro_bias_dps to
  LidarOdometryParams (runtime only, not saved to TOML)
- VQF per-worker unchanged (kept original behavior)
@JanuszBedkowski JanuszBedkowski merged commit 22c0b82 into MapsHD:main Mar 9, 2026
0 of 7 checks passed
Jakubach added a commit to Jakubach/HDMapping that referenced this pull request Mar 9, 2026
PR MapsHD#394 added #include <Fusion.h> to lidar_odometry_utils.h, but targets
like concatenate_multi_livox and mandeye_raw_data_viewer don't have Fusion
in their CMake include paths, causing build failures.

Move #include <Fusion.h> to lidar_odometry.cpp (which actually uses Fusion
types) and add Fusion include/link to mandeye_raw_data_viewer CMakeLists.
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.

2 participants