-
Notifications
You must be signed in to change notification settings - Fork 193
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 Communications for all language clients #251
Comments
I think that we can take some ideas from Connext "zero copy transfer over shared memory":
That's actually interprocess communication over shared memory, but something similar can be replicated using a buffer instead of a piece of shared memory. The basic idea is that you have to ask to the publisher for a new message, instead of allocating an msg = publisher->get_new_message();
if (msg != nullptr) {
msg->data = "asd";
publisher->publish(msg);
} Currently, message lifetime can be extended to be longer than the scope of the callback (in cpp). That would not be possible if we go ahead with something like this (or at least, it will be really hard to implement that feature). The implementation could live in |
@ivanpauno I don't think Maybe it could be set up so that we can I'm not seeing a way to make this happen in anything above Sorry for the rambles, very interested in this idea. |
just sharing my thought,
i believe that it is better to be implemented in rmw, not rcl.
|
Collecting some relevant parts of the previous discussion here for easier review, and to feed the design: Re: location of implementation @gbiggs wrote
Re: location of implementation @raghaprasad wrote
Re: smart-ptr messages @gbiggs wrote
Re: implementation @ivanpauno wrote
|
A question: do we want to have intra-process communication always optimized in ROS2, regardless of choice of RMW? If yes we want it always available, what about this idea?
Or, this is a possible outcome, should we just expect that intraprocess communications should be the job of the choice of RMW implementation, and just push development to add this to our RMW impl of choice, e.g. FastRTPS or CycloneDDS or wherever? |
The overhead described here is addressed by the proposal in #250 and isn't related to intra process communication. Even with intra process communication every node / participant has to perform discovery and comes with that overhead. |
I guess that it's possible to not return ever
I agree, specially with the first and last points.
👍 |
I initially posted this as an topic on answers.ros.org (see https://answers.ros.org/question/333180/ros2-micro-ros-intra-process/) but was advised by the moderator to move it to discourse... I think the core of my concern touches your discussion. (My context: ROS2 inside a machine controller) Looking at your proposals for intra-process communication, I fail to see whether you also take into account the multi-priority requirements such (often embedded) environments typically have. I currently see fragmented solution elements or approaches:
Is there any documented vision on how your intra-process-communication would co-exist with multi-priority queuing/handling? Johan |
I did, but this is not the embedded category on ROS Discourse. |
Any updates on this roughly a year later? |
Not that I know of. |
Hi @ivanpauno, is there any work on this problem, if not do you need help? Would love to dive into it. Cheers |
AFAIK, nobody is working on this right now. |
I'm not sure, but does the Cyclone+iceoryx combo do this automatically for C++ nodes in the same process? |
Not zero copy, zero-copy requires a different API. |
Description
This issue is a call for a design of zero-copy intra-process communications available to all ROS2 language clients.
The current implementation of this feature exists in
rclcpp
and therefore is not usable for Python (or less-supported languages C, Java, Rust, etc.)Acceptance Criteria
To close this issue, we want a design document that proposes the architecture for
rcl
)As a follow up, will attempt to collect existing thoughts from #239 and add as comments below.
Note
I do not consider myself personally an expert on this, however I'm very interested in collaborating towards a top down view of what this part of the ROS2 core should look like, and figuring out how the community can pull together towards a solution
The text was updated successfully, but these errors were encountered: