The field of robotics is witnessing an innovative leap forward with the introduction of ROS2WASM. Developed by researchers at QUT and RWTH Aachen, ROS2WASM bridges the gap between the widely-used Robot Operating System (ROS 2) and web technologies by leveraging WebAssembly. This approach allows ROS 2 applications to run directly within a web browser, eliminating the need for local installations and enhancing accessibility for educational, research, and industrial applications.
What is ROS2WASM?

ROS2WASM is a novel framework that cross-compiles ROS 2 packages to WebAssembly, enabling users to run ROS 2 environments within a standard web browser. By using a custom middleware implementation, ROS2WASM brings the power of ROS 2 to the browser without sacrificing performance or security. This method bypasses the complexities of traditional ROS installations and dependency management, making advanced robotics tools accessible to anyone with a web browser.
Key Features of ROS2WASM
1. Browser-Based Execution
ROS2WASM allows users to interact with ROS 2 environments directly in their browsers. This eliminates the need for local installations or cloud-based servers, significantly lowering barriers to entry.
2. Cross-Platform Compatibility
By compiling ROS 2 packages to WebAssembly, ROS2WASM runs seamlessly on any operating system and hardware architecture that supports a modern web browser, from smartphones to high-performance desktops.
3. Reproducibility and Shareability
Researchers and educators can now distribute complex ROS environments through simple URLs, making it easier to replicate experiments and share robotics projects.
4. Secure and Isolated Environment
ROS2WASM utilizes WebAssembly’s security model to create sandboxed environments, ensuring safe execution of ROS nodes within the browser and protecting against malicious code.
5. Integration with Python Robotics Tools
The platform extends support to the Robotics Toolbox for Python, enabling complex simulations like the Swift simulator to run natively within the browser.
How ROS2WASM Works
The core of ROS2WASM’s functionality is its ability to cross-compile ROS 2 packages into WebAssembly modules. This is achieved using the Emscripten toolchain, which converts C/C++ ROS packages into three main outputs: a .wasm
module, JavaScript glue code, and an HTML interface. This setup allows ROS nodes to communicate directly in the browser through a custom middleware called rmw-wasm
.
The architecture consists of three main components:
- rmw-wasm-cpp: Interfaces ROS 2 packages with the WebAssembly-based middleware.
- wasm-cpp: The C++ core that handles ROS message processing and communicates with JavaScript modules.
- wasm-js: Manages message traffic within the browser using WebAssembly and JavaScript interoperability.
This architecture ensures efficient communication between ROS 2 nodes and provides a robust platform for running robotics applications entirely in the web environment.
Getting Started with ROS2WASM
To try out ROS2WASM, visit the ROS2WASM platform. The platform offers a range of demonstrations, from simple publisher-subscriber setups to complex robotic simulations. Users can interact with these examples using a standard web browser, making it easier than ever to get started with ROS 2.
For those interested in deploying their own ROS environments, the setup involves cross-compiling the desired ROS 2 packages using Emscripten and deploying them on a web server. The compiled WebAssembly modules can then be accessed and run through a simple HTML interface, offering the same functionalities as a traditional ROS installation.
Why Run ROS in the Browser?
Running ROS 2 in the browser has several key benefits:
- Accessibility: With no need for local installations, ROS2WASM can be run on any device, making it ideal for robotics education.
- Reproducibility: Easily shareable environments enable researchers to replicate experiments without worrying about dependency mismatches.
- Security: The WebAssembly environment provides strong isolation, reducing the risk of running untrusted code.
What’s Next for ROS2WASM?
The development of ROS2WASM is ongoing, with plans to integrate more sophisticated robotics tools such as rviz
and MoveIt!
. Future versions may also explore leveraging new middleware like Zenoh, which could provide better support for WebAssembly and streamline the architecture further. As the project evolves, ROS2WASM aims to transform how robotics applications are developed, shared, and executed, pushing the boundaries of what’s possible in browser-based robotics.
For more details, visit the official ROS2WASM documentation or the paper of the authors and explore how you can start running ROS 2 applications in your browser today!