- Model inference API which supports three model formats:
.tflite.so.bin
- Model inference acceleration based on Qualcomm platforms.
Pipeline flow for qrb_ros_nn_inference
The following figure shows how a preprocess node feeds an input tensor to qrb_ros_nn_inference, which publishes the output tensor to a postprocess node.
Figure : qrb_ros_nn_inference pipeline
ROS topics used in the qrb_ros_nn_inference pipeline
The following table lists the ROS topics in the pipeline, their message types, and the node that publishes or subscribes to each one.
| ROS topic | Message type | Published/Subscribed by | Description |
|---|---|---|---|
/qrb_inference_input_tensor | qrb_ros_tensor_list_msgs::msg::TensorList | Subscribed by qrb_ros_nn_inference | Subscribes to the input tensor for model inference. |
/qrb_inference_output_tensor | qrb_ros_tensor_list_msgs::msg::TensorList | Published by qrb_ros_nn_inference | Publishes the output tensor of model. |
ROS node parameters used in the qrb_ros_nn_inference pipeline
The following table lists the node parameters, their types, and their default values.
| Node parameter | Type | Default value | Description |
|---|---|---|---|
backend_option | string | "" | Hardware acceleration option for model inference. For valid values, see qrb_ros_nn_inference documentation. |
model_path | string | "" | Indicates the path of the model file. |
Prerequisites
- You have Set up the device according to Set up the environment for running sample applications.
- On a
qcom-robotics-imagedevice (Overlay Config #1), ensure that you have installed the Qualcomm AI Engine Direct SDK (qairt-sdk) and theqrb-ros-nn-inferencepackage. For instructions, see Enable and evaluate Qualcomm Linux overlays on QIR SDK. On aqcom-robotics-proprietary-imagedevice (Overlay Config #2), the package is already installed. - You have downloaded the model from Qualcomm AI hub.
- You have prepared the preprocess node and postprocess node according to the qrb_ros_nn_inference example.
Run out-of-the-box qrb_ros_nn_inference
Try me
Try me
1
Set up QIR SDK and ROS2 environment on the device
Start one terminal, and run the following commands.Value range of
ROS_DOMAIN_ID: [0, 232]SSH Session
2
Launch the nodes
Launch three nodes: preprocess node,
qrb_ros_nn_inference node and postprocess node.SSH Session
Build and run qrb_ros_nn_inference
Try me
Try me
1
Build qrb_ros_nn_inference on the host
2
Push qrb_ros_nn_inference to the device
NoteEnsure that the QIR SDK is installed on the device.
SSH Session
3
Set up QIR SDK and ROS2 environment on the device
Start one terminal, and run the following commands.Value range of
ROS_DOMAIN_ID: [0, 232]SSH Session
4
Launch the nodes
Launch three nodes: preprocess node,
qrb_ros_nn_inference node and postprocess node.SSH Session

