Skip to content

Commit d003178

Browse files
committed
Upgrading ultralytics + adding YOLOv26 launch
1 parent 7ef13c9 commit d003178

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
numpy<2
22
opencv-python>=4.8.1.78
33
typing-extensions>=4.4.0
4-
ultralytics==8.3.168
4+
ultralytics==8.4.6
55
lap>=0.5.12
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright (C) 2024 Miguel Ángel González Santamarta
2+
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
16+
17+
import os
18+
from launch import LaunchDescription
19+
from launch.substitutions import LaunchConfiguration
20+
from launch.actions import IncludeLaunchDescription
21+
from launch.launch_description_sources import PythonLaunchDescriptionSource
22+
from ament_index_python.packages import get_package_share_directory
23+
24+
25+
def generate_launch_description():
26+
27+
return LaunchDescription(
28+
[
29+
IncludeLaunchDescription(
30+
PythonLaunchDescriptionSource(
31+
os.path.join(
32+
get_package_share_directory("yolo_bringup"),
33+
"launch",
34+
"yolo.launch.py",
35+
)
36+
),
37+
launch_arguments={
38+
"model": LaunchConfiguration("model", default="yolo26m.pt"),
39+
"tracker": LaunchConfiguration("tracker", default="bytetrack.yaml"),
40+
"device": LaunchConfiguration("device", default="cuda:0"),
41+
"enable": LaunchConfiguration("enable", default="True"),
42+
"threshold": LaunchConfiguration("threshold", default="0.5"),
43+
"input_image_topic": LaunchConfiguration(
44+
"input_image_topic", default="/camera/rgb/image_raw"
45+
),
46+
"image_reliability": LaunchConfiguration(
47+
"image_reliability", default="1"
48+
),
49+
"namespace": LaunchConfiguration("namespace", default="yolo"),
50+
}.items(),
51+
)
52+
]
53+
)

0 commit comments

Comments
 (0)