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

ros2arduino Demo on [M5StickC -> Raspberry Pi Zero WH -> M5Atom Lite]

ros2arduino Demo on [M5StickC -> Raspberry Pi Zero WH -> M5Atom Lite]

maehara-keisuke

June 26, 2020
Tweet

More Decks by maehara-keisuke

Other Decks in Technology

Transcript

  1. ros2arduino Demo on [M5StickC -> RaspberryPi Zero WH -> M5Atom

    Lite] 2020.06.26 ROS Japan UG #37 @Google Meet 前原 圭祐( MAEHARA Keisuke ) Slack ROS Japan UG : MAEHARA Keisuke Qiita : @MAEHARA_Keisuke
  2. 2/7 © 2020 MAEHARA Keisuke Background • My interest –

    “ROS2 Framework” not only in “Computer World” but also in “Control System” • In my previous presentation(@ROS Japan UG #36 LT) – micro-ROS Demo on STM32 nucleo-f767zi – Button pressed/released event was published via micro-controller
  3. 3/7 © 2020 MAEHARA Keisuke What I want to show

    next ... • Toy example about simulated control system that contains ... – Input(≒ simulated sensor) on micro-controller (XRCE Client) – Control Law on embedded computer (XRCE Agent) – Output(≒ simulated actuator) on micro-controller (XRCE Client) M5Atom Lite M5StickC Raspberry Pi Zero WH ” “ source : https://d2air1d4eqhwg2.cloudfront.net/ images/5517/500x500/f38b9598- 6d09-4f5a-9427-5e16d9bba835.jpg -> -> “ “ ” ” XYZ Acceleration RGB Brightness XRCE Agent XRCE Agent Raspbian buster ARMv6 (Full Stack) ROS2 Dashing build on board itself WiFi AP Service by hostapd Control Law Node XRCE Client by ros2arduino XRCE Client by ros2arduino WiFi Client by WiFi.h WiFi Client by WiFi.h arduino firmware DHCP request DHCP request arduino firmware RGB LED by M5Atom.h IMU by M5StickC.h INPUT OUTPUT source : https://d2air1d4eqhwg2.cloudfront.net/images/ 3646/500x500/8d037ed2-9a5b-4619-baa6- 9fb208fb9cb8.jpg source : https:// d2air1d4eqhwg2.cloudfront.ne t/images/6262/500x500/ c65661f1-5822-4af4-a0bb- b40a57cfe7e0.png
  4. 4/7 © 2020 MAEHARA Keisuke Why I selected these devices

    ? • M5StickC, M5Atom Lite – To evaluate ros2arduino and arduino echo system – To try XRCE DDS Network on wireless connection – Multi-Bit Input Device such as IMU(M5StickC) – Multi-Bit Output Device such as RGB LED(M5Atom Lite) • RaspberryPi Zero WH – To evaluate as an affordable and low-end embedded computer – To try XRCE DDS Network on wireless connection
  5. 5/7 © 2020 MAEHARA Keisuke Control Law • RGB LED

    color on M5Atom Lite changes according to acceleration vector on M5StickC Mapping Acc(X) Acc(Y) Acc(Z) Brightness(R) Brightness(G) Brightness(B) Range(each axis) :-1000 to +1000 [mG] Range(each axis) : 0 to 192 [no unit] 192 -1000 +1000 Brightness [no unit] Acc [mG]
  6. 6/7 © 2020 MAEHARA Keisuke Software Structure Mapping Publish Brightness

    Subscribe Acc? Set RGB Brightness Raspberry Pi Zero WH M5Atom Lite Timer overflow? IMU Input Publish Acc Subscribe Brightness? M5StickC XYZ Acceleration RGB Brightness
  7. 7/7 © 2020 MAEHARA Keisuke Advantage to use embedded computer

    • Control Law is abstracted and device independent, and Full Stack ROS2 Dashing is running on Raspberry Pi Zero WH – Short build time on amd64 Desktop in Combined Test Phase – Seamless porting of Control Law Node from amd64 Desktop to Raspberry Pi Zero WH Control Law Node # ros2 topic pub /acceleration std_msgs/msg/String “data: 0 0 1000” # ros2 topic echo /brightness Combined Test Phase(Logic Level Test) System Test Phase XYZ Acceleration RGB Brightness XRCE Agent XRCE Agent Control Law Node XRCE Client by ros2arduino XRCE Client by ros2arduino XYZ Acceleration RGB Brightness amd64 Desktop amd64 Desktop Production Test Phase XYZ Acceleration RGB Brightness XRCE Agent XRCE Agent Control Law Node XRCE Client by ros2arduino XRCE Client by ros2arduino Raspberry Pi Zero WH No code modification and no rebuild No code modification, just rebuild on board itself