ROS2WASM: Bringing the Robot Operating System to the Web
Tobias Fischer, Isabel Paredes, Michael Batchelor, Thorsten Beier, Jesse Haviland, Silvio Traversaro, Wolf Vollprecht, Markus Schmitz, Michael Milford
TL;DR
This work tackles the challenge of accessibility and reproducibility in ROS-based robotics by enabling ROS 2 to run directly in web browsers through WebAssembly. It introduces a three-part methodology: a browser-native middleware (rmw-wasm), a cross-compilation workflow extending RoboStack to WASM, and web integration via JupyterLite, complemented by adaptations of the Robotics Toolbox for Python and the Swift simulator to WASM. The authors demonstrate full-stack browser demonstrations and even a bridge to a non-ROS robot via Web Bluetooth, highlighting potential applications in education, research, and industry. The study showcases the feasibility of install-free, sandboxed, scalable, and secure browser-based ROS environments and outlines future directions such as Zenoh integration and GUI-tool porting to the browser.
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.
