Skip to main content
The qrb_ros_nn_inference package provides AI-based perception for robotics applications. It provides the following:
  • Model inference API which supports three model formats: .tflite, .so, .bin
  • Model inference acceleration based on Qualcomm platforms

Architecture of qrb_ros_nn_inference

The following figure shows the architecture of qrb_ros_nn_interface.
Layered stack: application, qrb_ros_nn_inference node, QrbInferenceManager, QNN and TFLite SDKs, running on CPU, GPU, and Hexagon Tensor Processor.

Architecture of qrb_ros_nn_inference.

qrb_ros_nn_inference is a ROS2 package based on qrb_inference_manager, which is a C++ library encapsulating the APIs of Qualcomm AI Engine Direct and Qualcomm Neural Network (QNN) Delegate for TensorFlow Lite. qrb_ros_nn_inference receives data from a specific topic, then without any processing, directly uses the received data for model inference. Then, the results of the model inference are sent out directly through another specific topic.

ROS node parameters

The following table describes the ROS node parameters for qrb_ros_nn_inference.

ROS topics

The following table describes the ROS topics used by qrb_ros_nn_inference.

Prerequisites

You have set up the device, installed ROS2 Jazzy and Qualcomm Intelligent Robotics (QIR) SDK on the device according to Install the QIR SDK.

Run out-of-the-box qrb_ros_nn_inference

1

Install the qrb_ros_transport packages

Install the packages
2

Prepare the preprocess node and postprocess node for model inference

Download the test nodes
3

Test qrb_ros_nn_inference with the YOLOv8 detection model

a. Download the yolov8.tflite model by following QC AI hub Getting Started.b. Download the test image for object detection.
c. Point out the raw image path and model path in ~/ros-ws/src/qrb_ros_nn_inference/test/qrb_ros_post_process/launch/nn_node_test.launch.py.
nn_node_test.launch.py
d. Build the preprocess node and postprocess node.
Build and run the inference
The output result image is in ~/ros-ws/src/qrb_ros_nn_inference/test/qrb_ros_post_process/inference_result.

Build and run qrb_ros_nn_inference

1

Install dependencies

Install the dependencies
2

Clone the repository to the device

Download the source code
3

Build and run qrb_ros_nn_inference

Build and launch