From 5ef7845564ca263ad2b1b861a542e0c435a17a9d Mon Sep 17 00:00:00 2001 From: bkarthik Date: Fri, 23 Aug 2024 16:37:08 -0700 Subject: [PATCH 1/2] pass along data --- ros/launch.bzl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ros/launch.bzl b/ros/launch.bzl index c1c91aa..0ab8609 100644 --- a/ros/launch.bzl +++ b/ros/launch.bzl @@ -18,6 +18,9 @@ def ros_launch(name, nodes, launch_files, **kwargs): "{launch_files}": ", ".join(launch_file_paths), } + # Extract data field from kwargs + data = kwargs.pop("data", []) + launch_script = "{}_launch.py".format(name) expand_template( name = "{}_launch_gen".format(name), @@ -30,7 +33,7 @@ def ros_launch(name, nodes, launch_files, **kwargs): py_binary( name = name, srcs = [launch_script], - data = nodes + launch_files, + data = nodes + launch_files + data, main = launch_script, deps = ["@com_github_mvukov_rules_ros//third_party/ros:roslaunch"], **kwargs From 4eb5b007fc82fc913aa722a85a0d84e4e2f65da6 Mon Sep 17 00:00:00 2001 From: bkarthik Date: Mon, 26 Aug 2024 10:53:41 -0700 Subject: [PATCH 2/2] review comment --- ros/launch.bzl | 1 - 1 file changed, 1 deletion(-) diff --git a/ros/launch.bzl b/ros/launch.bzl index 0ab8609..f5ae39b 100644 --- a/ros/launch.bzl +++ b/ros/launch.bzl @@ -18,7 +18,6 @@ def ros_launch(name, nodes, launch_files, **kwargs): "{launch_files}": ", ".join(launch_file_paths), } - # Extract data field from kwargs data = kwargs.pop("data", []) launch_script = "{}_launch.py".format(name)