Skip to content

Tuning

Link to module repo: odom_gnss_fusion


For the full parameter reference (types, defaults, constraints), see the repository README. This page describes how to tune the two key parameters — control loop frequency and observer time constant τ — for field deployment.


Control Loop Frequency

Set control_loop_frequency_in_hz to match or exceed the rate of your odometry source. A value equal to the odometry publish rate is usually sufficient.

Monitor CPU usage with top or htop. At 1000 Hz the node typically uses < 2% of a single core on modern hardware.


Observer Time Constant (τ)

The time constant \(\tau\) controls how aggressively the observer corrects toward GNSS. The correction gain is \(\frac{1}{\tau}\), and convergence to steady state takes approximately \(5\tau\).

Tuning Procedure

  1. Start with \(\tau = 0.5\,\text{s}\) — a reasonable default.
  2. Drive a straight line and observe the fused output (e.g. in RViz or by recording a bag file):
    • Output oscillates or is jittery → increase \(\tau\) (smoother, slower correction).
    • Output lags behind GNSS → decrease \(\tau\) (faster correction).
    • Output drifts with odometry errors → decrease \(\tau\) (trust GNSS more).
  3. Test in turns and maneuvers — ensure no overshoot or unreasonable behavior.
  4. Test stationary — the output should converge to the GNSS position.
  5. Iterate until the desired balance between smoothness and responsiveness is reached.

\(\tau\) can be changed at runtime without restarting the node:

ros2 param set /odom_gnss_fusion_node tau 0.3

Field Calibration Checklist

Before deploying on the rover, verify the following:

  • Odometry and GNSS are publishing at expected rates (ros2 topic hz)
  • The TF from gnss_frame_id to base_link_frame_id is being broadcast and matches the physical sensor mounting
  • The GNSS pose header frame_id matches the configured map_frame_id
  • The fused output converges to the GNSS position when the rover is stationary
  • The fused output follows a smooth trajectory during constant-velocity motion
  • No oscillations or instabilities are observed during turns