Design Concepts Overview#

Sugarcoat is designed to transform standard ROS2 nodes into robust, self-healing, and dynamic building blocks for autonomous systems. The architecture is centered around four key pillars: Modular Execution, Active Resilience, Event-Driven Behavior, and Centralized Orchestration.

The following diagram illustrates how a single Component is structured to handle inputs, outputs, health monitoring, and recovery behaviors internally.

component

Component Structure#

component

Component Structure#

1. The Component: Smart Execution#

At the heart of the system is the Component. Unlike a standard ROS2 node, a Sugarcoat Component is Lifecycle-managed and Health-aware by default. It executes a specific logic (e.g., a path planner, a driver, or a controller), and validates its own configuration automatically.

2. Active Resilience: Status & Fallbacks#

Robots fail. Sugarcoat Components are designed to handle failure gracefully rather than crashing.

  • Health Status: Every component continuously reports its internal state, distinguishing between Algorithm failures (e.g., “no path found”), Component failures (e.g., “driver crash”), or System failures (e.g., “missing input”).

  • Fallbacks: When a failure is detected, the component automatically triggers pre-configured recovery strategies—such as retrying an operation, re-initializing a driver, or safely shutting down—without requiring external intervention.

3. Dynamic Behavior: Events & Actions#

To create reactive autonomy, Sugarcoat layers an Event-Driven system on top of standard data flows.

  • Events: These act as triggers that monitor ROS2 topics for specific conditions (e.g., “Battery < 20%”, “Target Lost”, or “New Terrain Detected”).

  • Actions: When an Event triggers (or a Fallback activates), an Action is executed. Actions can reconfigure components, switch controllers, start/stop processes, or send goals to other nodes.

4. Orchestration: Launcher & Monitor#

Finally, the system is brought to life and supervised by the Launcher and Monitor.

  • Launcher: A Pythonic interface to define and deploy your system. It supports running components in Multi-threaded or Multi-process modes, managing their lifecycles automatically.

  • Monitor An internal node that runs alongside your components. It acts as the system supervisor, listening to global Events and Component Health Statuses to coordinate system-wide responses.

Execution Models#

Sugarcoat supports flexible execution models to suit your performance needs:

Multi-threaded Execution:#

Components run as threads within a single process, sharing memory for low-latency communication.

multi-threaded

Multi-threaded execution#

multi-threaded

Multi-threaded execution#

Multi-process Execution#

Components run in separate processes for isolation and stability, coordinated by the Launcher.

multi-process

Multi-process execution#

multi-process

Multi-process execution#