micro-ROS / micro-ROS-demos

Sample code using rclc and rclcpp implementations.
Apache License 2.0
84 stars 24 forks source link

[FEA] add intra-mcu communication example. #57

Closed ZhenshengLee closed 2 years ago

ZhenshengLee commented 2 years ago

As microxrcedds is a agent-based dds, every node inside/outside mcu will need to exchange info with each other through the agent.

Besides the agent-less solution of embeddedRTPS, there is a PR that can help to do intra-mcu communication, and an example is needed.

Thanks.

Hi @eden-desta! So, @pablogs9 has been working hard on a new Shared Memory feature, about which you can read in this PR. The implementation is complete and only pending to be merged. Basically, now the same Client with two entities matching internally can be aware of it and proceed with the communication without the Agent having to mediate it.

It would be great if you could test it and give us some feedback, also regarding whether this feature addresses your use-case. We are excited to know what you guys think of it! Hopefully, it fits your needs!

Originally posted by @FranFin in https://github.com/micro-ROS/micro-ROS-Agent/issues/37#issuecomment-823969052

EDIT: Glad to see it an offically supported feature. https://micro.ros.org/docs/overview/ROS_2_feature_comparison/ image

eden-desta commented 2 years ago

This is awesome! I will definitely give it a test! Thank you all for your efforts!

Acuadros95 commented 2 years ago

This feature can be enabled on compilation time with the Micro-XRCE-DDS middleware UCLIENT_PROFILE_SHARED_MEMORY flag: detail.

Then you can just create a set of pub/sub or service server/client on the same topic and they will communicate internally.

At this moment there is not a tutorial specific doc about this feature, but that may change soon. Stay tuned!