-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zero-copy point cloud subscriber in ROS2 #2353
Comments
Hi @ravijo Another way to interpret that statement would be that copy times are not reduced for pointclouds. |
Sorry for the confusion. Does that mean intra-process communication isn't helpful in the case of point cloud??? How to achieve zero-copy communication for point clouds then? |
That would be my interpretation that zero-copy would not be useful for pointclouds. Someone in the link below wrote a ROS2 module that was tested with ROS2 Galactic that supports pointclouds with zero-copy, though I cannot guarantee how well it will work with the RealSense ROS2 wrapper. |
I see. It is using shared memory architecture underneath. Thank you for the link. |
Hi @ravijo Do you require further assistance with this case, please? Thanks! |
@MartyG-RealSense: I am not dealing with it at prersent. So it is better to close this issue. Thanks for the kind support. |
You are very welcome. Thanks very much for the update! |
Hi, this lib https://github.com/ZhenshengLee/ros2_shm_msgs has been used in the custom version of ros2_v4l2_camera see https://github.com/ZhenshengLee/ros2_v4l2_camera if you need any help to merge this module into the RealSense ROS2 , feel free to ping me. |
Thanks so much @ZhenshengLee for sharing this with the RealSense ROS community! |
Hello @MartyG-RealSense, I am using ROS2 Realsense Wrapper (Humble, https://github.com/IntelRealSense/realsense-ros/tree/ros2-development). As you mentioned the link https://github.com/ZhenshengLee/ros2_shm_msgs above (introduced by @ZhenshengLee ). I have made a comparison between ROS2 Realsense Wrapper (Humble) and ros2_shm_msgs (Humble) regarding to the topic frequency and CPU consumption. I have found that the performance of ROS2 Realsense Wrapper (Humble) and ros2_shm_msgs are almost same when publishing the pointcloud. I just wonder whether some modules in ros2_shm_msgs are merged into Realsense ROS2 or not? Or Type adaption is considered in ROS2 Realsense Wrapper (Humble) or not? I guess IT'S NOT since I could not found the related contents in the Wrapper source code. Can you please confirm this information? |
No, nothing has been merged.
It's unknown for me, because I didn't track this feature. |
@toan70411hd91 |
@ZhenshengLee thank you so much for your information and quick helps. May I ask you some questions related to ros2_shm_msgs?
Even I did not use https://github.com/IntelRealSense/realsense-ros#efficient-intra-process-communication, the performance of ROS2 Realsense Wrapper (regarding to speed and CPU consumption) is almost same with ros2_shm-msgs. I am not sure the hints inside since i am quite new in this topic. Maybe, my tested point-cloud data is small (camera resolution 640x480, with decimation filter). |
@toan70411hd91 please post this issue in https://github.com/ZhenshengLee/ros2_shm_msgs I will find time to answer this. Thanks! |
@ZhenshengLee Thank you so much for your active and quick helps. I posted this issue in https://github.com/ZhenshengLee/ros2_shm_msgs |
anyone interested would follow this |
The components in ROS2 provide Zero-copy communication. Luckily, the realsense package comes with this option.
Quoting the following from Efficient intra-process communication section:
Does it mean that point clouds are not supported for zero-copy if loaded in the same process as a subscriber node?
The text was updated successfully, but these errors were encountered: