ros2 / rmw_zenoh

RMW for ROS 2 using Zenoh as the middleware
Apache License 2.0
142 stars 29 forks source link

Is shm used in nodes connected in the same SOC #199

Closed sgf201 closed 1 week ago

sgf201 commented 3 weeks ago

As I see,zenoh can use shm for msg ,Is shm used in rmw_zenoh?

Yadunund commented 3 weeks ago

Preliminary efforts were made to support SHM but certain memory leaks were discovered. Hence, SHM is disabled by default in the session config.

sgf201 commented 3 weeks ago

as I see, loan api of ros2 is UNSUPPORTED now, will it supported with shm in roadmap?

ruffsl commented 3 weeks ago

Hence, SHM is disabled by default

@Yadunund , is there some context for that. From git blame of that config line, is this perhaps all of it?

Yadunund commented 3 weeks ago

Hence, SHM is disabled by default

@Yadunund , is there some context for that. From git blame of that config line, is this perhaps all of it?

It's an issue in the Zenoh implementation. See https://github.com/eclipse-zenoh/zenoh/issues/406.

My understanding is that Zettascale is working on a true-zero-copy alternative so we're likely going to wait for that to land and update our SHM implementation accordingly.

JEnoch commented 3 weeks ago

That's right, a new shared memory will be available very soon with Zenoh 1.0.0. The development in Rust is already completed, and the C API has been merged to the dev/1.0.0 branch last week: https://github.com/eclipse-zenoh/zenoh-c/pull/405

kikuyuta commented 3 weeks ago

That's a great news! According to my understanding, currently we can use zenoh-pico for poor capability chips e.g. ESP32. Will zenoh 1.0.0, the Rust version with shared memory functionality, work on such poor chips? Or will zenoh-pico also have SHM functionality?

JEnoch commented 3 weeks ago

There is no plan for a Zenoh Rust for constrained devices, neither for SHM in zenoh-pico. But the Zenoh team is always eager to learn about new use cases and to get suggestions of new features. 😃 Please, feel free to open a discussion here: https://github.com/eclipse-zenoh/roadmap/discussions/categories/ideas-and-new-features

kikuyuta commented 3 weeks ago

@JEnoch Thank you for your reply. Okay I will open a new discussion there, but later, because it is past midnight in Japan.

sgf201 commented 3 weeks ago

as I see, loan api of ros2 is UNSUPPORTED now, will it supported with shm in roadmap?

can you give me a bref info about this? @JEnoch