🤖 AI Summary
To address the challenges of ROS 2—including reliance on local deployment, poor reproducibility, high educational barriers, and significant security risks—this paper introduces ROS2Wasm, the first native browser-based ROS 2 execution framework. Leveraging WebAssembly cross-compilation and RoboStack containerization, ROS2Wasm enables zero-installation, in-browser execution of the ROS 2 core, RoboStack ecosystem, and the Robotics Toolbox for Python. A lightweight communication middleware—built upon WebSockets and SharedArrayBuffer—supports real-time TF visualization, sensor simulation, and Python script execution. Furthermore, integration with the Swift Web simulator and PyTorch/Open3D Web bindings ensures safe, sandboxed execution with strict isolation guarantees. Deployed at ros2wasm.dev, the system achieves startup latency under 500 ms and supports all major browsers. ROS2Wasm significantly enhances reproducibility in robotics research, accessibility in education, and runtime security—all without compromising functionality or performance.
📝 Abstract
The Robot Operating System (ROS) has become the de facto standard middleware in robotics, widely adopted across domains ranging from education to industrial applications. The RoboStack distribution, a conda-based packaging system for ROS, has extended ROS's accessibility by facilitating installation across all major operating systems and architectures, integrating seamlessly with scientific tools such as PyTorch and Open3D. This paper presents ROS2WASM, a novel integration of RoboStack with WebAssembly, enabling the execution of ROS 2 and its associated software directly within web browsers, without requiring local installations. ROS2WASM significantly enhances the reproducibility and shareability of research, lowers barriers to robotics education, and leverages WebAssembly's robust security framework to protect against malicious code. We detail our methodology for cross-compiling ROS 2 packages into WebAssembly, the development of a specialized middleware for ROS 2 communication within browsers, and the implementation of https://www.ros2wasm.dev, a web platform enabling users to interact with ROS 2 environments. Additionally, we extend support to the Robotics Toolbox for Python and adapt its Swift simulator for browser compatibility. Our work paves the way for unprecedented accessibility in robotics, offering scalable, secure, and reproducible environments that have the potential to transform educational and research paradigms.