File tree Expand file tree Collapse file tree 3 files changed +21
-8
lines changed
turtlebot3_yolo_object_detection Expand file tree Collapse file tree 3 files changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Changelog for package turtlebot3_applications
66------------------
77* Added turtlebot3_yolo_object_detection pkg
88* Added a Python script that runs the YOLO model on live camera images and publishes detection results with bounding boxes
9- * Contributor : YeonSoo Noh
9+ * Contributors : YeonSoo Noh
1010
11111.2.0 (2025-04-25)
1212------------------
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ Changelog for package turtlebot3_yolo_object_detection
66------------------
77* Added turtlebot3_yolo_object_detection pkg
88* Added a Python script that runs the YOLO model on live camera images and publishes detection results with bounding boxes
9- * Contributor : YeonSoo Noh
9+ * Contributors : YeonSoo Noh
Original file line number Diff line number Diff line change 1717# Author: YeonSoo Noh
1818
1919from launch import LaunchDescription
20+ from launch .actions import DeclareLaunchArgument
21+ from launch .substitutions import LaunchConfiguration
2022from launch_ros .actions import Node
2123
2224
2325def generate_launch_description ():
26+ model_path_arg = DeclareLaunchArgument (
27+ 'model_path' ,
28+ default_value = '~/Downloads/best.pt' ,
29+ description = 'Path to the YOLO model file'
30+ )
31+ model_path = LaunchConfiguration ('model_path' )
32+
33+ object_detection_node = Node (
34+ package = 'turtlebot3_yolo_object_detection' ,
35+ executable = 'turtlebot3_yolo_object_detection' ,
36+ name = 'turtlebot3_object_detection_node' ,
37+ output = 'screen' ,
38+ parameters = [{'model_path' : model_path }]
39+ )
40+
2441 return LaunchDescription ([
25- Node (
26- package = 'turtlebot3_yolo_object_detection' ,
27- executable = 'turtlebot3_yolo_object_detection' ,
28- name = 'turtlebot3_object_detection_node' ,
29- output = 'screen'
30- )
42+ model_path_arg ,
43+ object_detection_node ,
3144 ])
You can’t perform that action at this time.
0 commit comments