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 parameter substitution #297

Merged
merged 3 commits into from
Feb 28, 2022

Conversation

kenji-miyake
Copy link
Contributor

It is useful if we can use the parameter substitution.

<launch>
  <set_parameter name="name" value="value" />
  <let name="result" value="$(param name)" />
</launch>
SetParameter('name', 'value').execute(context)
value = Parameter('name').perform(context)

Also, since I got this error while I'm testing this, fixed it.

    @property
    def name(self) -> ParameterName:
        """Getter for name."""
>       return self.__param_dict.keys()[0]
E       TypeError: 'dict_keys' object is not subscriptable

build/launch_ros/launch_ros/actions/set_parameter.py:79: TypeError

Kenji Miyake added 2 commits February 25, 2022 21:11
Signed-off-by: Kenji Miyake <[email protected]>
Signed-off-by: Kenji Miyake <[email protected]>
@kenji-miyake
Copy link
Contributor Author

@jacobperron @ivanpauno Hello, could you kindly review this, please? 🙏

Copy link
Member

@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.

Seems like a reasonable addition to me.

@kenji-miyake kenji-miyake force-pushed the add-parameter-substitution branch from 9ce0e86 to 6e0dc0e Compare February 26, 2022 03:53
Copy link
Member

@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.

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

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

Successfully merging this pull request may close these issues.

2 participants