Skip to content

lingxe01/yolov8-ros2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yolov8_ros2

ROS2(foxy version) wrapper for YOLOv8. This package enables you to perform object detection and segmentation.

Installation

Prerequisites

Build the package

mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
git clone https://github.com/ban2aru/yolov8-ros2.git
cd ..
sudo apt update
pip install -r ./src/yolov8-ros2/requirements.txt
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build
source ./install/setup.bash

Usage

Start the YOLOv8 node

ros2 launch yolov8_launch yolov8_foxy.launch.py

Object detection demo

ros2 launch yolov8_launch yolov8_foxy.launch.py img_topic:=<camera_image_topic>

Segmentation demo

ros2 launch yolov8_launch yolov8_foxy.launch.py weight:=yolov8n-seg.pt img_topic:=<camera_image_topic> 

Parameters

  • weight: YOLOv8 model weight. Default is yolov8n.pt
  • device: device type (GPU/CUDA/CPU). Default is cuda:0
  • conf_threshold: NMS confidence threshold. Default is 0.5
  • conf_threshold: NMS IoU threshold. Default is 0.7
  • image_reliability: image reliability QOS for the image topic. Option is 0:system default | 1:Reliable | 2:Best Effort. Default is 2
  • img_topic: camera topic of image. Default is /camera/rgb/image_raw

About

ROS2-foxy wrapper for yolov8

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 82.8%
  • CMake 17.2%