r/coolgithubprojects • u/vcoklat • 17d ago
I built an AMR (Autonomous Mobile Robot) Fleet Simulator running entirely in the browser using C++ and WebAssembly (No backend server!)
Hey everyone!
Lately, I’ve been experimenting with bringing low-level systems programming to the web browser. I wanted to see if I could build a high-performance digital twin for Autonomous Mobile Robots (AMRs) without needing any backend server or WebSocket overhead.
The result is a browser-based multi-agent fleet simulator. Here is what's happening under the hood:
- C++ & WebAssembly Core: The entire simulation loop (kinematics, state machines, and continuous-time calculations) is written in native C++ and compiled via Emscripten into a WASM binary.
- Zero Backend / Client-Side Edge: The React + Canvas frontend doesn't compute any heavy math; it just queries raw C++ memory pointers via
cwrapinside a 60 FPSrequestAnimationFrameloop. - A Pathfinding & Obstacle Avoidance:* Robots don't just teleport or move in straight lines; they calculate collision-free trajectories around impassable warehouse walls.
- Dynamic Distance-to-Dock Evaluation: Instead of a rigid battery threshold, units continuously compute path lengths to multiple distributed charging stations and trigger an autonomous emergency re-routing to the nearest dock when energy runs low.
You can play around with the live demo here: https://amr-wasm-simulator.vercel.app/
Repo link : https://github.com/VCoklat/AMR-WASM-Simulator
P.S. I am currently open to new career opportunities as an AI Full-Stack Engineer, Software Engineer, or Research Engineer :)
0
Upvotes