Abstract
In this workshop, we will learn how to build a simulator for a robot, using the Bevy framework and a physics engine.
To keep the project doable in a day, the robot will be a simple line follower. However, the approach is generalizable to any robot, and the simulation will be extremely accurate, running deterministically in its own time reference and with a high-frequency simulation loop (like 10kHz).
Moreover, the robot configuration and control logic will be implemented in Rust but compiled to WASM, distinctly from the simulator. This clear separation between the simulator and the robot will allow fast iteration in robot experiments. It will also make it easy to collect telemetry data sets related to simulation runs, which in turn will provide deep insight into the robot’s behavior, enabling us to improve it in every iteration.
After this workshop, the participants will know how to:
- Implement a robotic simulator using Bevy.
- Properly virtualize time in the simulation, making it deterministic and as accurate as needed.
- Collect telemetry data sets from the simulation and explore them side by side with a visual rendering of the robot activity.
- Separate and sandbox the robot logic implementation using WASM components.
We will also see how this approach differs from a ROS-based implementation. While it is not possible to also have a hands-on experience of ROS in the same workshop, the tradeoffs between the two approaches will be clearly apparent.