============== |package_name| ============== dmabuf_transport is a package for zero-copy transport ROS message with Linux dma-buf file descriptor. Overview -------- `Dmabuf Transport `__ provides a way to share data between different hardware accelerators and different ROS nodes with zero-copy. It is built on ROS 2 `Type Adaption `__. It allows 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. QuickStart ---------- 1. Add dependency in package.xml .. code:: xml dmabuf_transport 2. Add dependency in CMakeLists.txt .. code:: cmake find_package(dmabuf_transport REQUIRED) ament_target_dependencies(${PROJECT_NAME} # ... dmabuf_transport ) 3. Zero-copy transport dmabuf_transport types .. code:: cpp #include "dmabuf_transport/type/image.hpp" // create message auto msg = std::make_unique(); msg->header = std_msgs::msg::Header(); // save message data to dmabuf auto dmabuf = lib_mem_dmabuf::DmaBuffer::alloc(1024, "/dev/dma_heap/system"); // ... set data msg->dmabuf = dmabuf; // publish message pub_->publish(std::move(msg)); - Check `test `__ directory to find more details. Supported Types --------------- The following table lists current supported types: .. list-table:: :header-rows: 1 * - Dmabuf Transport Type - ROS Interface * - `dmabuf_transport::type::Image `__ - `sensor_msgs::msg::Image `__ * - `dmabuf_transport::type::PointCloud2 `__ - `sensor_msgs::msg::PointCloud2 `__ .. |package_name| replace:: ``dmabuf_transport``