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

Zenoh meets Elixir in Japan

December 12, 2023

Zenoh meets Elixir in Japan

Zenoh User Meeting 2023

YouTube Archive
the entire event (my presentation started from around 3:08:17)


December 12, 2023

More Decks by takasehideki

Other Decks in Research


  1. meets in Japan Hideki Takase and Shintaro Hosoai (The Univ.

    of Tokyo) Zenoh User Meeting 2023 2023/12/12
  2. 2 Topics a.k.a Our History https://vimeo.com/showcase/9954564/video/767140724 global IP: global

    IP: SFO TYO 192.168.10.?? 192.168.??.?? Rclex messages between nodes will go beyond the Pacific Ocean!!
  3. … … 3 rclcpp rclpy node.cpp node.py RCL (ROS Client

    Library) RMW (ROS MiddleWare) DDS B DDS A General Purpose OS • common functions for ROS 2 • implemented by C • any client library can be implemented by calling it • Abstraction layer for DDS • Able to select preferred DDS (and Zenoh??) rclrs node.rs Zenoh?? DDS (Data Distribution Service) • OMG standard specification • Pub/Sub communication functions • Automatic search of nodes by RTPS is awesome!!
  4. ROS 2 Client Library for,,, Rclex 4 rclcpp rclpy node.cpp

    node.py node.ex RCL (ROS Client Library) RMW (ROS MiddleWare) DDS B DDS A General Purpose OS rclrs node.rs Zenoh?? github.com/rclex
  5. We love Elixir!! Functional language (appeared in 2012) Operated on

    Erlang VM (BEAM) • lightweight processes with robustness • highly concurrency/parallelism • soft real-time feature • easy to realize distributed and fault tolerance system * The copyrights of these logos belong to their respective creators • Similar to Actor Model — Actors (processes) send and receive messages — "Let it Crash”: The problematic process should be promptly crashed and restored immediately — We can spawn a massive number of processes!! 5
  6. * The copyrights of these logos belong to their respective

    creators Language Design based on Ruby • easy to learn! familiar grammar and notation • very highly productive despite functional • high communication performance suitable for IoT Programming should be about transforming data .1 1 ( 0 ) . .1 ) 11 .1 ) ) &0 1(. &0 1 example Elixir code Ø Data flow and parallel processing can be described intuitively with Enum Flow |> We love Elixir!! Functional language (appeared in 2012) 6
  7. 7 We love Elixir!! * The copyrights of these logos

    belong to their respective creators • Awesome ecosystem!
  8. Developed by Nerves Project! • Dedicated IoT Platform for Elixir

    — fully compatible with Elixir — useful libraries for IoT systems • bare-minimum!! — too small (one linked fw, ~>30 MB) — portable and easy to configure • resilient!! — of course, robust thanks to Erlang VM!! — file system is duplicated and read-only for reliability github.com/rclex Master Boot Record file system A Erlang VM libraries file system B Erlang VM libraries Application Data boot A Linux kernel boot B Linux kernel
  9. github.com/rclex 9 on Supported Targets ROS_DISTRO arm64v8 arm32v7 Foxy ✅

    ✅ Galactic ✅ Humble ✅ ✅ Iron WiP,,, WiP,,, Jazzy, K**, L**, … T.B.A?? T.B.A?? arm64v8 arm32v7 Raspberry Pi 4 Kria KR260 BeagleBone STM32MP1 e-RT3 Plus
  10. 10 論よりRUN!! "ron yori run" The RUN is mightier than

    the word https://github.com/pojiro/rpi4_mouse Raspberry Pi Mouse V3 by RT Corporation Momo (WebRTC Native Client) by Shiguredo /cmd_vel control motors sensors /sensors
  11. Actual behavior of RPi Mouse Phoenix Web Page on Nerves

    for Sensor Values on RPi Mouse Camera image on RPi Mouse sent by Momo Nerves Console 論よりRUN!! "ron yori run" The RUN is mightier than the word
  12. 12 BTW, What do we want to realize?? network address

    space A global IP: nodeA2 nodeA1 nodeA3 192.168.10.?? network address space B global IP: nodeB1 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
  13. 13 Yes! we have Rclex autonomous node comm. feature powered

    by DDS/RTPS awesome IoT platform by Elixir eloquent, scalable and fast protocol and Zenoh!!
  14. # 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 15 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.
  15. 18 Zenohex = Zenoh + Elixir • Elixir API for

    Zenoh —https://github.com/b5g-ex/zenohex Zenoh Protocol by Rust Erlang VM Elixir node1 Elixir node2 process Rustler github.com/rusterlium/rustler calls Zenoh APIs and converts Erlang and Rust resources to each other Python node2 Zenohex nodes will be created as Erlang lightweight process!! C++ node1
  16. 20 Current Status & Plans • Supported feature (limited;( —implemented

    for Zenoh 0.7.0-rc,,, —only push-type Pub/Sub,,, —numeric and string types,,, • Very very ongoing work :D —support for 0.10.0-rc —implement pull and query using various types —make APIs more functional!!
  17. 21 Upcoming!! • Code BEAM America 2024 — https://codebeamamerica.com/ —

    Mar 7-8 2024 at San Francisco, CA & Virtual • Zenoh Meetup in Japan!! — https://connpass.com/event/304464/ — Dec 19 2023 at UTokyo & online! — Welcome to Japan, Angelo!!
  18. 22 Thank you! merci!! Arigato!!! @takasehideki A part of this

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