Skip to content
Proyectos

intel/ros2_openvino_toolkit

Ver en GitHub

Acerca de

This repository provides a set of tools and libraries to integrate Intel® OpenVINO™ Toolkit with ROS 2 (Robot Operating System), enabling efficient deployment of deep learning models for computer vision applications on Intel® hardware.

Ciencia e ingeniería

Cómo se miden estas cifras

What you can do

  • Object Detection
  • Age Gender Recognition
  • Emotion Recognition
  • Head Pose Estimation

Crecimiento de estrellas medido

in 24h
0
in 7 days
Recopilando historial
in 15 days
Recopilando historial
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

ros2_openvino_toolkit

Deep learning inference for ROS 2 with Intel® OpenVINO™ on Intel CPU, GPU and NPU

OpenVINO ROS 2 Ubuntu License

ROS 2 OpenVINO Toolkit: camera inputs, a YAML pipeline and OpenVINO on Intel CPU, GPU or NPU, published as ROS 2 topics

Quick Start  ·  Supported Features  ·  YOLO26  ·  Debian Packages  ·  Docker  ·  Releases

Table of Contents

Overview

At a glance: supported perception tasks, why on-device inference matters at the edge, and how the toolkit is packaged and tested

ROS2 Version Supported

Branch ROS 2 Ubuntu OpenVINO Build Package Format Release
main Jazzy (development branch) 24.04 2026.5.0 - - - -
ros2_lyrical Lyrical (pre-release) 26.04 2026.5.0 Build Debian package Code format Release
ros2_jazzy Jazzy 24.04 2026.5.0 Build Debian package Code format Release
ros2_humble Humble 22.04 2026.5.0 Build Debian package Code format Release

