Authors: Lorenzo Manfredi Segato, Filippo Marcantoni, Emma Pollak
Project Advisor: Carlo Pinciroli
Institution: Worcester Polytechnic Institute (WPI)
Major Qualifying Project (Fall 2024 - Spring 2025): Published on WPI Digital: [https://digital.wpi.edu/concern/student_works/wd3761406?locale=en]
PiELo is a domain-specific language (DSL) and runtime platform designed to simplify the development of decentralized robot swarms. It addresses the complexity of coordination and environmental response by treating reactivity and consensus as first-class language features.
-
Simplified Reactivity: Enable robots to automatically respond to sensor updates and environmental changes without complex callback chains.
-
Native Consensus: Provide built-in mechanisms for individual robots to reach collective agreements and compute problems together.
-
Resource Efficiency: Create a minimalist, stack-based infrastructure capable of running on resource-constrained robotic hardware.
-
Seamless Extensibility: Allow high-level scripts to interface directly with low-level C++ hardware drivers for sensors and actuators.
The PiELo infrastructure is divided into two primary components: a compiler and a custom Virtual Machine (VM).
The VM acts as a stack-based interpreter that executes compact bytecode.
-
Reactive Engine: Maintains a directed acyclic graph (DAG) of dependencies to propagate changes through variables and closures.
-
Memory Management: Implements a mark-and-sweep garbage collector to handle the lifecycle of reactive expressions and closures.
-
Symbol Tables: Manages variable scopes across global, local, and shared environments.
The compiler translates Lisp-inspired source code into VM bytecode through three stages:
-
Tokenization: Lexical analysis of parenthesized prefix notation.
-
Parsing: Generation of an Abstract Syntax Tree (AST).
-
Code Generation: Emission of VM instructions, including special handling for reactive assignments.
Assignments can be declared as reactive, creating a persistent dependency between variables.
-
Automatic Synchronization: When a source variable (e.g., a sensor) changes, all dependent variables are instantly re-calculated.
-
Boilerplate Reduction: Eliminates the need for manual event listeners or "check loops".
PiELo provides a mechanism for swarm-wide state synchronization.
-
Message Broker: Uses a central server (or designated robot) to broadcast updates across the network.
-
Consistency: Each update includes a local timestamp to maintain order across the decentralized swarm.
Specialized data structures facilitate complex swarm patterns.
-
Key-Value Stores: Maps are keyed by Robot ID, allowing individuals to contribute data to a collective datastructure.
-
Barrier Synchronization: Enables robots to wait for a specific condition (e.g., all robots arriving at a point) before proceeding.
-
Language Syntax: Lisp-inspired (prefix notation).
-
Implementation Language: C++ (for the VM and native function registration).
-
Communication: UDP/TCP via a message broker system for shared variables.
-
Extensibility: Native C/C++ function registration interface for hardware integration (motors, sensors).
The effectiveness of PiELo was validated by comparing it against the Robot Operating System (ROS) using a "Barrier Test". Consensus was first validated in ARGoS3 simulation, and Khepera IV robot deployments using a Vicon motion-capture system..
-
PiELo Results: Required significantly less code and overhead by leveraging native reactive primitives.
-
ROS Comparison: ROS implementation required manual node management, custom message definitions, and extensive boilerplate for the same consensus logic.
-
Decentralized Communication: Transitioning from a central server model to a peer-to-peer (P2P) communication topology.
-
Formal Verification: Integrating statistical model checking to ensure swarm safety and consensus guarantees.
-
Heterogeneous Swarm Support: Enhancing map variables to better manage diverse robot types within a single script.
For technical details refer to the full PiELo Final Paper: [https://digital.wpi.edu/concern/student_works/wd3761406?locale=en].