Skip to content

Add startup parameter validation with actionable error messages #58

Description

@manankharwar

What

Add a validation pass at node startup that checks for common misconfigurations and prints actionable error messages before the filter starts.

Why

The most common support questions are caused by misconfigured parameters: wrong topic names, invalid covariance values, IMU frame mismatches. Right now the filter silently behaves incorrectly. A startup check surfaces these immediately.

Scope

Checks to add (not exhaustive, use judgment):

  • `gnss.base_noise_xy` and `gnss.base_noise_z` are positive
  • `imu.topic` is non-empty
  • Process noise values (`q_*`) are all positive
  • `chi2_threshold` is within a sensible range (e.g. warn if below 3.0 or above 20.0)
  • If `imu.remove_gravitational_acceleration: false`, warn that the IMU measurement function expects raw specific force

Each check should log a clear `RCLCPP_ERROR` or `RCLCPP_WARN` with the parameter name and what the valid range is.

Acceptance criteria

  • Misconfigured parameter prints a clear error at startup, not a cryptic filter divergence 10 seconds in
  • No existing tests broken
  • New test covering at least one validation case

Relevant files

  • `fusioncore_ros/src/fusioncore_node.cpp` (node startup)
  • `fusioncore_ros/include/fusioncore_ros/params.hpp` (parameter declarations)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions