The Use of DDS Middleware in Robotics - 17 June 202
Corresponding webinar recording: https://youtu.be/pTkZk4VF0gY
This webinar, in cooperation with FIWARE Foundation Gold Member eProsima, will provide an introduction to core real-time technologies: FAST DDS, the most complete Open Source DDS for ROS 2, and Micro XRCE-DDS, the middleware for microcontrollers and micro-ROS.
Chapter: Robotics
Difficulty: 3
Audience: Technical Domain Specific
Speakers: Jaime Martin Losa (CEO, eProsima) and Francesca Finocchiaro (Team Manager micro-ROS, eProsima)
FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 2)
1. Micro XRCE-DDS & micro-ROS
Bringing DDS and ROS into microcontrollers
Francesca Finocchiaro
eProsima - Team manager
francescafinocchiaro@eprosima.com
www.eprosima.com
FIWARE FOUNDATION Webinar
17/06/2020
2. About
Francesca Finocchiaro
Team manager of the micro-ROS
project within eProsima
Micro XRCE-DDS
Open source library,
developed at eProsima
micro-ROS
Open source library, developed
as part of a UE-funded project
3. Presentation Overview
● Need for a new paradigm
● Micro XRCE-DDS
○ DDS-XRCE protocol
○ Intro to Micro XRCE-DDS
○ Supported Operating Systems
○ Client library
○ Agent library
○ Client-Agent interaction
○ Demo example
● micro-ROS
○ Micro XRCE-DDS
○ Architecture overview: Comparison with ROS 2
○ Supported platforms
○ Use-case
4. The need for a new paradigm
● Why bringing DDS and ROS to microcontrollers?
○ IoT and time-critical applications
○ Direct interface with sensors and actuators
○ Cut-down production costs
● Micro XRCE-DDS and micro-ROS: brand new protocols
○ Designed to be integrated into the DDS and ROS worlds
○ Tailored to fit into embedded systems
○ Platform-adaptable
● Resource-constrained devices:
○ Small storage capacity
○ Small RAM
○ Limited processing resources
5. The DDS-XRCE wire protocol
DDS-XRCE: DDS for eXtremely Resource-Constrained Environment.
Clients - XRCE entities on low-resource consumption devices.
Agent - XRCE entity connected with DDS global data space. Acts on behalf of Clients in the DDS world.
Main features:
● Client-server architecture
● Request-response pattern
● Connection oriented
6. Micro XRCE-DDS: an introduction
Main components:
● Micro XRCE-DDS Agent
● Micro XRCE-DDS Client
Additional components:
● Generator tool
● Serialization library
eProsima Micro XRCE-DDS: First implementation of DDS-XRCE
protocol.
7. Micro XRCE-DDS: an introduction
Main components:
● Micro XRCE-DDS Agent
● Micro XRCE-DDS Client
Additional components:
● Generator tool
● Serialization library
eProsima Micro XRCE-DDS: First implementation of DDS-XRCE
protocol.
8. Supported OSes and RTOSes
RTOS: Real Time Operating System
Main Features:
● Works with an advanced algorithm for scheduling tasks within maximum time limit.
● Apt for Real-Time applications
● POSIX-compliant interface
NuttX
FreeRTOS
Linux Windows
Zephyr
9. Micro XRCE-DDS Client
Micro XRCE-DDS Client:
C99 library. Features:
● UDP, TCP, and Serial
transport support
● Micro XRCE-DDS as a wire
protocol
● Full static memory
● Configurable profiles
● Streams: best effort &
reliable
● DDS entities can be created
by: XML, reference or binary
profiles
10. Micro XRCE-DDS Agent
Micro XRCE-DDS Agent:
C++11 application &
library. Features:
● UDP, TCP, and Serial
transport support
● Fast DDS as DDS
wire protocol
● Creates Client proxy
as DDS actor
● Configurable
● Streams: best effort &
reliable
11. Client-Agent communication
Communication flow:
● Client connects to agent
(upon previous knowledge
or discovery)
● Session creation (Client
proxy instantiation)
● DDS Participant creation
● Other DDS Entities
creation
12. ToF Sensor + Shapes Demo
Hardware and Software employed:
● STM32L4 Discovery kit IoT with
integrated ToF sensor
● XRCE Client client running on Zephyr
RTOS
● XRCE Agent and DDS ShapesDemo app
running on Linux
● Serial transport
Steps:
1. Open ShapesDemo app (DDS World)
2. Create Subscriber in ShapesDemo
3. Run Agent in Linux
4. Publish sensor data with Client
5. Receive data on ShapesDemo app
13. From Micro XRCE-DDS to micro-ROS
In a nutshell
ROS2 : Fast DDS = micro-ROS : Micro XRCE-DDS
● ROS2 - Robot Operating System 2. Layered
architecture allowing to build complex Robotics
applications.
● Fast DDS - Default Middleware for ROS2
● micro-ROS - Brings ROS2 to microcontrollers.
Layered architecture like ROS2
● Micro XRCE-DDS - Default Middleware for
micro-ROS
14. micro-ROS: an introduction
micro-ROS brings ROS 2 to microcontrollers
Software solution for creating ROS 2 nodes into
embedded devices, such as microcontrollers (MCUs).
Main Features:
● Layer-compatible with ROS 2
● Allows to create a ROS 2 node with all functionalities
● Middleware transports fully customizable
● Client-agent logics
● Runs on different RTOSes and MCUs
● Platform-versatile cross-compilation tools
15. Architecture: micro-ROS vs ROS2
Status: micro-ROS supports Dashing. Currently working to port it to Foxy
16. micro-ROS target platforms
Target: mid-range microcontrollers.
Currently supported: STM32 microcontroller
unit, e. g. STM32F407 or STM32L475E.
Typical features:
● ~ 200 KB of RAM memory
● < 500 mA consumption
● General purpose input/output pins (GPIO)
● Communication peripherals: USB,
Ethernet, SPI, UART, I2C, CAN, etc
Olimex LTD STM32-E407
(STM32F407)
STM32L4 Discovery kit IoT
(STM32L4)
Crazyflie 2.1 drone
(STM32F405)
Supported boards
17. micro-ROS use-case: robotic arm
Hardware and Software employed:
● ROS 2-enabled robotic arm
(Robotis OpenMANIPULATOR-X)
● ST VL53l1X ToF sensor operated
by Olimex STM32-E407
● micro-ROS client app running on
Zephyr RTOS
● Raspberry Pi 4 running: micro-ROS
agent + arm ROS 2 packages
● Serial transport
Full video here:
https://www.eprosima.com/index.php/company-all/news/143-towards-competitive-warehouse-automation-with-micro-ros