-
Notifications
You must be signed in to change notification settings - Fork 340
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
intra_process: message frequency lower than expected, zero-copy? #399
Comments
After some digging I found that the IntraProcessManager only provides the original unique_ptr to the last subscription and copies the message for the others: https://github.com/ros2/rclcpp/blob/master/rclcpp/include/rclcpp/experimental/intra_process_manager.hpp#L402-L412 In both cases, the message is delivered in-process, but only the last is not a copy. Perhaps @wjwwood has a suggestion about whether there is anything that can be done to allow all subscribers to receive the original message without a copy. |
You would have to subscribe with a const reference. If more than one thing subscribes with |
Also, this issue is really old, and using Dashing, so consider that. I don't have an explanation for the latency, but I also haven't tried it with rolling or foxy. |
@EgalYue This is very old now. Would you mind retrying on the latest Foxy or Galactic to see if you still have the same problem? |
No response in a very long time, so I'm going to close this out. Feel free to reopen if you are still having problems. |
Hi,
I'm not sure, whether this problem is related to #289 or ros2/rclcpp#504 (comment). If it is,then I apologize and please just close this issue.
Bug report
Required Info:
Steps to reproduce issue
Using Intra_process communication:
One node published Pointcloud message(The size of Pointcloud is only 430KB,) with the frequency of 10Hz.
One node acted as subscriber and subscribed the topic.
Expected behavior
The subscriber should receive 10 messages per second. The frequency of this topic should be 10Hz.
Actual behavior
There had big latency(5-6 messages per second). The frequency of this topic was much lower than 10Hz.
Additional information
So I made further test, I just modified
two_node_pipeline
demo, read 1MB data from a txt file and publish this 1MB message(std_msgs::msg::String) .I found that:
unique_ptr
is not same, only one of the subscriber is same as publisher.Code
Terminal screenshot
The text was updated successfully, but these errors were encountered: