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
Add "param" substitution in tags #2097
Conversation
…m fetch in tags. * Support param substitution in rosparam tags.
* Add param substitution test for node tag.
* Add param substitution test for include tag.
* Add param substitution test for remap tag.
@sloretz Friendly ping. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I've left a couple minor comments.
resolve_arg = '/' + args[0] | ||
for param in context['param']: | ||
if param.key == resolve_arg: | ||
return resolved.replace("$(%s)" % a, str(param.value)) # +2 for equals sign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the trailing comment about? Perhaps vestigial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must be a leftover.
<param name="file" value="test-arg-invalid-included.xml"/> | ||
<include file="$(find roslaunch)/test/xml/$(param file)" pass_all_args="true"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: this test seems out of place. This file is used to test setting args in included launch files. Also, including the same file twice here seems odd.
What are you trying to test? Perhaps it should be moved to a dedicated test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably I wanted to illustrate the use of param substitution in an include statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should create a separate launch file to test for this case, instead of adding onto this existing one.
@tahsinkose Friendly ping. After addressing my minor comments above, I'm happy to merge this PR. |
@jacobperron please see my comment in #723 (comment). |
Closed due to inactivity on reviews. |
Revival of #1993. Tested. Needs a reviewer approval to be merged.