cs.ROMar 8, 2026

LITHE: Bridging Best-Effort Python and Real-Time C++ for Hot-Swapping Robotic Control Laws on Commodity Linux

Authors: He Kai Lim, Tyler R. Clites

Organizations: All authors are with the Department of Mechanical and Aerospace Engineering, University of California Los Angeles, Los Angeles, CA 90095 USA

Abstract

Modern robotic systems rely on hierarchical control, where a high-level "Brain" (Python) directs a lower-level "Spine" (C++ real-time controller). Despite its necessity, this hierarchy makes it difficult for the Brain to completely rewrite the Spine's immutable control logic, consequently inhibiting fundamental adaptation for different tasks and environments. Conventional approaches require complex middleware, proprietary hardware, or sacrifice real-time performance. We present LITHE (Linux Isolated Threading for Hierarchical Execution), a lightweight software architecture that collapses the robot control hierarchy onto a commodity single-board computer (Raspberry Pi 4B with pi3hat), while maintaining safe frequency decoupling between the Brain and Spine. LITHE integrates strict CPU isolation (isolcpus), lock-free inter-process communication (IPC), and pipelined execution to meet high-frequency deadlines with minimal jitter. By adding multi-threaded dynamic linking, LITHE enables a Python-based Brain to dynamically evolve the logic of a 1kHz C++ Spine without interruption. We validate "functional real-time" system performance with worst-case execution time (WCET) < 100 μμs and maximum release jitter (MRJ) < 4 μμs under heavy load. We demonstrate a novel application where a large language model (LLM) supervisor performs online system identification to evolve a real-time controller on-the-fly, without interrupting the 1 kHz control loop. In essence, LITHE eliminates the "immutable compiled code" bottleneck for best-effort Brains to synthesize and inject completely new control laws into the real-time Spine. This bridges a critical gap between high-level AI and low-level real-time control to unlock continuous real-time evolution of embodied intelligence in safe, human-in-the-loop systems.

Figures & tables

Explore similar work

CardsList
  1. EagleVLA: Towards Onboard Real-Time Robot Control via Foresight-Aligned Asynchronous Inference

    Jul 14, 2026Zebin Yang, Qi Wang, Yunhe Wang +6Efficient VLA Model InferenceVision-Language-Action Models

  2. TARC: Time-Adaptive Robotic Control

    Oct 27, 2025Arnav Sukhija, Lenart Treven, Jin Cheng +3Robotic ControlRL Control

  3. Speculative Policy Orchestration: A Latency-Resilient Framework for Cloud-Robotic Manipulation

    Mar 19, 2026Chanh Nguyen, Shutong Jin, Florian T. Pokorny +1Robotic ControlRobotics