Skip to content
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

argument collision in included files (xml and yaml) #815

Open
asherikov opened this issue Dec 19, 2024 · 0 comments
Open

argument collision in included files (xml and yaml) #815

asherikov opened this issue Dec 19, 2024 · 0 comments

Comments

@asherikov
Copy link

Bug report

Required Info:

  • Operating System:
    • Ubuntu 22.04
  • Installation type:
    • binaries
  • Version or commit hash:
    • humble
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • N/A

Steps to reproduce issue

test.yaml

   launch:
       - include:
             file: "$(find-pkg-share my_package)/launch/inc1.yaml"
       - include: 
             file: "$(find-pkg-share my_package)/launch/inc2.yaml"

inc1.yaml

   launch:
       - arg: {name: "my_parameter", default: "my_parameter_value_1"}
       - executable:
             cmd: "echo inc1 $(var my_parameter)"
             output: "screen"

inc2.yaml

   launch:
       - arg: {name: "my_parameter", default: "my_parameter_value_2"}
       - executable:
             cmd: "echo inc2 $(var my_parameter)"
             output: "screen"

Output:

   [INFO] [echo-1]: process started with pid [86076]
   [INFO] [echo-1]: process has finished cleanly [pid 86076]
   [INFO] [echo-2]: process started with pid [86078]
   [echo-1] inc1 my_parameter_value_1
   [INFO] [echo-2]: process has finished cleanly [pid 86078]
   [echo-2] inc2 my_parameter_value_1

Actual behavior

Default value of my_parameter in inc2 is overrided by default value of parameter with the same name in inc1

Expected behavior

Parameters in separate files should not collide.

Additional information

The issue can be avoided by additionally scoping each include with group, however, I strongly believe that scoping should be implied by inclusion.

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

No branches or pull requests

1 participant