Upgrade to Pro — share decks privately, control downloads, hide ads and more …

On the way to achieve autonomous node communica...

takasehideki
November 03, 2022

On the way to achieve autonomous node communication in the Elixir ecosystem

Code BEAM America 2022
2022/11/03
https://codebeamamerica.com/archives/CBA_2023/index.html
YouTube: https://www.youtube.com/watch?v=Y4IASAU4Bjo

Speaker: Hideki Takase
Abstract:
Have you ever felt that finding communication nodes by specifying information such as IP addresses is complicated?
RTPS (Real-Time Publish Subscribe) is a communication protocol. The main advantage is that nodes can acquire autonomy in communication. Without setting up any broker, a node can automatically discover communication partners for publication/subscription only by specifying a topic. Note that the use of RTPS is restricted to the area under the NAT server.
We are working on R&D about “Rclex,” a client library for ROS 2 platform. This library has directly integrated the feature of RTPS into Elixir.
This talk will consider how to bring the power of Rclex into Nerves devices. To find out the current status of Rclex, we will provide a way to realize this purpose. In addition, we will share our latest R&D activity to enable RTPS communication in Elixir/Nerves beyond the NAT server. Once achieved, we can apply RTPS to the wide-area distributed system.

Audience: Advanced
Tags: communication, protocol, IoT

demo on pp.19-20 (pre-recorded)
https://twitter.com/takasehideki/status/1588521053311365121

takasehideki

November 03, 2022
Tweet

More Decks by takasehideki

Other Decks in Technology

