-
Notifications
You must be signed in to change notification settings - Fork 683
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
YAML config: Substitution happens for comments #1317
Comments
Can you give a complete example of the problem? From the short snippet you've provided, it looks like you are using XML launch files. In XML |
I see. The comment is meant to be put into a yaml configuration file ( /**:
ros__parameters:
parameterA: 5
# $(env NON_EXISTING_ENV_VAR)
parameterB: true And in the launch file <launch>
<node pkg="my_node" exec="my_node" name="my_node">
<param from="my_config.yaml" allow_substs="true"/>
</node>
</launch>
|
OK, I see. Thanks for the updated example, that helps a lot. This is indeed a bug, and I can reproduce it locally on Rolling with the following: turtlesim.yaml:
turtlesim-launch.xml
@ivanpauno Since you did the initial substitution work, can you take a look? |
Yes, I can take a look, it seems a bit tricky ... |
I'm thinking than loading the file as yaml and dumping it will solve the issue, but it may not work if the original file is not a valid yaml file (which currently was possible). |
Bug report
Required Info:
Steps to reproduce issue
Add a comment like this to any configuration yaml file that is used:
# $(env NON_EXISTING_ENV_VAR)
and add
allow_subst="true"
to its referencingparam
tag:Expected behavior
The comment should be ignored and it should work as usually.
Actual behavior
Ros tries to resolve the environment variable and crashes if it does not exist, even though it is commented out.
The text was updated successfully, but these errors were encountered: