automatika_ros_sugar
Syntactic sugar for ROS2 nodes creation and management
README
What is Sugarcoat?
Sugarcoat is the orchestration layer of the EMOS (Embodied Operating System) ecosystem by Automatika Robotics. It is a meta-framework that replaces fragmented ROS2 development with a unified workflow, providing a high-level Python API to build robust lifecycle-managed components and orchestrate them into cohesive, self-healing systems using an event-driven architecture.
For full documentation, tutorials, and recipes, visit emos.automatikarobotics.com.
Key Features & Core Pillars
Feature |
Description |
|---|---|
Smart Components |
Every component is a managed lifecycle node (Configure, Activate, Deactivate) out of the box. It features type-safe configurations via |
Active Resilience |
|
Event-Driven Behavior |
Define global Events (e.g., |
Centralized Orchestration |
A powerful Launcher acts as a pythonic alternative to |
Universal Applications |
Robot Plugins act as a translation layer. This allows you to write generic, portable automation logic (recipes) that run on any robot without code changes. |
Dynamic Web UI |
Auto-generates a fully functional web frontend for every topic, parameter, and event instantly. |
Dynamic Web UI for Sugarcoat Recipes
The Dynamic Web UI feature takes system visibility and control to the next level. Built with FastHTML and MonsterUI, it is designed to automatically generate a fully dynamic, extensible web interface for any Sugarcoat recipe, completely eliminating the need for manual front-end development.
Automatic UI Generation in Action
See how the Web UI effortlessly generates interfaces for different types of Sugarcoat recipes:
Example 1: General Q&A MLLM Recipe A fully functional interface generated for an MLLM agent recipe from EmbodiedAgents, automatically providing controls for settings and real-time text I/O with the robot.
Example 2: Point Navigation Recipe An example for an automatically generated UI for a point navigation system from Kompass. The UI automatically renders map data, and sends navigation goals to the robot.
What’s Inside?
Automatic Settings UI: Interfaces for configuring the settings of all Components used in your recipe are generated on the fly.
Auto I/O Visualization: Front-end controls and data visualizations for UI Inputs and Outputs are created automatically.
WebSocket-Based Streaming: Features bidirectional, low-latency communication for streaming text, image, and audio messages.
Responsive Layouts: Input and output elements are presented in clear, adaptable grid layouts.
Extensible Design: Easily add support for new message types and custom visualizations through extensions.
Documentation
Resource |
URL |
|---|---|
Usage Docs (EMOS) |
|
Developer Docs |
|
API Reference |
Installation
Sugarcoat is available for ROS versions Humble.
Using your Package Manager (Recommended)
On Ubuntu, for example:
sudo apt install ros-$ROS_DISTRO-automatika-ros-sugar
Building from Source
mkdir -p ros-sugar-ws/src
cd ros-sugar-ws/src
git clone https://github.com/automatika-robotics/sugarcoat && cd ..
# Install dependencies (ensure attrs>=23.2.0 is included)
pip install numpy opencv-python-headless 'attrs>=23.2.0' jinja2 msgpack msgpack-numpy setproctitle pyyaml toml
colcon build
source install/setup.bash
Development
Running Tests
# Full test suite
colcon test --packages-select automatika_ros_sugar
colcon test-result --verbose
# Individual tests with pytest
python -m pytest tests/ -v
Developer Docs
For contributors and developers extending Sugarcoat:
Architecture Overview – Core module structure, component lifecycle, IO system, and process graph.
Extending the Type System – How to add custom
SupportedTypesubclasses and register them.Event & Action System Internals – Condition trees, action dispatch, and the fallback system.
Testing Guide – Unit testing, integration testing with
launch_testing, and running the test suite.
Contributing
Sugarcoat has been developed in collaboration between Automatika Robotics and Inria. Contributions from the community are most welcome.
Please open an issue or pull request on GitHub.
Hat Tip
The Dynamic Web UI is powered by two awesome open-source projects. A big thank you to Answers.ai for their work on:
License
Sugarcoat is a collaboration between Automatika Robotics and Inria.
The code is available under the MIT License. See LICENSE for details. Copyright (c) 2024 Automatika Robotics unless explicitly indicated otherwise.