-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComposableNode.parameters with a file path does not take effect. #156
Comments
Not sure if I should make another issue, but I also discovered that the launch will hang if the specified parameter file doesn't exist. Appears to hang here @ yaml.load() |
Progress Report; The YAML file format is different when loading parameters with the ComposableNode Parameters option compared to the function that was in Dashing. This works: exampleConfig.yaml example_int: 98765
example_float: 9.8765
example_string: "example" This is in contrast to the --ros-args --params-file format. |
I think someone with broader ros2 architecture & design intent knowledge should review this issue briefly. Essentially, ROS2 currently has two different parameter file formats, which seems less than ideal. I think it makes sense to extend launch_ros to support the same file format as the --params-file flag in rcl. It's not exactly an 'easy' task though; to_parameters_list() would need access the current node name to be able to extract the correct parameters. Could be done though... Thoughts? |
Yeah, it will need to access the current node name. See this comment for more details. |
Can you share an example to reproduce that problem? |
@ivanpauno here is an example producing the error. You can run it locally. Right now the yaml reads: L1: 2.0 # length of link 1 (m)
L2: 1.0 # length of link 2 (m)
T: 20.0 # duration of one trajectory cycle (s) and the params are loaded correctly. Modify it to (as shown in the ros2 tutorials): simple_arm:
ros__parameters:
L1: 2.0 # length of link 1 (m)
L2: 1.0 # length of link 2 (m)
T: 20.0 # duration of one trajectory cycle (s) and the params will not be visible for the |
It's known that the format is different, and it's probably something we should modify. |
Duplicate of this well known issue: |
I think that using a bit of logic to support both file formats, the one that starts with For supporting both, either deprecating the What would need to be fixed is the line here:
|
My two cents: I strongly prefer solution 2 |
Has this issue been solved? |
This is still present in Rolling. What is the path forward? |
Bug report
ros2 param dump /exampleConfig
to generateexampleConfig.yaml
.parameters=['/module/exampleConfig.yaml']
in my ComposableNode within a launch.py fileRequired Info:
Steps to reproduce issue
launch.py
example_config.cc
exampleConfig.yaml
Expected behavior
parameters should be set in the node
Actual behavior
parameters are not set
Additional information
Here's the console output of the above:
The text was updated successfully, but these errors were encountered: