Skip to content

Commit

Permalink
revert(yolox): 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 ffd5f0a commit 2627942
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions edge_auto_jetson_launch/launch/tensorrt_yolox.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,32 @@
<arg name="yolox_param_path" default="$(find-pkg-share edge_auto_jetson_launch)/config/yolox.param.yaml"/>
<arg name="build_only" default="false" description="exit after trt engine is built"/>
<arg name="camera_id" default="0" />

<node pkg="autoware_tensorrt_yolox" exec="autoware_tensorrt_yolox_node_exe" name="tensorrt_yolox_$(var camera_id)" output="screen">
<remap from="~/in/image" to="$(var input/image)"/>
<remap from="~/out/objects" to="$(var output/objects)"/>
<param from="$(var yolox_param_path)" allow_substs="true"/>
<param name="build_only" value="$(var build_only)"/>
</node>
<arg name="container_name" default="" />

<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_tensorrt_yolox" exec="autoware_tensorrt_yolox_node_exe" name="tensorrt_yolox_$(var camera_id)" output="screen">
<remap from="~/in/image" to="$(var input/image)"/>
<remap from="~/out/objects" to="$(var output/objects)"/>
<param from="$(var yolox_param_path)" allow_substs="true"/>
<param name="build_only" value="$(var build_only)"/>
</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_tensorrt_yolox" plugin="autoware::tensorrt_yolox::TrtYoloXNode" name="tensorrt_yolox_$(var camera_id)">
<remap from="~/in/image" to="$(var input/image)"/>
<remap from="~/out/objects" to="$(var output/objects)"/>
<param from="$(var yolox_param_path)" allow_substs="true"/>
<param name="build_only" value="$(var build_only)"/>
<extra_arg name="use_intra_process_comms" value="true" />
</composable_node>
</load_composable_node>
</group>

</launch>

0 comments on commit 2627942

Please sign in to comment.