QRB ROS Transport is designed for hardware-acceleration friendly transporting of messages on Qualcomm robotics platforms. It uses type adaption to make message data zero-copy between different ROS nodes, and different hardwares. It includes adapted types for Qualcomm robotics platforms.
Type Adaptation Feature (REP 2007) has enabled on ROS 2 Humble. This interface will allow us to define methods for serializing directly to the user requested type, and/or using that type in intra-process communication without ever converting it.
qrb_ros_transport is based on lib_mem_dmabuf, it is open sourced and apply to all platforms based on Linux.
- Linux kernel version 5.12 and later, for kernel dma-buf support.
- ROS 2 Humble and later, for type adaption support.
Setup QCLINUX SDK environments:
- Reference QRB ROS Documents: Getting Started
Create workspace in QCLINUX SDK environment and clone source code
mkdir -p <qirp_decompressed_workspace>/qirp-sdk/ros_ws
cd <qirp_decompressed_workspace>/qirp-sdk/ros_ws
git clone https://github.com/quic-qrb-ros/lib_mem_dmabuf.git
git clone https://github.com/quic-qrb-ros/qrb_ros_imu.git
git clone https://github.com/quic-qrb-ros/qrb_ros_transport.git
Build source code with QCLINUX SDK
export AMENT_PREFIX_PATH="${OECORE_TARGET_SYSROOT}/usr;${OECORE_NATIVE_SYSROOT}/usr"
export PYTHONPATH=${PYTHONPATH}:${OECORE_TARGET_SYSROOT}/usr/lib/python3.10/site-packages
colcon build --merge-install --cmake-args \
-DPython3_ROOT_DIR=${OECORE_TARGET_SYSROOT}/usr \
-DPython3_NumPy_INCLUDE_DIR=${OECORE_TARGET_SYSROOT}/usr/lib/python3.10/site-packages/numpy/core/include \
-DPYTHON_SOABI=cpython-310-aarch64-linux-gnu -DCMAKE_STAGING_PREFIX=$(pwd)/install \
-DCMAKE_PREFIX_PATH=$(pwd)/install/share \
-DBUILD_TESTING=OFF
Add dependencies in your package.xml
<depend>qrb_ros_transport_image_type</depend>
Use ament_cmake_auto to find dependencies in your CMakeLists.txt
find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
Using adapted types in your ROS node
#include "qrb_ros_transport_image_type/image.hpp"
// create message
auto msg = std::make_unique<qrb_ros::transport::type::Image>();
msg->header = std_msgs::msg::Header();
msg->width = width;
msg->height = height;
msg->encoding = "nv12";
// alloc dmabuf for message
auto dmabuf = lib_mem_dmabuf::DmaBuffer::alloc(size, "/dev/dma_heap/system");
// ... set data to dmabuf
msg->dmabuf = dmabuf;
// publish message
pub->publish(std::move(msg));
The following table lists current supported types:
QRB ROS Transport Type | ROS Interface |
---|---|
qrb_ros::transport::type::Image | sensor_msgs::msg::Image |
qrb_ros::transport::type::Imu | sensor_msgs::msg::Imu |
This package is designed and tested to be compatible with ROS 2 Humble running on Qualcomm RB3 gen2.
Hardware | Software |
---|---|
Qualcomm RB3 gen2 | LE.QCROBOTICS.1.0 |
We would love to have you as a part of the QRB ROS community. Whether you are helping us fix bugs, proposing new features, improving our documentation, or spreading the word, please refer to our contribution guidelines and code of conduct.
- Bug report: If you see an error message or encounter failures, please create a bug report
- Feature Request: If you have an idea or if there is a capability that is missing and would make development easier and more robust, please submit a feature request
- Peng Wang - Maintainer - penww
See also the list of contributors who participated in this project.
Project is licensed under the BSD-3-clause License. See LICENSE for the full license text.