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

Add "param" substitution in tags #2097

Closed
wants to merge 15 commits into from

Conversation

tahsinkose
Copy link
Contributor

Revival of #1993. Tested. Needs a reviewer approval to be merged.

@tahsinkose
Copy link
Contributor Author

@sloretz Friendly ping.

Copy link
Contributor

@jacobperron jacobperron left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be a leftover.

Comment on lines +6 to +7
<param name="file" value="test-arg-invalid-included.xml"/>
<include file="$(find roslaunch)/test/xml/$(param file)" pass_all_args="true"/>
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@jacobperron
Copy link
Contributor

@tahsinkose Friendly ping. After addressing my minor comments above, I'm happy to merge this PR.

@tahsinkose
Copy link
Contributor Author

@jacobperron please see my comment in #723 (comment).

@tahsinkose tahsinkose closed this Dec 11, 2021
@tahsinkose
Copy link
Contributor Author

Closed due to inactivity on reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants