Object Detection with YOLO
DelibFlow integrates yolo_ros (v4.5.1) for real-time object detection on TiAGo’s head camera. It runs YOLOv11 by default, but the underlying library supports a bunch of model variants (YOLOv5 through YOLOv12, YOLO-World, YOLOE). There are three nodes involved: one that runs inference, one that tracks objects across frames, and one that overlays detections visually for debugging.
Launching it
The easiest way is through the TiAGo sim launch file:
ros2 launch tiago_sim tiago_yolo.launch.py
This starts YOLOv11 subscribed to head_front_camera/image with a confidence threshold
of 0.5, running on cuda:0. The model file (yolo11m.pt) is loaded from the
tiago_sim package models directory.
If you want to tweak it, all launch arguments are available:
ros2 launch tiago_sim tiago_yolo.launch.py \
model:=/path/to/your_model.pt \
threshold:=0.3 \
device:=cpu
Launch arguments
Argument |
Default |
Description |
|---|---|---|
|
|
Path to the model weights file |
|
|
Tracker config file (bytetrack or botsort) |
|
|
Inference device. Use |
|
|
Whether to start detection immediately on launch |
|
|
Confidence score threshold for detections |
|
|
Image topic to subscribe to |
|
|
QoS reliability (1 = BEST_EFFORT, 2 = RELIABLE) |
|
|
ROS namespace for all nodes and topics |
Yolo Node
This is the main inference node. It is a ROS 2 lifecycle node, so it goes through configure and activate transitions before processing images.
Node name: yolo_node
Topics subscribed
Topic |
Interface |
Description |
|---|---|---|
|
Input image stream from the camera |
Topics published
Topic |
Interface |
Description |
|---|---|---|
|
|
Array of all detected objects in the current frame, including bounding boxes, class names, confidence scores, masks, and keypoints |
Services
Service |
Interface |
Description |
|---|---|---|
|
Toggle detection on or off at runtime without restarting the node |
|
|
|
Change which object classes to detect (YOLOWorld models only) |
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
string |
|
Model variant to load. Options: |
|
string |
|
Path to the model weights file |
|
string |
|
Compute device ( |
|
bool |
|
Fuse Conv and BN layers for faster inference (not supported by YOLOE) |
|
string |
|
Image encoding to convert to before passing to the model |
|
bool |
|
Start processing images immediately on activation |
|
int |
|
QoS reliability policy for the image subscription |
|
double |
|
Minimum confidence score for a detection to be published |
|
double |
|
IoU threshold for non-maximum suppression |
|
int |
|
Input image height for inference |
|
int |
|
Input image width for inference |
|
bool |
|
Use FP16 half-precision inference (faster on supported GPUs) |
|
int |
|
Maximum number of detections per image |
|
bool |
|
Apply test-time augmentation for potentially better results at the cost of speed |
|
bool |
|
Class-agnostic NMS (merges overlapping boxes across different classes) |
|
bool |
|
Use full-resolution segmentation masks (higher quality but slower) |
Tracking Node
Tracks detected objects across frames using BYTETracker or BOT-SORT, assigning a persistent ID to each object so you can follow it over time.
Node name: tracking_node
Topics subscribed
Topic |
Interface |
Description |
|---|---|---|
|
Input image (time-synced with detections) |
|
|
|
Detections from the Yolo Node to associate with tracked IDs |
Topics published
Topic |
Interface |
Description |
|---|---|---|
|
|
Detections annotated with persistent tracking IDs |
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
string |
|
Tracker config file. Use |
|
int |
|
QoS reliability policy for the image subscription |
Debug Node
Overlays detections on the image for visual inspection. Useful for checking that the model is detecting the right things before wiring it into a behavior tree.
Node name: debug_node
Topics subscribed
Topic |
Interface |
Description |
|---|---|---|
|
Input image (time-synced with detections) |
|
|
|
Detections to overlay on the image |
Topics published
Topic |
Interface |
Description |
|---|---|---|
|
Image with bounding boxes, masks, and keypoints drawn on it |
|
|
3D bounding box markers for RViz |
|
|
Keypoint markers for RViz |
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
int |
|
QoS reliability policy for the image subscription |