Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create package structure for YOLO implementation #97

Merged
merged 10 commits into from
Dec 20, 2024
18 changes: 18 additions & 0 deletions auv_vision/auv_detection/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.0.2)
project(auv_detection)

find_package(catkin REQUIRED COMPONENTS
)

catkin_package(
CATKIN_DEPENDS
)

include_directories(
${catkin_INCLUDE_DIRS}
)

install(DIRECTORY
launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
47 changes: 47 additions & 0 deletions auv_vision/auv_detection/launch/tracker.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
ozanhakantunca marked this conversation as resolved.
Show resolved Hide resolved
<launch>
<arg name="debug" default="false"/>
<arg name="yolo_model" default="rbp3s_best.pt"/>
<arg name="model_source_path" default="$(find auv_detection)/models/$(arg yolo_model)"/>
<arg name="ultralytics_models_dir" default="$(find ultralytics_ros)/models"/>
<arg name="input_topic" default="/taluy/cameras/cam_front/image_raw"/>
<arg name="result_topic" default="/yolo_result"/>
<arg name="result_image_topic" default="/yolo_image"/>
<arg name="conf_thres" default="0.25"/>
<arg name="iou_thres" default="0.45"/>
<arg name="max_det" default="300"/>
<arg name="classes" default=""/>
<arg name="tracker" default="bytetrack.yaml"/>
<arg name="device" default="cpu"/>
<arg name="result_conf" default="true"/>
<arg name="result_line_width" default="1"/>
<arg name="result_font_size" default="1"/>
<arg name="result_font" default="Arial.ttf"/>
<arg name="result_labels" default="true"/>
<arg name="result_boxes" default="true"/>
<!-- Create symlink before launching the node -->
<param name="/create_model_symlink_cmd"
command="bash -c 'ln -sf $(arg model_source_path) $(arg ultralytics_models_dir)/$(arg yolo_model)'"/>
<node name="tracker_node" pkg="ultralytics_ros" type="tracker_node.py" output="screen">
<param name="yolo_model" value="$(arg yolo_model)"/>
<param name="input_topic" value="$(arg input_topic)"/>
<param name="result_topic" value="$(arg result_topic)"/>
<param name="result_image_topic" value="$(arg result_image_topic)"/>
<param name="conf_thres" value="$(arg conf_thres)"/>
<param name="iou_thres" value="$(arg iou_thres)"/>
<param name="max_det" value="$(arg max_det)"/>
<param name="tracker" value="$(arg tracker)"/>
<param name="result_conf" value="$(arg result_conf)"/>
<param name="result_line_width" value="$(arg result_line_width)"/>
<param name="result_font_size" value="$(arg result_font_size)"/>
<param name="result_font" value="$(arg result_font)"/>
<param name="result_labels" value="$(arg result_labels)"/>
<param name="result_boxes" value="$(arg result_boxes)"/>
<rosparam param="classes" subst_value="true">$(arg classes)</rosparam>
<rosparam param="device" subst_value="true">$(arg device)</rosparam>
</node>

<node if="$(arg debug)" name="image_view" pkg="image_view" type="image_view" output="screen">
ozanhakantunca marked this conversation as resolved.
Show resolved Hide resolved
<remap from="image" to="$(arg result_image_topic)"/>
</node>
</launch>
Empty file.
16 changes: 16 additions & 0 deletions auv_vision/auv_detection/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<package format="2">
<name>auv_detection</name>
<version>0.1.0</version>
<description>The auv_detection package</description>

<author email="[email protected]">Ozan Hakan Tunca</author>
<maintainer email="[email protected]">Ozan Hakan Tunca</maintainer>

<license>BSD-3-Clause</license>

<buildtool_depend>catkin</buildtool_depend>

ozanhakantunca marked this conversation as resolved.
Show resolved Hide resolved
<export>
</export>
</package>
15 changes: 15 additions & 0 deletions auv_vision/auv_vision/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.10.2)
project(auv_vision)

find_package(catkin REQUIRED COMPONENTS
auv_detection
)

catkin_package(
CATKIN_DEPENDS
)

include_directories(
# include
${catkin_INCLUDE_DIRS}
)
17 changes: 17 additions & 0 deletions auv_vision/auv_vision/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<package format="2">
<name>auv_vision</name>
<version>0.1.0</version>
<description>The auv_vision package</description>

<maintainer email="[email protected]">Faruk Mimarlar</maintainer>
<author email="[email protected]">Faruk Mimarlar</author>

<license>BSD-3-Clause</license>

<buildtool_depend>catkin</buildtool_depend>
<depend>auv_detection</depend>
ozanhakantunca marked this conversation as resolved.
Show resolved Hide resolved

<export>
</export>
</package>
Loading