Skip to main content

dummy.rs — Development Simulator

The simulator generates realistic fake rover data so the UI can be developed and tested without physical hardware. It is started via the start_dummy_streams or start_detection_sim commands from network.rs and stopped with stop_dummy_streams.

Stream table

Each stream has an independent send interval and a generator function that produces time-varying data:

Stream

Interval

Notes

IMU

20ms (50Hz)

Sinusoidal accelerometer, gyro, magnetometer

GPS

200ms

Slow position drift around a fixed coordinate (52.2297°N, 6.8978°E)

pH

500ms

pH value oscillating around 7.0

Arm control signals

50ms

Simulated joint control inputs

Arm diagnostics

500ms

6 motors with dummy RPM/voltage

Arm feedback

100ms

Occasionally simulates an obstruction error

Arm positions

50ms

All joint angles oscillating

Arm target

200ms

Target XYZ + jaw state

Arm obstructions

300ms


Drive diagnostics

500ms

6 drive + 4 steering motors

Drive motor

50ms

Distance to go, turning radius

Drive progress

100ms

Countdown from 10m

Sensor board diagnostics

500ms

Composite board health snapshot

Detected objects

50ms

Generates up to 12 bounding boxes for objects

Network simulation

The simulator can optionally apply jitter (random delay up to jitter_ms) and packet loss (random drop with probability packet_loss) to simulate real wireless conditions. The full simulator uses 30ms jitter and 2% packet loss; the IMU-only simulator uses no jitter or loss.