[Jazzy] Improve the compatibility of processing YAML parameter files#1549
Conversation
Signed-off-by: Barry Xu <barry.xu@sony.com>
|
I found that the handling of cases where |
…'/**/node_name' Signed-off-by: Barry Xu <barry.xu@sony.com>
There was a problem hiding this comment.
Pull request overview
This PR enhances the parameter_dict_from_yaml_file() function in the Jazzy version to support additional YAML parameter file formats, aligning it with the functionality of rcl_yaml_param_parser. The changes enable processing of wildcard namespace patterns (/* and /**/node_name) and nested namespace/node definitions.
Key changes:
- Extended wildcard matching to support
/*and/**/node_namepatterns in addition to the existing/**pattern - Added support for nested YAML structures where namespaces contain node definitions (e.g.,
/namespace: node_name: ros__parameters:) - Implemented logic to handle both absolute and relative node name formats in parameter files
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| rclpy/rclpy/parameter.py | Rewrote parameter file parsing logic to handle multiple YAML formats including wildcard patterns and nested namespace/node structures |
| rclpy/test/test_parameter.py | Added comprehensive test coverage for new YAML parameter formats including wildcard matching and various namespace/node combinations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
Signed-off-by: Barry Xu <barry.xu@sony.com>
fujitatomoya
left a comment
There was a problem hiding this comment.
lgtm with green CI.
|
@Barry-Xu-2018 if i understand correctly, we do not need #1552 to jazzy and humble right? |
|
Pulls: #1549 |
Yes. You are right. |
|
@Mergifyio backport humble |
✅ Backports have been createdDetails
|
Description
The implementation of the parameter_dict_from_yaml_file() function differs significantly between the rolling version and the Jazzy version, so I made separate modifications for the Jazzy version.
Fixes #1546
And also supports the following YAML parameter format
Is this user-facing behavior change?
Yes. parameter_dict_from_yaml_file() supports a more complete parameter file format (consistent with rcl_yaml_param_parser).
Did you use Generative AI?
No
Additional Information
No