ROS 2 yolov8_msgs Guide: BoundingBox2D, DetectionArray & Python Detection Publisher

yolov8_msgs vs vision_msgs field access: bbox.center_x/center_y (Myzhar) vs bbox.center.position.x/y (official). DetectionArray subscriber, Python publisher, Humble/Jazzy, AttributeError fixes, and 3D depth projection.

In this article

  • Step 1: Workspace Setup & Installation
  • Step 2: Creating Your Own Detection Node Package
  • Message Field Reference
  • Option A: Using yolov8_msgs
  • Tracker Integration: ByteTrack & BoT-SORT
  • Option B: Using vision_msgs (Official ROS)
  • QoS Profiles for Camera Topics
  • Subscribing to Detections
  • Annotated Image Publisher (RViz2 / RQT)
  • Getting 3D Position from Depth
  • Complete ROS 2 Launch File
  • Testing & Debugging Workflow
  • Common Errors & Fixes