← Work

ros2_yolos_trt

TensorRT-native YOLO inference for ROS 2: six tasks, including monocular metric depth, as composable lifecycle nodes on a zero-copy GPU pipeline

Creator & Maintainer · 2026 · active · GitHub ↗

Problem

ros2_yolos_cpp brought YOLOs-CPP into ROS 2 on ONNX Runtime. Robots running NVIDIA GPUs and Jetson boards needed the same nodes on TensorRT, with GPU-resident preprocessing, so perception fits the latency budget of a moving vehicle.

Approach

Built on YOLOs-CPP-TensorRT. Detection, segmentation, pose, oriented bounding boxes, classification and monocular metric depth run as composable lifecycle nodes. Point a node at an .onnx file: the TensorRT engine is built on first configure and cached, keyed on GPU architecture, TensorRT version and precision, so one model file serves a fleet of mixed GPUs. Inference replays a captured CUDA graph each frame.

Results

Measured on an NVIDIA RTX 4090 with TensorRT 10 and ROS 2 Jazzy, FP16 engines. Latency is reported by the nodes and covers inference plus message conversion.

Task Model Mean latency Inference FPS
Detection yolo11n 2.78 ms 360
Pose yolo11n-pose 0.95 ms 1057
Depth yolo26n-depth 2.25 ms 444
Segmentation yolo11n-seg 10.39 ms 96

Stack

  • C++17
  • ROS 2 Humble / Jazzy
  • TensorRT 10
  • CUDA ≥ 12
  • CMake

Technologies

  • C++17
  • ROS 2 (Humble, Jazzy)
  • TensorRT 10
  • CUDA
  • CUDA Graph