Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,21 @@ 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",
Expand All @@ -42,7 +54,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",
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<launch>
<arg name="image_topic" description="Raw image topic (currently we do not support rectified images)"/>
<arg name="image_compressed_topic" description="Compressed image topic"/>
<arg name="camera_info_topic"/>
<arg name="pointcloud_topic"/>
<arg name="base_frame" default="base_link"/>
Expand Down Expand Up @@ -37,6 +38,7 @@
<!-- apriltag detector -->
<include file="$(find-pkg-share tag_based_pnp_calibrator)/launch/apriltag_16h5.launch.py">
<arg name="image_topic" value="$(var image_topic)"/>
<arg name="image_compressed_topic" value="$(var image_compressed_topic)"/>
<arg name="camera_info_topic" value="$(var camera_info_topic)"/>
</include>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,9 @@
<let name="use_rectified_image" value="false"/>

<group>
<!-- image decompressor -->
<node pkg="autoware_image_transport_decompressor" exec="image_transport_decompressor_node" name="decompressor" output="screen">
<remap from="decompressor/input/compressed_image" to="$(var image_compressed_topic)"/>
op
<remap from="decompressor/output/raw_image" to="$(var image_decompressed_topic)"/>

<param name="encoding" value="default"/>
</node>

<!-- tag based calibrator -->
<include file="$(find-pkg-share tag_based_pnp_calibrator)/launch/calibrator.launch.xml">
<arg name="image_compressed_topic" value="$(var image_compressed_topic)"/>
<arg name="image_topic" value="$(var image_decompressed_topic)"/>
<arg name="camera_info_topic" value="$(var camera_info_topic)"/>
<arg name="pointcloud_topic" value="$(var pointcloud_topic)"/>
Expand Down
Loading