VEX Simulators

VEX V5 simulators are useful for debugging user programs without access to a real robot. This chapter describes the vexide/pros-rs ecosystem of simulator-related applications and how to write compatible software.

Components of a Simulator

The following components are the most essential parts of a VEX simulator. Applications might implement one or more of these, or fill a supporting role not listed.

Code Execution Backend (the "Simulator")

The code executor is probably the most important part of the simulator. Its job is to interpret user programs along with inputs like joystick controls and peripherals state in order to decide what the robot would do in real life (serial output, peripherals output, warnings, panics, etc). It might be implemented using a virtual machine, using a WebAssembly engine, or through dynamic library loading.

There are several code executors for VEX simulators, in varying stages of completion. Here are a few of the ones I know about:

Physics Backend

This is a piece of software that decides robot and peripheral state (including velocity, temperature, etc.). It tells the code execution backend about the world state so that the simulated robot code can react to it.

Frontend

The simulator frontend is usually the only part the user sees. It combines information from the physics backend and output from the code executor to show and overview of the simulation's progress. It also sends user input (e.g. joystick/touch) to the code executor to act accordingly.

  • vexide/pros-simulator-gui

    A cross-platform Tauri application, it uses pros-simulator's frontend interface to start and manage a compatible simulator.