RoboTracer Sim

PID Studio Pro

Senior track 240×140 cm (markers removed), 2 cm line, 15×15 cm robot, PID at 200 Hz (every 5 ms). Drag the time bar to see the position and position value at that moment

0.000 s
Chart

Values at this time

750position (0 to 1500)
0error = position − 750
PID output0 Motor left / right0 / 0 Robot speed0 cm/s Position x, y0, 0 Heading0° Line statusLine seen

Left = sensor 0, right = sensor 15. Position is computed the same way as calPoint() (100 units per sensor)

Detected segments (same detector as the library)

Detector settings

The in/out bands use |error| (100 units per sensor). Straight = stays inside the band for "Hold in band"; curve = stays outside the band for "Hold out of band". Curve time is measured backwards; curves shorter than the minimum count as oscillation

Record and replay (LinePro functions)

Runs ARecord with the tuning below over the full Senior track route, then runs AReplay from the start using the recorded segments. Uses the same segment detector, wait time and segment-end conditions as the library

Track from real data

The simulated robot runs its own PID on the line reconstructed from a real run (using the tuning below). The dashed line in the chart is the position the real robot read; use it to see how closely the simulator matches reality

Real robot data

Position values logged by the real robot every 5 ms (speed 90, Kp 0.3, Kd 0.009). Robot position and heading are reconstructed from the motor commands using the model. The white line is the line the sensors saw, drawn from the readings

Tuning (as in the real code)

Names and meanings match ARecord(speed, Kp, Ki, Kd, turnN, slowrage, …). Recomputes automatically when a value changes

Robot, track and start conditions

The 15×15 cm body, Ø23 mm wheels and 16MuxV3 board position follow the design files. Acceleration and turning combine motor force and tyre grip; wheel load shifts with acceleration and a lifted front returns under gravity. Mass, centre of gravity, inertia, fan downforce and sensor range are adjustable defaults, not yet fully measured on the real robot