[Launch] Allow ros launch targets to include each other idiomatically#53
Open
beekarthik wants to merge 1 commit intomvukov:mainfrom
Open
[Launch] Allow ros launch targets to include each other idiomatically#53beekarthik wants to merge 1 commit intomvukov:mainfrom
beekarthik wants to merge 1 commit intomvukov:mainfrom
Conversation
Owner
|
Thanks for the contribution. What's the use-case here? Can you add an example or even better a test for this new feature? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a custom Bazel rule (ros_launch_rule) and macro (ros_launch_macro) that automate the process of generating and executing ROS launch scripts, while handling the necessary runtime dependencies for ROS nodes, launch files, and parameter files.
Key Changes
Custom Provider
A custom provider used to propagate information about ROS nodes, launch files, and parameter files through the build graph.
Custom
ros_launch_ruleRuleGenerates a Python launch script by expanding a template.
1, Collects transitive dependencies such as node binaries, launch files, and parameter files from the current target and its dependencies.
2. Exposes these resources via the RosLaunchInfo provider, enabling downstream rules to access them.
3. Uses Bazel’s runfiles mechanism to ensure that the generated script and all required files are available at runtime.
RosLaunchInfo Provider:
Modified
ros_launchMacroPotential Points of Contention
One potential point of contention I can already see is that the actual
py_binarytarget is now named<target_name>_launch- happy to swap the name of the rule and py_binary if that makes for a cleaner PR (no interface breakage)How was this Tested
Everything builds and ran examples