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

[launch_testing_ros] Fix example launch test #112

Closed
wants to merge 1 commit into from

Conversation

jacobperron
Copy link
Member

Fixes #97

Inject the ROS-specific preamble so that the test can be run as described in the README.


Note, we may want to consider a mechanism to detect if the ROS preamble has already been included so that ros2test doesn't inject it again in launch files like this example.

Fixes #97

Inject the ROS-specific preamble so that the test can be run as described in the README.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@ivanpauno
Copy link
Member

pre-waffle: @jacobperron Can you add a reviewer?

Copy link
Member

@ivanpauno ivanpauno left a comment

Choose a reason for hiding this comment

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

LGTM!
@jacobperron Can you open a tracking issue to discuss if ros2 test should inject the default launch description or not?

@jacobperron
Copy link
Member Author

I've opened an issue about injecting the launch_ros preamble generally (for ros2 launch and ros2 test): #120

After discussing with @wjwwood, I don't think this PR is an appropriate fix. The example launch script is making use of context.locals.launch_ros_node, which is an implementation detail that users shouldn't rely on. I'll open an alternative PR refactoring the example script accordingly.

@ivanpauno
Copy link
Member

The example launch script is making use of context.locals.launch_ros_node, which is an implementation detail that users shouldn't rely on. I'll open an alternative PR refactoring the example script accordingly.

How is that related with the default launch description injections?
Does not using context.locals.launch_ros_node avoid the need of injecting the default launch description? If that's the case, I think it's fine to refactor.

@jacobperron
Copy link
Member Author

How is that related with the default launch description injections?
Does not using context.locals.launch_ros_node avoid the need of injecting the default launch description? If that's the case, I think it's fine to refactor.

Exactly. AFAICT, there's no need for the default launch description in the example. I'll check anyways.

@ivanpauno
Copy link
Member

Sounds good, I will close this one as there's already an issue tracking the problem.

@ivanpauno ivanpauno closed this Jan 30, 2020
@jacobperron jacobperron deleted the jacob/fix_97 branch January 30, 2020 21:16
@jacobperron
Copy link
Member Author

See #121 for an alternate fix.

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.

talker_listener_launch_test example is broken
2 participants