TL;DR
BricksRL is an open-source framework that democratizes robotics research by pairing affordable LEGO Technic hardware with the powerful TorchRL library. It enables researchers and students to train real-world robots—like quadrupeds and manipulators—on a standard laptop in under two hours, significantly lowering the financial and technical barriers to entry for reinforcement learning (RL).
What Problem Does This Paper Address?
Real-world robotics research is notoriously expensive and complex. High-end robotic arms or quadrupeds can cost anywhere from $10,000 to over $200,000, and the software stacks required to control them (like ROS) often have steep learning curves. This creates a "gatekeeping" effect, where only well-funded labs can contribute to cutting-edge embodied AI research.
Furthermore, training RL agents in the real world is difficult due to noisy sensors, mechanical backlash, and the time required for sample-efficient learning. BricksRL tackles these issues by providing a modular, reproducible, and cost-effective platform ($300–$400) that abstracts away low-level hardware complexities, allowing users to focus on the RL algorithms themselves.
Methods
The core of BricksRL is the synergy between two software ecosystems:
- TorchRL: A modern PyTorch-based library used to develop the RL agents and environment logic.
- Pybricks: A MicroPython-based firmware that runs directly on LEGO Technic hubs to control motors and read sensors.
The system uses a bidirectional communication bridge via Bluetooth Low Energy (BLE). The agent (running on a PC/GPU) sends actions as byte streams to the robot, while the robot sends back sensor data (state) for evaluation.
To ensure the platform is robust, the authors implemented several state-of-the-art off-policy RL algorithms, including SAC (Soft Actor-Critic), TD3 (Twin Delayed DDPG), and DroQ, which are known for their sample efficiency in continuous control tasks.
Datasets
The authors introduced a new benchmark suite featuring three distinct robot configurations:
- 2Wheeler: A simple mobile platform for introductory tasks.
- Walker: A quadrupedal robot that mimics complex locomotion.
- RoboArm: A static 4-motor manipulator for reaching and grasping.
They curated and released datasets for these robots on Hugging Face, containing both "expert" data (from trained SAC agents) and "random" data. These datasets allow researchers to test Offline RL algorithms (like IQL and CQL) without needing the physical hardware immediately.
Key Insights and Ideas
- The "Frame Skip" Effect: While the BLE connection limits communication to roughly 11Hz (much slower than the hub's internal 1000Hz loop), the authors found that lower frequencies (e.g., 2Hz) actually improved training stability for the Walker. This effectively acts as "frame skipping," a common trick in RL to simplify decision-making.
- Sim2Real is Viable: Because LEGO parts are standardized, the authors could build accurate simulations. They demonstrated that policies trained in simulation could be successfully transferred to the real LEGO robots, drastically reducing real-world wear and tear.
- Extensibility Beyond LEGO: The platform isn't a closed loop. The authors successfully integrated a standard USB webcam to provide vision-based observations, proving that BricksRL can scale to more complex, multi-modal tasks.
Key Results
- Speed: Real-world training times were impressively low. The 2Wheeler mastered tasks in ~15 minutes, while the quadruped Walker developed a forward-moving gait in approximately 70 minutes.
- Performance: In the "Spinning" task, all RL agents achieved rewards near 7500, compared to a random policy score of ~72.
- Success Rates: For the RoboArm reaching task, SAC achieved a 100% success rate when transferred from simulation to the real world, while online training reached 72% within the time limit.
Limitations and Future Work
The primary bottleneck is communication latency. The overhead of serializing data over BLE limits the system-wide frequency to ~11Hz, which might be too slow for highly dynamic tasks like high-speed running or balancing. Additionally, LEGO hardware inherently suffers from backlash (slop in the gears), which adds a layer of mechanical noise that algorithms must learn to ignore.
Future work includes exploring multi-agent RL (multiple LEGO robots interacting), leveraging larger datasets for transformer-based imitation learning, and designing even more complex custom builds to push the limits of the TorchRL integration.
Summary updated