Closed Aerotic closed 3 years ago
Before the IntraProcessManager
were created, there was a proper meta-message being sent through the DDS with some info needed to retreive the intra-process message. The CPU performances were good for really big messages, but when small messages were used (10b) the need for a meta-message resulted in poor performances, because sending a message through the DDS is not cheap.
Now everything is handled by the IntraProcessManager
, no message is sent through the DDS.
But, there's still some DDS activity. The publisher publishes an intra-process message an triggers the subscription DDS guard condition. This happens and goes through the DDS, so the DDS is not really bypassed when using intra-process.
But, there's still some DDS activity. The publisher publishes an intra-process message an triggers the subscription DDS guard condition. This happens and goes through the DDS, so the DDS is not really bypassed when using intra-process.
Sorry, I've found something different from the above statement. At src/ros2/rmw_fastrtps/rmw_fastrtps_shared_cpp/src/types/guard_condition.hpp:46
, it seems that what the guard condition triggering process mainly does is conditionVariable_->notify_one()
. So this may be not doing with DDS like eProsima FastRTPS
Yes, you're correct. Is the RMW guard condition, not DDS. What I meant was that there is some RMW specific work after all, not all communication stays in rclcpp. The goal with IPC (rclcpp, not DDS) was totally by-pass the specific RMW's for passing messages.
Since this is a question, and there is no further activity, I'm going to close this out.
According to the following text fromhttps://github.com/ros2/design/blob/gh-pages/articles/intraprocess_communication.md:
It seems meaning that when using intra-process communication, a meta-message must be sent to
IntraProcessManager
every publish via FastRTPS(or another DDS middleware). But I didn't detect any activity of DDS after initialization phase. Besides, I find that the arguments likepublisher_id
transfered among functions may be the so calledmeta-message
.In addition, the following description seems to disaccord the code (/src/ros2/rclcpp/rclcpp/include/rclcpp/experimental/subscription_intra_process.hpp), There is an instance of
BufferUniquePtr
inSubscriptionIntraProcess
and I thinkBufferUniquePtr
is the "ring buffer".