Skip to Main Content
Lightning Talk Intermediate https://github.com/csd-robocon-nitk/bloom/blob/master/LICENSE First Talk

Bloom: A Lightweight, Resilient C Middleware for ROS 2 and Microcontroller Ecosystems

Proposal status is Review Pending
Session Description

Integrating resource-constrained microcontrollers into ROS 2 using micro-ROS often introduces significant friction in real-world robotics hardware. Embedded developers frequently encounter serial buffer saturation at publication rates above 500 Hz, fragile client-agent sessions that fail to recover after physical link disconnections, and cumbersome build pipelines where adding a custom message requires recompiling the static client library inside a Docker container.

Bloom is an open-source C middleware designed to provide a minimal, modular alternative. By decoupling the top-level application API from the underlying protocol and physical transport, Bloom allows developers to implement ROS 2 communication over UART, CAN, or UDP with minimal memory overhead and deterministic execution on microcontrollers such as STM32, ESP32, and RP2040.

Core Deliverables

  1. Automated Connection State Machine

Built-in connection lifecycle management that monitors session health, detects physical link failures, and handles reconnection automatically without blocking client execution loops.

  1. Deterministic Error Reporting

Granular return codes and runtime diagnostics that distinguish between physical transport timeouts, session disconnections, and memory allocation issues, helping prevent silent failures and hardware faults.

  1. Streamlined Message Definitions

A lightweight serialization layer that allows developers to add or modify custom message schemas without rebuilding the entire middleware toolchain.

  1. POSIX-Independent C Implementation

A clean C11 core that eliminates dependencies on POSIX headers, such as sched.h and clock_gettime, allowing straightforward integration into PlatformIO, ESP-IDF, and bare-metal environments.

  1. Portable Hardware Abstraction

A minimal transport interface based on function pointers, including init, read, write, and close, making it straightforward to port Bloom to different microcontroller peripherals.

  1. Centralized Configuration

A single, readable configuration header for defining topic IDs, buffer capacities, and transport parameters with minimal boilerplate code.

  1. Native ROS 2 Workspace Build

Direct compatibility with standard ROS 2 workspaces through conventional CMake and package.xml build workflows.

  1. Low-Overhead Framing and Verification

Implementation of Consistent Overhead Byte Stuffing (COBS) and table-driven CRC-16 checks to reduce the variable byte-stuffing overhead associated with HDLC during high-frequency sensor streaming.

  1. Configurable Buffer Allocation

User-configurable static buffers for individual publishers and subscribers to ensure deterministic memory usage without requiring dynamic heap allocations.

  1. Direct MCU-to-MCU Bus Communication

Support for peer-to-peer messaging over shared buses such as CAN, enabling tight control loops, such as motor controllers reading remote encoder data, to operate without routing every packet through a host Linux agent.

Key Takeaways

Bloom addresses the architectural overhead of micro-ROS by separating the microcontroller application interface from the underlying transport and wire protocols through clean C abstractions. Instead of coupling embedded nodes to heavy POSIX dependencies and rigid client-agent sessions, Bloom implements an autonomous state machine that recovers reliably from physical disconnections, replaces HDLC byte-stuffing with predictable COBS framing and table-based CRC validation to sustain kilohertz sensor streams, and enforces deterministic static memory allocation across all publishers and subscribers. This modularity allows developers to define custom message schemas without containerized crosscompilation pipelines, run low-latency peer-to-peer control loops directly over CAN without host agent intervention, and compile natively across STM32, ESP32, and bare-metal targets with complete diagnostic visibility.

References

Session Categories

Introducing a FOSS project or a new version of a popular project
Tutorial about using a FOSS project
Contributing to FOSS
Talk License: https://github.com/csd-robocon-nitk/bloom/blob/master/LICENSE