Skip to content

Commit

Permalink
fix: update edge auto (#17)
Browse files Browse the repository at this point in the history
* refactor(yolox): change param file name because of its versatility

Signed-off-by: Manato HIRABAYASHI <[email protected]>

* revert(yolox): introduce condition to use composable container

Signed-off-by: Manato HIRABAYASHI <[email protected]>

* revert(bytetrack): introduce condition to use composable container

Signed-off-by: Manato HIRABAYASHI <[email protected]>

* fix(image_transport_decompressor): treat autoware prefix

Signed-off-by: Manato HIRABAYASHI <[email protected]>

---------

Signed-off-by: Manato HIRABAYASHI <[email protected]>
  • Loading branch information
manato authored Sep 11, 2024
1 parent 433f30e commit c54858f
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/**:
ros__parameters:
encoding: default
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,27 @@
<!-- flag to use ROS2 intra process -->
<arg name="use_intra_process" default="True" />

<arg name="image_transport_decompressor_param_path" default="$(find-pkg-share edge_auto_jetson_launch)/config/image_transport_decompressor.param.yaml"/>

<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="image_transport_decompressor" exec="image_transport_decompressor_node" name="image_transport_decompressor">
<node pkg="autoware_image_transport_decompressor" exec="image_transport_decompressor_node" name="image_transport_decompressor">
<remap from="~/input/compressed_image" to="$(var input/compressed_image)" />
<remap from="~/output/raw_image" to="$(var output/raw_image)" />
<param from="$(var image_transport_decompressor_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="image_transport_decompressor" plugin="image_preprocessor::ImageTransportDecompressor" name="image_transport_decompressor">
<composable_node pkg="autoware_image_transport_decompressor" plugin="autoware::image_preprocessor::ImageTransportDecompressor" name="image_transport_decompressor">
<remap from="~/input/compressed_image" to="$(var input/compressed_image)" />
<remap from="~/output/raw_image" to="$(var output/raw_image)" />
<param from="$(var image_transport_decompressor_param_path)"/>
<extra_arg name="use_intra_process_comms" value="$(var use_intra_process)" />
</composable_node>
</load_composable_node>
Expand Down
37 changes: 28 additions & 9 deletions edge_auto_jetson_launch/launch/tensorrt_yolox.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,35 @@
<arg name="output/objects" default="/perception/object_recognition/detection/rois0"/>
<arg name="model_name" default="yolox-sPlus-opt"/>
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>
<arg name="yolox_param_path" default="$(find-pkg-share edge_auto_jetson_launch)/config/yolox_tiny.param.yaml"/>
<arg name="use_decompress" default="true" description="use image decompress"/>
<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 c54858f

Please sign in to comment.