Transcript

  1. On the way to achieve autonomous node communication in the

    Elixir ecosystem 2022/11/03 Presenter: Hideki Takase (Univ. of Tokyo) Collaborators/Contributors: Shintaro Hosoai (Univ. of Tokyo) Ryota Kinukawa (Tombo Works) Shunsuke Kikuchi (SAKURA internet, Inc.)
  2. Hobby Recent R&D Affiliation Mission @takasehideki ശ ఉ ϩʔΧϧ؀ڥ ηϯγϯά

    ̇ ̇ ̇ ө૾ Ի Թ౓ ࣪౓ ѹྗ ৼಈ Edge AI ޯ഑ܭࢉɾߋ৽ -PTT 8FJHIU ਪ࿦ ੍ޚ ΢ΣΞϥϒϧ σόΠεɾ ϔϧεέΞ ϩϘοτ ϞϏϦςΟ ೖྗ ग़ྗ ϑΟʔυ όοΫ Edge AI Edge AI Edge AI Edge AI Fog AI ू໿ ෼഑ ϩʔΧϧ؀ڥ Fog AI Edge AI Edge AI ϩʔΧϧ؀ڥ Fog AI Edge AI Edge AI Cloud MEC BEAM クラウド BEAM エッジ BEAM 最適配分アルゴリズム 透過型分散プラットフォーム BEAM システム開発者 デプロイされる コード ① ③ ② ③ ③ ❤ 評価アプリ ❤ 評価アプリ ④ ④ ❤ 評価アプリ ④ ② ② ❤ 評価アプリ ④ ② ② ② ② a design infrastructure that connects all Things and Human Optimization Methodology Toward a world where anyone can easily create awesome products Cutting-Edge Platform and Design Methodology for embedded/IoT Computing
  3. 3 What are we trying to do? network address space

    A global IP: 133.11.194.2 nodeA2 192.168.10.5 nodeA1 192.168.10.20 nodeA3 192.168.10.?? network address space B global IP: 23.185.0.4 nodeB1 192.168.5.8 nodeB3 192.168.5.?? Node.connect( :”[email protected]”) Node.connect( :”[email protected]”) specifying IP address is essential :( 1. want to connect w/o IP address! can connect with global IP address 2. want to connect as lightly as possible! (and beyond NAPT) 3. What we ultimately want to do: autonomous node communication between different networks!! nodeB0 23.185.0.4 192.168.5.1
  4. 4 Our Solution!! autonomous node comm. feature powered by DDS/RTPS

    ROS 2 client library for Elixir A Library for Robotics meet Elixir 2021/11/05 Hideki Takase (Univ. of Tokyo / JST PRESTO) https://www.slideshare.net/takasehideki /rclex-a-library-for-robotics-meet-elixir https://youtu.be/9B5lQ3kQ_wI awesome IoT platform by Elixir eloquent, scalable and fast protocol
  5. github.com/rclex 6 (Robot Operating System) 1. Plumbing: pub/sub messaging infrastructure

    2. Tools: configuring, debugging, visualizing, etc. 3. Capabilities: a broad collection of libraries 4. Ecosystem: worldwide powerful OSS community Platform for accelerating development of robot software http://www.ros.org
  6. 7 • Asynchronous comm. between nodes via topics —ROS application

    can be developed by combining nodes —Easy to construct loosely coupled architecture —Pub/Sub nodes can be added/deleted/restarted independently • Other methods — Service: sync. server-client — Action: combo of topic/service — Parameter: key-value store Plumbing node1 node2 node3 node4 topicA [String] topicB [Image] node5 publish subscribe DDS Domain msg msg msg msg github.com/rclex
  7. network space 8 node1 pub node3 sub node4 sub •

    DDS: Data Distribution Service — comm. middleware for ROS 2 • RTPS: Real Time Publish Subscribe — SPDP: Simple Participant Discovery Protocol autonomously searches comm. partners — SEDP: Simple Endpoint Discovery Protocol autonomously establishes comm. paths — No broker or agent is required! — Only topic name & message type are required to specify comm. nodes ü Limitations :( Ø Native Linux (Ubuntu) is generally required Ø Nodes must be on the same network Dive into DDS/RTPS node5 sub node2 pub topicA [String] topicB [Image] github.com/rclex
  8. 9 Simple Publisher by Rclex github.com/rclex number of nodes create

    node by name and index create topic :single-> one topic :multi-> multiple set callback func and timer interval create list of messages for each node publish message setting node info. with pipe operator processing a data message with Enum
  9. 11 Step2: Rclex on Nerves bare minimum and bulletproof runtime

    platform autonomous node communication within the network
  10. ナーブスはナウでヤングでcoolなすごいやつです。 “Nerves is awesome!! because it is now, young and

    cool!!” 225 members in Japan https://nerves-jp.connpass.com/ Sapporo.beam Pocket LANcher First product in Japan with Nerves https://www.pocket-lancher.com/ https://www.nerves-project.org/ 12
  11. 13 BTW, New Target for Hetero SoC!! • Seeed ODYSSEY

    STM32MP1 Cortex-A7x2 + -M4 https://github.com/b5g- ex/nerves_system_stm32mp157c_odyssey • AMD/Xilinx Kria KR260 Cortex-A53x4 + FPGA https://github.com/b5g- ex/nerves_system_kr260 Both are ported by pojiro!! We are developing technologies that will enable Nerves to actively utilize low-power core and FPGA (but WiP,,,)
  12. # 1. clone our repository git clone https://github.com/b5g-ex/rclex_on_nerves.git cd rclex_on_nerves/

    # 2. deps.get mix deps.get # 3. prepare ros2 resources mix rclex.prep.ros2 --arch arm64v8 --ros2-distro foxy # 4. copy them to rootfs_overlay bash copy_ros2_resources.sh # 5. generate codes of message types for topic comm. mix rclex.gen.msgs --from rootfs_overlay/usr/share # 6. create fw, and burn (or, upload) export MIX_TARGET=rpi4 export ROS_DIR=$PWD/rootfs_overlay/usr mix firmware && mix burn # or, mix upload 14 How to Install for on • Copy the directories needed to operate ROS 2 from the Docker container to the Nerves file system Ø rootfs_overlay feature realizes this solution Ø Installing ROS 2 env on the host is not required! /opt/ros/foxy/include /opt/ros/foxy/lib/ /opt/ros/foxy/share arm64v8/ros: foxy-ros-core rootfs … usr/ … rootfs copy NOTE: this operation is still WIP. It may be changed in the future.
  13. 15 Step3: Rclex on Nerves with Zenoh communication autonomy across

    networks bare minimum and bulletproof runtime platform autonomous node communication within the network
  14. 16 Zero Overhead Network Protocol • Eloquent: First class abstractions

    for pub/sub, geo-distributed storages, query, and queryables • Scalable: decentralized and scale-out / scale-down • Fast: to learn and extremely performant https://zenoh.io
  15. # continue from page 15 # 1. scp from RPi4

    on Ubuntu scp -r ubuntu@ubuntu:~/zenoh-plugin-dds . # 2. copy `zenoh-bridge-dds` binary under `./rootfs_overlay/opt/` bash copy_zenoh_resources.sh # 3. Set `${ZENOH_ROUTER_IP}` for your server export ZENOH_ROUTER_IP=aa.bbb.ccc.d # 4. create fw, and upload mix firmware && mix upload 18 How to Use with on • MuonTrap is used for operating zenoh_bridge_dds NOTE: this operation is still WIP. It may be changed in the future. Please check README for more details, especially for preparing Zenoh environment.
  16. 19 論よりRUN!! "ron yori run" The RUN is mightier than

    the word global IP: 23.185.0.4 global IP: 133.11.194.2 SFO TYO 192.168.10.10 192.168.10.?? 192.168.??.?? Rclex messages between nodes will go beyond the Pacific Ocean!!
  17. 20

  18. Autonomous node communication for Elixir ecosystem! 21 Wrapping Up!! communication

    autonomy across networks bare minimum and bulletproof runtime platform autonomous node communication within the network Maybe you can use some of Nerves techniques we have experienced, such as rootfs_overlay and MuonTrap
  19. 22 Our journey is still on the way,,, STAR our

    repos! and Give us your contributions!! https://github.com/rclex/rclex https://github.com/b5g-ex/rclex_on_nerves • Support for Rclex Service, Action and Parameter • Case study applied to actual IoT systems • Comparison with ROSiE, Phoenix PubSub, etc. • documentation, and academic paper,,,
  20. 23 Thank you so much! Arigato!! @takasehideki A part of

    this work is supported by JST CREST JPMJCR21D2 and the commissioned research (04001) by National Institute of Information and Communications Technology (NICT) , Japan.