Note
This project if forked from
ultralytics/ultralytics
Install the required library:
sudo apt install python3-pip
pip install ultralytics
pip install rospkg
Clone the repo into your catkin workspace and build the package:
mkdir -p yolov8_ws/src && cd yolov8_ws/src
git clone https://github.com/JINtaeung/yolov8_ros1.git
cd ../ && catkin build
echo "source ~/yolov8_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
Before you launch the node, adjust the parameters in the launch file.
- launch/yolo_v8.launch for developer
params | value |
---|---|
"img_data" | "usb_cam or gazebo" |
"weight_path" | "weight file path" |
"image_topic" | "탐지할 이미지 rostopic" (usb_cam인 경우 필요X) |
"cen_topic" | "중심점 출력 rostopic" |
"conf" | "해당 값 이하의 confidence이면 탐지X" |
"result_pub" | "true: 탐지 영상 /yolo/detection_image로 publish" |
- YOLOv8 실행
roslaunch yolov8_ros yolo_v8.launch
- Center pose of Bounding box
rostopic echo /yolo/center