Skip to content

Commit

Permalink
revert(bytetrack): introduce condition to use composable container
Browse files Browse the repository at this point in the history
Signed-off-by: Manato HIRABAYASHI <[email protected]>
  • Loading branch information
manato committed Sep 9, 2024
1 parent 2627942 commit ab9d630
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions edge_auto_jetson_launch/launch/bytetrack.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,42 @@
<arg name="bytetrack_visualizer_param_path" default="$(find-pkg-share edge_auto_jetson_launch)/config/bytetrack_visualizer.param.yaml"/>
<arg name="enable_visualizer" default="true"/>
<arg name="camera_id" default="0" />
<arg name="container_name" default="" />

<node pkg="autoware_bytetrack" exec="bytetrack_node_exe" output="screen" name="bytetrack_node_exe_$(var camera_id)">
<remap from="~/in/rect" to="$(var input/objects)"/>
<remap from="~/out/objects" to="$(var output/objects)"/>
<remap from="~/out/objects/debug/uuid" to="$(var output/objects)/debug/uuid"/>
<param from="$(var bytetrack_param_path)"/>
</node>
<let name="empty_container_is_specified" value="$(eval 'not &quot;$(var container_name)&quot;')" />
<!-- If container name is not specified,
execute function as an individual node -->
<group if="$(var empty_container_is_specified)">
<node pkg="autoware_bytetrack" exec="bytetrack_node_exe" output="screen" name="bytetrack_node_exe_$(var camera_id)">
<remap from="~/in/rect" to="$(var input/objects)"/>
<remap from="~/out/objects" to="$(var output/objects)"/>
<remap from="~/out/objects/debug/uuid" to="$(var output/objects)/debug/uuid"/>
<param from="$(var bytetrack_param_path)"/>
</node>
</group>

<!-- If container name is specified,
execute function as a composable node and load it into the container -->
<group unless= "$(var empty_container_is_specified)">
<load_composable_node target="$(var container_name)">
<composable_node pkg="autoware_bytetrack" plugin="autoware::bytetrack::ByteTrackNode" name="bytetrack$(var camera_id)">
<remap from="~/in/rect" to="$(var input/objects)"/>
<remap from="~/out/objects" to="$(var output/objects)"/>
<remap from="~/out/objects/debug/uuid" to="$(var output/objects)/debug/uuid"/>
<param from="$(var bytetrack_param_path)"/>
<extra_arg name="use_intra_process_comms" value="true"/>
</composable_node>
</load_composable_node>
</group>

<node pkg="autoware_bytetrack" exec="bytetrack_visualizer_node_exe" output="screen" if="$(var enable_visualizer)" name="bytetrack_visualizer_node_exe_$(var camera_id)">
<remap from="~/in/image" to="$(var input/image)"/>
<remap from="~/in/rect" to="$(var output/objects)"/>
<remap from="~/in/uuid" to="$(var output/objects)/debug/uuid"/>
<remap from="~/out/image" to="$(var output/objects)/debug/image"/>
<remap from="~/out/image/compressed" to="$(var output/objects)/debug/image/compressed"/>
<remap from="~/out/image/compressedDepth" to="$(var output/objects)/debug/image/compressedDepth"/>
<remap from="~/out/image/theora" to="$(var output/objects)/debug/image/theora"/>
<param from="$(var bytetrack_visualizer_param_path)"/>
</node>

Expand Down

0 comments on commit ab9d630

Please sign in to comment.