Skip to content

Support substitution for fault manager yaml file - #634

Open
nnarain wants to merge 1 commit into
selfpatch:mainfrom
nnarain:fault-manager-parameter-file-substitution
Open

Support substitution for fault manager yaml file#634
nnarain wants to merge 1 commit into
selfpatch:mainfrom
nnarain:fault-manager-parameter-file-substitution

Conversation

@nnarain

@nnarain nnarain commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Summary

Allow launch substitution for fault manager parameter file.

For example I want to do this:

fault_manager:
  ros__parameters:
    database_path: /tmp/ros2_medkit/faults.db
    healing_enabled: true
    correlation.config_file: $(find-pkg-share my_robot)/config/fault_correlation.yaml

otherwise the correlation config file was read as $(find-pkg-share my_robot)/config/fault_correlation.yaml by the fault manager.


Issue

Link the related issue (required):


Type

  • Bug fix
  • New feature or tests
  • Breaking change
  • Documentation only

Testing

local testing


Checklist

  • Breaking changes are clearly described (and announced in docs / changelog if needed)
  • Tests were added or updated if needed
  • Docs were updated if behavior or public API changed

Copilot AI lite review requested due to automatic review settings August 23, 2026 23:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ros2_medkit_fault_manager launch setup to support ROS 2 launch substitutions inside the fault manager YAML parameter file (e.g., $(find-pkg-share my_robot)), so parameter values like correlation.config_file resolve to real paths at launch-time instead of being passed through as raw strings.

Changes:

  • Switch fault_manager.launch.py to load the parameter YAML via launch_ros.descriptions.ParameterFile(..., allow_substs=True) so substitutions are expanded.
  • Add an informational log line when the fault manager loads the correlation config file to improve observability during startup.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/ros2_medkit_fault_manager/src/fault_manager_node.cpp Adds a startup log indicating which correlation config file path is being loaded.
src/ros2_medkit_fault_manager/launch/fault_manager.launch.py Uses ParameterFile(..., allow_substs=True) to enable launch substitutions within the YAML parameter file.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

Allow substitutions in fault manager parameter file

2 participants