ROS2(foxy version) wrapper for YOLOv8. This package enables you to perform object detection and segmentation.
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
ros2 launch yolov8_launch yolov8_foxy.launch.py
ros2 launch yolov8_launch yolov8_foxy.launch.py img_topic:=<camera_image_topic>
ros2 launch yolov8_launch yolov8_foxy.launch.py weight:=yolov8n-seg.pt img_topic:=<camera_image_topic>
- 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