OpenVINO is installed from the Intel APT repository on all branches. main is the development branch and tracks the Jazzy line. ros2_jazzy, ros2_humble and ros2_lyrical are the maintenance branches of each ROS 2 distribution, and each release is tagged as <distro>/<version>, for example humble/2026.5.0. Releases for end-of-life distributions (Dashing, Eloquent, Foxy, Galactic) are kept as archive/* tags.

The version of a release is the OpenVINO release that the packages are built against. A release that keeps the OpenVINO release raises the Debian revision (2026.5.0-2).

Inference Features Supported

  • Object Detection
  • Face Detection
  • Age Gender Recognition
  • Emotion Recognition
  • Head Pose Estimation
  • Object Segmentation (Semantic & Instance)
  • Keypoint Detection (Pose Estimation)
  • Oriented Object Detection (OBB)
  • Image Classification
  • Depth Estimation
  • Person Re-Identification
  • Vehicle Attribute Detection
  • Vehicle License Plate Detection
  • Intel NPU (Neural Processing Unit) Support - Hardware acceleration for Intel Core Ultra processors

Prerequisite

Prerequisite Mandatory? Description
Processor Mandatory A platform with Intel processors assembled. (Refer to the OpenVINO system requirements for the full list of Intel processors supported.)
OS Mandatory Only Ubuntu is tested. Use the Ubuntu release that matches your ROS 2 distribution. For example: Ubuntu 22.04 for Humble, Ubuntu 24.04 for Jazzy, Ubuntu 26.04 for Lyrical.
ROS2 Mandatory Choose the distribution matching your OS and check out the corresponding branch from the table in section ROS2 Version Supported.
OpenVINO Mandatory The version of OpenVINO toolkit is decided by the OS and ROS2 distros you use. See the table above in Section ROS2 Version Supported.
RealSense Camera Optional RealSense Camera is optional, you may choose these alternatives as the input: Standard Camera, ROS Image Topic, Video/Image File or RTSP camera.

Introduction

Design Architecture

Architecture Design From the view of hierarchical architecture design, the package is divided into different functional components, as shown in the picture below.

OpenVINO_Architecture

Intel® OpenVINO™ toolkit
  • Intel® OpenVINO™ toolkit provides a ROS-adapted runtime framework of neural network which quickly deploys applications and solutions for vision inference. By leveraging Intel® OpenVINO™ toolkit and corresponding libraries, this ROS2 runtime framework extends workloads across Intel® hardware (including accelerators) and maximizes performance.
    • Increase deep learning workload performance up to 19x1 with computer vision accelerators from Intel.
    • Unleash convolutional neural network (CNN)-based deep learning inference using a common API.
    • Speed development using optimized OpenCV* and OpenVX* functions. See the OpenVINO repository for an introduction to Intel OpenVINO™.

ROS OpenVINO Runtime Framework
  • ROS OpenVINO Runtime Framework is the main body of this repo. It provides key logic implementation for pipeline lifecycle management, resource management and ROS system adapter, which extends Intel OpenVINO toolkit and libraries. Furthermore, this runtime framework provides ways to simplify launching, configuration, data analysis and re-use.

ROS Input & Output
  • Diverse Input resources are data resources to be inferred and analyzed with the OpenVINO framework.
  • ROS interfaces and outputs currently include Topic and service. Natively, RViz output and CV image window output are also supported by refactoring topic message and inference results.

Optimized Models
  • Optimized Models are models in the OpenVINO intermediate representation (IR). The model conversion tools of Intel® OpenVINO™ toolkit import trained models from frameworks such as PyTorch, TensorFlow, ONNX and PaddlePaddle and convert them to this unified format. The toolkit can also compress the weights to FP16 and quantize a model to INT8.

Logic Flow

Logic Flow From the view of logic implementation, the package introduces the definitions of parameter manager, pipeline and pipeline manager. The following picture depicts how these entities co-work together when the corresponding program is launched.

Logic_Flow

Once a corresponding program is launched with a specified .yaml config file passed in the .launch file or via command line, parameter manager analyzes the configurations about pipeline and the whole framework, then shares the parsed configuration information with pipeline procedure. A pipeline instance is created by following the configuration info and is added into pipeline manager for lifecycle control and inference action triggering.

The contents in .yaml config file should be well structured and follow the supported rules and entity names. Please see yaml configuration guidance for how to create or edit the config files.

Pipeline

Pipeline fulfills the whole data handling process: initializing Input Component for image data gathering and formatting; building up the structured inference network and passing the formatted data through the inference network; transferring the inference results and handling output, etc.

Pipeline manager

Pipeline manager manages all the created pipelines according to the inference requests or external demands (say, system exception, resource limitation, or end user's operation). Because of co-working with resource management and being aware of the whole framework, it covers the ability of performance optimization by sharing system resource between pipelines and reducing the burden of data copy.

Supported Features

Multiple Input Components

Currently, the package supports several input resources for acquiring image data. The following tables are listed:

Input Resource Table
Input Resource Description
StandardCamera Any RGB camera with USB port supporting. Currently only the first USB camera if many are connected.
RealSenseCamera Deprecated alias of RealSenseCameraTopic: reads the image topic of the RealSense ROS node (camera:=realsense). The toolkit no longer links librealsense, so it works with any librealsense version.
ImageTopic Any ROS topic which is structured in image message.
Image Any image file which can be parsed by openCV, such as .png, .jpeg.
Video Any video file which can be parsed by openCV.
IpCamera Any RTSP server which can push video stream.

Inference Implementations

Currently, the corresponding relation of supported inference features, models used and yaml configurations are listed as follows:

Inference Feature Correspondence Table
Inference Description YAML Configuration Model Used
Face Detection Object Detection task applied to face recognition using a sequence of neural networks. pipeline_image.yaml
pipeline_image_video.yaml
pipeline_people.yaml
pipeline_people_ip.yaml
face-detection-adas-0001
age-gender-recognition-retail-0013
emotions-recognition-retail-0003
head-pose-estimation-adas-0001
Emotion Recognition Emotion recognition based on detected face image. pipeline_image.yaml
pipeline_image_video.yaml
pipeline_people.yaml
pipeline_people_ip.yaml
emotions-recognition-retail-0003
Age & Gender Recognition Age and gender recognition based on detected face image. pipeline_image.yaml
pipeline_image_video.yaml
pipeline_people.yaml
pipeline_people_ip.yaml
age-gender-recognition-retail-0013
Head Pose Estimation Head pose estimation based on detected face image. pipeline_image.yaml
pipeline_image_video.yaml
pipeline_people.yaml
pipeline_people_ip.yaml
head-pose-estimation-adas-0001
Object Detection Object detection based on SSD-based or YOLO26 trained models. pipeline_object.yaml
pipeline_object_topic.yaml
pipeline_yolo26_detection.yaml
ssdlite_mobilenet_v2
yolo26
Vehicle and License Detection Vehicle and license detection based on Intel models. pipeline_vehicle_detection.yaml vehicle-license-plate-detection-barrier-0106
vehicle-attributes-recognition-barrier-0039
license-plate-recognition-barrier-0001
Object Segmentation - Semantic semantic segmentation, assign a class label to each pixel in an image. pipeline_segmentation.yaml
pipeline_segmentation_image.yaml
pipeline_video.yaml
pipeline_yolo26_semantic.yaml
semantic-segmentation-adas-0001
deeplabv3
yolo26-sem
Object Segmentation - Instance Instance Segmentation, combination of semantic segmentation & object detection. pipeline_yolo26_segmentation.yaml yolo26-seg
Keypoint Detection Detection of persons and their body keypoints (pose estimation). pipeline_yolo26_pose.yaml yolo26-pose
Oriented Object Detection Object detection with rotated bounding boxes (OBB). pipeline_yolo26_obb.yaml yolo26-obb
Image Classification Classification of the whole image. pipeline_yolo26_classification.yaml yolo26-cls
Depth Estimation Estimation of the depth of each pixel of an image. pipeline_yolo26_depth.yaml yolo26-depth
Person Attributes Person attributes based on object detection. pipeline_person_attributes.yaml person-attributes-recognition-crossroad-0230
person-detection-retail-0013
Person Reidentification Person reidentification based on object detection. pipeline_reidentification.yaml person-detection-retail-0013
person-reidentification-retail-0277

ROS interfaces and outputs

The inference results can be output in several types. One or more types can be enabled for any inference pipeline.

Topic

Specific topic(s) can be generated and published according to the given inference functionalities.

Published Topic Correspondence Table
Inference Published Topic
People Detection /ros2_openvino_toolkit/face_detection(object_msgs:msg:ObjectsInBoxes)
Emotion Recognition /ros2_openvino_toolkit/emotions_recognition(object_msgs:msg:EmotionsStamped)
Age and Gender Recognition /ros2_openvino_toolkit/age_genders_Recognition(object_msgs:msg:AgeGenderStamped)
Head Pose Estimation /ros2_openvino_toolkit/headposes_estimation(object_msgs:msg:HeadPoseStamped)
Object Detection /ros2_openvino_toolkit/detected_objects(object_msgs::msg::ObjectsInBoxes)
Object Segmentation /ros2_openvino_toolkit/segmented_objects(object_msgs::msg::ObjectsInMasks)
Keypoint Detection /ros2_openvino_toolkit/detected_keypoints(object_msgs::msg::ObjectsWithKeypoints)
Oriented Object Detection /ros2_openvino_toolkit/detected_oriented_objects(object_msgs::msg::ObjectsInOrientedBoxes)
Image Classification /ros2_openvino_toolkit/classified_objects(object_msgs::msg::Objects)
Depth Estimation /ros2_openvino_toolkit/depth_image(sensor_msgs::msg::Image)
Person Reidentification /ros2_openvino_toolkit/reidentified_persons(object_msgs::msg::ReidentificationStamped)
Vehicle Detection /ros2_openvino_toolkit/detected_vehicles_attribs(object_msgs::msg::VehicleAttribsStamped)
Vehicle License Detection /ros2_openvino_toolkit/detected_license_plates(object_msgs::msg::LicensePlateStamped)

Service

Several ROS2 Services are created, expecting to be used in client/server mode, especially when synchronously getting inference results for a given image frame or when managing inference pipeline's lifecycle.

Service Correspondence Table
Inference Service
Object Detection Service /detect_object(object_msgs::srv::DetectObject)
Face Detection Service /detect_face(object_msgs::srv::DetectObject)
Age Gender Detection Service /detect_age_gender(object_msgs::srv::AgeGender)
Headpose Detection Service /detect_head_pose(object_msgs::srv::HeadPose)
Emotion Detection Service /detect_emotion(object_msgs::srv::Emotion)

RViz

RViz display is also supported by the composited topic of original image frame with inference result. To show in RViz tool, add an image marker with the composited topic: /ros2_openvino_toolkit/image_rviz(sensor_msgs::Image)

Image Window

OpenCV based image window is natively supported by the package. To enable window, Image Window output should be added into the output choices in .yaml config file. Refer to the config file guidance for more information about checking/adding this feature in your launching.

Demo Result Snapshots

Demo Snapshots For the snapshot of demo results, refer to the following picture.
  • Face detection input from standard camera face_detection_demo_image

  • Object detection input from realsense camera object_detection_demo_realsense

  • Object segmentation input from video object_segmentation_demo_video

  • Person reidentification input from standard camera person_reidentification_demo_video

Installation and Launching

Quick Start

Commands below are for the ros2_jazzy branch (Ubuntu 24.04). The full walkthrough, including prerequisites and troubleshooting, is in the getting started guide.

# 1. Get the sources, install OpenVINO from the Intel APT repository and the Python venv module for the model scripts
mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/intel/ros2_openvino_toolkit -b ros2_jazzy
sudo ./ros2_openvino_toolkit/script/packaging/setup_openvino_apt.sh
sudo apt install openvino-libraries-dev-2026.5.0 python3-venv

# 2. Build
cd ~/ros2_ws
source /opt/ros/jazzy/setup.bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
source install/setup.bash

# 3. Get the models and run a demo on a sample image
ros2 run openvino_node setup_models.sh
ros2 launch openvino_node pipeline_image.launch.py

Get the models

One command fetches the models: it downloads the pre-converted Intel models and converts or exports the others on your machine. Models that are already present are skipped, so it is safe to run again.

Command Result
ros2 run openvino_node setup_models.sh Core set: all pre-converted Intel models, SSD object detection, DeepLabv3 segmentation, YOLO26 detection
ros2 run openvino_node setup_models.sh --sample pipeline_segmentation Only the models of one sample (launch file or YAML name)
ros2 run openvino_node setup_models.sh --all Every model that the scripts provide, including all YOLO26 tasks
ros2 run openvino_node setup_models.sh --list The models of all samples and whether they are present

A launch file that misses a model prints the command that fetches it. Add fetch_models:=true to fetch the missing models before the launch starts:

ros2 launch openvino_node pipeline_segmentation.launch.py fetch_models:=true

The first conversion or export creates a Python environment, which takes a few minutes (about 2 GB for YOLO26). The individual scripts download_models.sh, export_yolo26.sh, export_ssdlite_mobilenet_v2.sh and export_deeplabv3.sh remain available for finer control, see --help of each script.

Choose the inference device

Every sample launch file accepts a device argument that overrides the engine: value of all models in the YAML file. Without it, the YAML values are used.

ros2 launch openvino_node pipeline_image.launch.py device:=GPU   # CPU, GPU, NPU, AUTO, ...

The device each model actually runs on is printed at startup (Engine created: requested device=GPU, executing on=GPU.0) and drawn on the output image next to the FPS (FPS is only shown for camera and video inputs). NPU is available on Intel Core Ultra processors.

With device:=NPU, models with a TopK post-processing (the end-to-end YOLO26 models and the semantic segmentation models) run TopK and the operations after it on the CPU, because the NPU compiler cannot compile them; the device is then reported as NPU,CPU.

Where models and data are located

What Location
Models $OPENVINO_TOOLKIT_DIR/models, else ~/.local/share/openvino_toolkit/models, else /opt/openvino_toolkit/models
Labels and sample images Installed with the package (share/openvino_node/data)

The YAML files use the placeholders <OPENVINO_NODE_SHARE> (the models location above) and <OPENVINO_DATA> (labels and images). The launch files resolve them at start-up with launch_helpers.py, so no path needs to be edited.

YOLO26 pipelines

Ultralytics YOLO26 models run in pipelines for object detection, instance segmentation, keypoint detection, oriented bounding boxes, classification, semantic segmentation and depth estimation. The models are exported on your machine by a script, which needs about 2 GB for a Python environment. They are licensed by Ultralytics under AGPL-3.0 and are not part of this repository.

ros2 run openvino_node setup_models.sh --sample pipeline_yolo26_detection --sample pipeline_yolo26_pose
ros2 launch openvino_node pipeline_yolo26_detection.launch.py
ros2 launch openvino_node pipeline_yolo26_pose.launch.py device:=GPU

See the YOLO26 tutorial for all tasks, topics and options.

SSD object detection pipelines

The ssdlite_mobilenet_v2 model of pipeline_object.launch.py and the other SSD samples is converted on your machine from the TensorFlow Object Detection API model with ovc. The pipeline reads the TensorFlow outputs of the converted model directly. With device:=NPU the backbone runs on the NPU and the TensorFlow post-processing (NMS) on the CPU, because the NPU cannot compile its dynamic shapes; the device is then reported as CPU,NPU.

ros2 run openvino_node setup_models.sh --sample pipeline_object
ros2 launch openvino_node pipeline_object.launch.py

DeepLabv3 semantic segmentation pipelines

The deeplabv3 model of pipeline_segmentation.launch.py and pipeline_video.launch.py is converted from the TensorFlow DeepLabv3 MobileNetV2 (Pascal VOC) model.

ros2 run openvino_node setup_models.sh --sample pipeline_segmentation
ros2 launch openvino_node pipeline_segmentation.launch.py

Deploy in Local Environment

Deploy in Docker

Install from Debian Packages

The toolkit can be packaged for ROS 2 Jazzy on Ubuntu 24.04 (amd64). The packages are built in a container, so Docker is the only build requirement.

Package Content
ros-jazzy-openvino-node Pipeline and service nodes, launch files, YAML configurations, labels, sample images, setup_models.sh and the individual model scripts it runs. Depends on all packages below.
ros-jazzy-openvino-wrapper-lib OpenVINO pipeline library and headers
ros-jazzy-openvino-param-lib YAML parameter library and headers
ros-jazzy-openvino-msgs Pipeline messages and services
ros-jazzy-object-msgs Object messages and services, built from the object_msgs copy in this repository
  • Build the packages. They are written to dist/.
make package
  • Install the packages on a system with ROS 2 Jazzy. OpenVINO 2026.5.0 is installed as a dependency from the Intel APT repository, which the first command enables.
sudo ./script/packaging/setup_openvino_apt.sh
sudo apt install ./dist/*.deb
source /opt/ros/jazzy/setup.bash
  • Each jazzy/<version> release on GitHub also provides the packages as ros-jazzy-openvino-toolkit_<version>_amd64.tar.gz. Extract the archive and install the .deb files in the same way.
  • The OpenVINO models are not part of the packages. Get them with ros2 run openvino_node setup_models.sh, see Get the models.
  • make test builds the workspace, downloads the models to .models/ and runs the unit tests in a container. Its colcon output goes to .colcon-docker/, separate from the build/, install/ and log/ of a local colcon build. Run make help for the other targets, for example make test-package, make build and make lint.

Test in a Container

make test-functional and make shell run the Debian packages in a ros:jazzy-ros-base container, so no local ROS 2 installation is needed. Both install the packages from dist/ (run make package first) and use the model cache .models/ of make test.

Target Purpose
make test-functional Runs the CI pipelines (sample/launch/*_ci_test.py) of the downloadable models on the sample images, and those of the YOLO26 models that are in .models/ (see the YOLO26 tutorial). A pipeline passes when it is created, reports no error and publishes on its topics. The OpenVINO device is CPU; select others with, for example, make test-functional DEVICE="CPU GPU NPU AUTO". JOBS pipelines run at once, each in its own ROS domain (default 4 on CPU, 1 on other devices).
make shell Opens a shell for manual tests. The X11 display, the GPU (/dev/dri) and the NPU (/dev/accel) of the host are passed to the container, and intel-opencl-icd and rqt_image_view are installed in addition (variable SHELL_PACKAGES).
make shell
# inside the container
ros2 run openvino_node setup_models.sh --sample pipeline_image
ros2 launch openvino_node pipeline_image.launch.py device:=CPU
  • With GPU or NPU in DEVICE, make test-functional installs the user-space drivers in the container with install_drivers.sh: the GPU compute runtime, the Level Zero loader and the Intel NPU driver release that match the Ubuntu release of the container. A device whose node (/dev/dri, /dev/accel) or driver is missing is reported and its pipelines are not run.

    Ubuntu (ROS 2) GPU runtime and Level Zero loader NPU driver
    22.04 (Humble) Intel graphics repository (repositories.intel.com/gpu) 1.26.0, the last release for 22.04; newer NPUs (Panther Lake and later) may need Ubuntu 24.04 or DRIVER_DEBS
    24.04 (Jazzy) Intel graphics PPA of Ubuntu (ppa:kobuk-team/intel-graphics) 1.39.1
    26.04 (Lyrical) Intel graphics PPA of Ubuntu (ppa:kobuk-team/intel-graphics) 1.39.1
  • make shell installs the intel-opencl-icd package of the distribution for GPU, which may not support recent GPUs; see the OpenVINO GPU configuration for newer drivers. Run /src/script/packaging/install_drivers.sh GPU NPU in the shell to install the same drivers as make test-functional.

  • To use other drivers, put their .deb files in a directory and pass it with DRIVER_DEBS. make test-functional then installs them instead of those of install_drivers.sh, for example make test-functional DEVICE=NPU DRIVER_DEBS=~/npu-driver.

  • To run the same pipelines against a local colcon build with the drivers of the host, source install/setup.bash and run SKIP_INSTALL=1 DEVICE="CPU GPU NPU AUTO" script/packaging/test_functional.sh.

Security Scans

Target Purpose
make bandit Scans the Python files with Bandit.
make trivy Scans the Docker image ros2_openvino_image (see the Docker instructions) with Trivy; select another image with SCAN_IMAGE=<image>. All HIGH and CRITICAL vulnerabilities are reported. The target fails on secrets and on vulnerabilities that have a fix.

Reference

  • Open_model_zoo: Refer to the OpenVINO document for open_model_zoo for detailed model structure and demo samples.
  • OpenVINO api 2.0: Refer to the OpenVINO document for OpenVINO_api_2.0 for latest api 2.0 transition guide.

FAQ

How to change logging level? This project provides two logging levels: *DEBUG* & *INFO*.
You may follow the steps to change logging level:
  • Update ./openvino_wrapper_lib/CMakeLists.txt by uncommenting (for DEBUG level) or commenting (for INFO level) this line:
    #add_definitions(-DLOG_LEVEL_DEBUG)
    
  • Rebuild project
    Refer to the corresponding quick-start documents to rebuild this project. e.g.:
    source /opt/ros/<ros-distro>/setup.bash
    colcon build --symlink-install
    
  • Launch OpenVINO Node
    You will see the logging is changed.

Feedback

  • Report questions, issues and suggestions, using: issue.

More Information

Any security issue should be reported using process at https://01.org/security.

Explorar proyectos relacionados

Cargando…