From 61b28836843e61e3195c0a1b48d5a7e811133147 Mon Sep 17 00:00:00 2001 From: Shinnosuke Hirakawa Date: Fri, 16 May 2025 14:44:11 +0900 Subject: [PATCH 1/2] fix: move image decompressor node and update launch arguments for compressed images --- .../launch/apriltag_16h5.launch.py | 16 +++++++++++++++- .../launch/calibrator.launch.xml | 2 ++ .../drs/tag_based_pnp_calibrator.launch.xml | 10 +--------- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/calibrators/tag_based_pnp_calibrator/launch/apriltag_16h5.launch.py b/calibrators/tag_based_pnp_calibrator/launch/apriltag_16h5.launch.py index 5ab10024..4b687e64 100644 --- a/calibrators/tag_based_pnp_calibrator/launch/apriltag_16h5.launch.py +++ b/calibrators/tag_based_pnp_calibrator/launch/apriltag_16h5.launch.py @@ -21,9 +21,23 @@ def add_launch_arg(name: str, default_value=None): launch_arguments.append(DeclareLaunchArgument(name, default_value=default_value)) add_launch_arg("image_topic", "/camera/image") + add_launch_arg("image_compressed_topic", "/camera/image/compressed") add_launch_arg("camera_info_topic", "/camera/camera_info") add_launch_arg("apriltag_detections_topic", "apriltag/detection_array") + decompressor_node = ComposableNode( + package="autoware_image_transport_decompressor", # The package containing the component + plugin="autoware::image_preprocessor::ImageTransportDecompressor", # The registered plugin name + name="decompressor", # Node name within the container + remappings=[ + ("decompressor/input/compressed_image", LaunchConfiguration("image_compressed_topic")), + ("decompressor/output/raw_image", LaunchConfiguration("image_topic")), + ], + parameters=[ + {"encoding": "default"} + ] + ) + composable_node = ComposableNode( name="apriltag", package="apriltag_ros", @@ -42,7 +56,7 @@ def add_launch_arg(name: str, default_value=None): namespace="apriltag", package="rclcpp_components", executable="component_container", - composable_node_descriptions=[composable_node], + composable_node_descriptions=[decompressor_node, composable_node], output="screen", ) diff --git a/calibrators/tag_based_pnp_calibrator/launch/calibrator.launch.xml b/calibrators/tag_based_pnp_calibrator/launch/calibrator.launch.xml index 4af18237..91c478a6 100644 --- a/calibrators/tag_based_pnp_calibrator/launch/calibrator.launch.xml +++ b/calibrators/tag_based_pnp_calibrator/launch/calibrator.launch.xml @@ -1,5 +1,6 @@ + @@ -37,6 +38,7 @@ + diff --git a/sensor_calibration_manager/launch/drs/tag_based_pnp_calibrator.launch.xml b/sensor_calibration_manager/launch/drs/tag_based_pnp_calibrator.launch.xml index 3a5a0bc7..2417d84d 100644 --- a/sensor_calibration_manager/launch/drs/tag_based_pnp_calibrator.launch.xml +++ b/sensor_calibration_manager/launch/drs/tag_based_pnp_calibrator.launch.xml @@ -46,17 +46,9 @@ - - - - op - - - - - + From 48f2f4f453ac58bb1592f7880a857fd37ddef884 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 16 May 2025 06:01:15 +0000 Subject: [PATCH 2/2] ci(pre-commit): autofix --- .../launch/apriltag_16h5.launch.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/calibrators/tag_based_pnp_calibrator/launch/apriltag_16h5.launch.py b/calibrators/tag_based_pnp_calibrator/launch/apriltag_16h5.launch.py index 4b687e64..9851cca2 100644 --- a/calibrators/tag_based_pnp_calibrator/launch/apriltag_16h5.launch.py +++ b/calibrators/tag_based_pnp_calibrator/launch/apriltag_16h5.launch.py @@ -26,16 +26,14 @@ def add_launch_arg(name: str, default_value=None): add_launch_arg("apriltag_detections_topic", "apriltag/detection_array") decompressor_node = ComposableNode( - package="autoware_image_transport_decompressor", # The package containing the component - plugin="autoware::image_preprocessor::ImageTransportDecompressor", # The registered plugin name - name="decompressor", # Node name within the container + package="autoware_image_transport_decompressor", # The package containing the component + plugin="autoware::image_preprocessor::ImageTransportDecompressor", # The registered plugin name + name="decompressor", # Node name within the container remappings=[ ("decompressor/input/compressed_image", LaunchConfiguration("image_compressed_topic")), ("decompressor/output/raw_image", LaunchConfiguration("image_topic")), ], - parameters=[ - {"encoding": "default"} - ] + parameters=[{"encoding": "default"}], ) composable_node = ComposableNode(