Skip to main content
The qrb_ros_camera is a ROS package that publishes the images from Qualcomm CSI and GMSL cameras. It provides the following:
  • Support for concurrent multiple streams output.
  • Support for composable ROS node.
  • Zero-copy transport powered by QRB ROS Transport.
  • Support for NV12 only as output format, limited by the Camera Service.

Pipeline flow for qrb_ros_camera

The following figure shows the pipeline flow for qrb_ros_camera.
Camera hardware and a camera info YAML file feeding the qrb_ros_camera ROS node through the camera server, which publishes two output topics.

qrb_ros_camera pipeline.

The qrb_ros_camera is a ROS 2 package. It creates an image publisher with qrb_ros_transport for zero-copy transport. It supports node composition, making it possible to improve performance using ROS intra-process communication. The qrb_camera is a C++ library. It provides APIs to qrb_ros_camera for querying images from the lower layer Camera Service and CamX libraries. It includes 2 modules:
  • The camera_manager module manages the camera stream, which enables the multi-stream support.
  • The camera_client module calls Camera Service APIs to manage camera streams.
The qrb_ros_transport is a ROS 2 package that supports zero-copy image transport with Linux DMA buffer and implements ROS type adaption. It’s compatible with both intraprocessing and interprocessing communication. The Camera Service is a Qualcomm multimedia framework. It exports APIs for accessing Qualcomm multimedia hardware. The CamX provides the foundation for image capture, processing, and management on Qualcomm-powered devices.

qrb_ros_camera ROS interfaces and parameters

The qrb_ros_camera node exposes ROS interfaces and ROS parameters. Use them to subscribe to the published image topics and to configure the camera streams.

ROS interfaces

The following table describes the ROS interfaces provided by qrb_ros_camera.

ROS parameters

The following table describes the ROS parameters for qrb_ros_camera.

qrb_ros_camera library APIs

The following table describes the qrb_camera C++ library functions that qrb_ros_camera calls.

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_camera

1

Install the qrb_ros_camera packages

Install the packages
2

Use the camera node

Launch the camera node
3

Check ROS topics or view the image with the topic /cam${camera_id}_${stream_name} in RVIZ or RQT

4

Enable multiple streams

By using the stream_size and stream_name parameters, you can configure multiple streams for one camera in your launch file, such as /opt/ros/jazzy/share/qrb_ros_camera/launch/qrb_ros_camera_launch.py.
qrb_ros_camera_launch.py
5

Enable the zero-copy transport

The qrb_ros_camera supports directly sharing image dmabuf_fd between nodes, which can avoid image data memory copy with DDS.
For details about this feature, see ROS documentation.
Following is an example that uses launch (recommended) to compose multiple nodes.

Build and run qrb_ros_camera

1

Install dependencies

Install the dependencies
2

Clone the repository to the device

Download the source code
3

Build and run qrb_ros_camera

Build and launch