Support substitution for fault manager yaml file - #634
Open
nnarain wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
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.pyto load the parameter YAML vialaunch_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
Allow launch substitution for fault manager parameter file.
For example I want to do this:
otherwise the correlation config file was read as
$(find-pkg-share my_robot)/config/fault_correlation.yamlby the fault manager.Issue
Link the related issue (required):
Type
Testing
local testing
Checklist