Code Monkey home page Code Monkey logo

ros2_shm_msgs's Introduction

ros2_shm_msgs

fou Chinese reader please refer 简体中文

Zero copy can save times of copy in IPC, thus reduces cpu usage and transport latency, which can be used in real-time-critical systems or resource-constrained computing platforms.

This package provides many ros2 message definitions that have a good support to true zero copy transportation in IPC(in a single machine) context.

Currently tested in ros2 galactic with cyclonedds+iceoryx dds layer.

todolist

pointcloud and image are currently supported.

feature Status
pointcloud8k ✔️
pointcloud256k ❌ (coming)
pointcloud1m ❌ (coming)
pointcloud2m ❌ (coming)
pointcloud4m ❌ (coming)
pointcloud8m ❌ (coming)
image8k
image256k
image512k
image1m
image2m
image4m
image8m
pointcloud-rviz bridge ❌ (comming)
image-rviz bridge ❌ (comming)

examples

# t1
iox-roudi

# t2
cd ./install/shm_msgs/lib/shm_msgs/
./pc_talker

# t3
cd ./install/shm_msgs/lib/shm_msgs/
./pc_listener

software components

this package includes ros2 msg definitions and demos that supports the msgs.

  • shm_msgs::msg::PointCloud8k
  • PointCloud2Modifier8k
  • open3d_conversions
  • pcl_conversions
  • vision_opencv
  • rviz-bridge

true zero copy

Zero_copy is a transport layer to get a better performance especially when payload size exceeds 64k.

Please refer Using_Zero_Copy_In_ROS2.pdf for more info of concept of z copy.

In short, zero copy needs api support through all transport layers. See doc from cyclonedds and doc from rmw_cyclonedds for details

  • fixed-length msg from user-space(enable z copy)
  • rclcpp z_copy api(enable z copy)
  • rmw z copy api(serialization support)
  • dds qos support(iceoryx policy alignment)
  • dds z_copy api(iceoryx api)

This package provides fixed-length ros2 msg definitions, helper functions and demos to support true z copy.

minimum copy

Without fixed-length msg, a serialization is needed before IPC, so copy can not be avoided.

But time of copy can still be reduced comparing to Loopback Network Communication(such as udp multicast), which is the default transport layer in most cases of dds.

Performance can still be improved with minimum copy.

The eCAL by Continental provides iceoryx transport layer to get true zero copy, but extra cmake based compilation is needed.

refer The performance of eCAL, and Enable ECAL_LAYER_ICEORYX for more details.

eCAL also provides default shm based transport layer to get minimum copy performance, see this issue for details.

Cyclonedds and eCAL both use iceoryx as the z copy transport layer.

Iceoryx alos provide direct access to rmw, see rmw_iceoryx for details.

discussions

Comments have been given from iceoryx and ros2 community.

Feel free to create issues in the repo.

acknowledgement

Iceoryx Apex.AI CycloneDDS eCAL

ros2_shm_msgs's People

Contributors

zhenshenglee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.