InformationWhy do you need to use the QIR SDK to develop a pipeline application?The normal development process requires extensive camera development experience and solid hardware knowledge to write camera-related code and handle image format conversion, while using the QIR SDK saves time and efforts.The following is a comparison between the normal development flow (without QIR SDK) and that uses the QIR SDK.
- Using QIR SDK: Write a launch file to combine the existing nodes into a pipeline.
- Without QIR SDK: Write camera-related code or handle image format conversion by yourselves.
Pipeline application workflow
To write a pipeline application, you need to follow these workflow:- Define the objective of your application.
- Check available APIs provided by the QIR SDK.
- Decide the pipeline.
Define the objective
Develop a sample that captures images from the device’s built-in camera and publishes them in RGB888 format to a ROS 2 topic.Check the APIs
- Check the APIs the QIR SDK offers, see QIR SDK API list. A first check finds that qrb_ros_camera is able to capture data from the device’s built-in camera and publish it to the
/cam0_stream1topic. However, this topic uses NV12 encoding format by default, while the application requires the RGB888 format. - Analyze other APIs that may be useful. As qrb_ros_camera doesn’t output the image in the format as needed, a further check finds the following matching ROS node: qrb_ros_colorspace_convert is able to convert image encoding from NV12 to RGB888.
- Locate the key points for the implementation.
qrb_ros_camerapublishes to the/cam0_stream1topic, but the input forqrb_ros_colorspace_convertis/image_raw. Therefore, the example application needs to handle this conflict with additional processing.
Decide the pipeline
The following information analyzes the pipeline application requirements in detail as an example solution. Pipeline flow This example uses the following pipeline flow based on the analysis:- Capture images from qrb_ros_camera and publish them to the
/cam0_stream1topic. - Convert the images from NV12 to RGB888 format using qrb_ros_colorspace_convert and publish the RGB888 format images to the
/imagetopic.
Example implementation
The following steps guide you through using the QIR SDK to write the pipeline based on the example solution and run it on the device, using the Qualcomm Dragonwing™ IQ-9075 Evaluation Kit (see Get started with QIR SDK) as an example.Set up the cross-compile environment
On the host computer, go to the artifacts directory and decompress the QIR SDK package:NoteThe QIR SDK supports developing a pipeline application on these development kits for Qualcomm Linux:
Import the sample project
This example uses the template project provided in the QIR SDK package to develop the pipeline. This template helps you quickly create a Python-based ROS 2 package.NoteAlternatively, you can create a package on your IQ-9075 device with
ros2 pkg create --build-type ament_python --license Apache-2.0 <pkg-name> --dependencies [deps], and then push it to the host with the QIR SDK installed in the environment.Customize the launch file
Write the launch file-
Create the launch file that implements the following steps. This example uses two nodes
qrb_ros_cameraandqrb_ros_colorspace_convert. It remaps the/cam0_stream1topic ofqrb_ros_camerato the/image_rawtopic, and then usesqrb_ros_colorspace_convertto publish the RGB888 format images to the/imagetopic.NoteFor information about how to write a launch file, see ROS 2 documentation — Creating a launch file.rgb8_image_publisher_launch.py
-
Update the
setup.pyfile.setup.py
Build and deploy
You can now compile the package and deploy it to the device.Try me
Try me
1
Build the workspace
2
Package and push the application to the device
3
Install the application on the device
SSH Session
4
Run the application
SSH Session
5
Verify the output
SSH Session
ros2 launch command and see the camera data being converted to RGB888 format and published to the /image topic.
Next steps
To build more advanced applications:- Use additional QIR APIs such as sensor data streams, diagnostics, or control interfaces.
- Combine multiple modules to create hybrid applications (for example, autonomous navigation + health monitoring).
- Learn how to use the QIR SDK to develop AI pipeline applications. See QIR SDK sample applications.
- Check QIR SDK API list for a full list of available APIs.

