Simulation Commands#
This page describes the commands that run the simulators, compare them, and make data sets. Run each command from the root of the repository unless the text gives a different folder. Commands gives the conventions of the synopsis.
Most Python commands need the built modules on the Python path:
ACRES Core Commands#
bench.py#
Measures the throughput of ACRES Core. N environments drive with commands that change in each step. The output is the simulated seconds for each wall second, with and without the farm stamps, and the LiDAR throughput.
--root DIR- The repository. Default: the repository of the script.
--envs N- The environments. Default: 64.
--seconds X- The simulated time of each environment, s. Default: 20.
--json PATH- Also writes the result to a JSON file.
PYTHONPATH=Game/Core/Build python Game/Core/Scripts/bench.py --envs 64 --seconds 20 --json /tmp/bench.json
replay_logs.py#
Replays the recorded drive-by-wire logs of the Polaris in ACRES Core and in the engine-free test stand, and compares the two.
python Game/Core/Scripts/replay_logs.py [--root DIR] [--build DIR] [--out DIR] [--json PATH] [--figures DIR]
[--episode-log PATH [--expect-digest TEXT]]
--build DIR- The Core build folder. Default:
Game/Core/Build. --out DIR- The output folder. Default:
acres-core-replayin the temporary folder. --json PATH- The summary JSON. Default:
OUT/replay_logs.json. --figures DIR- The folder of the figures.
--episode-log PATH- Replays the farm records of this MCAP episode log.
--expect-digest TEXT- With
--episode-log: the state digest of the game.
compare_unreal.py#
Compares ACRES Core with the game on the same drive-by-wire commands.
python Game/Core/Scripts/compare_unreal.py (--bag PATH | --session DIR --commands PATH | --follower-all) [OPTIONS]
--bag PATH- A recording: a rosbag2 folder,
.db3or.mcap. --session DIR,--commands PATH- A game session that
unreal_dbw_replay.pydrove, and itscommands_sent.csv. --session2 DIR,--commands2 PATH- A second game session of the same log, for the spread.
--follower-all,--only ID...- Each run of
$POLARIS_FOLLOWER/sim/configs.json, or only these runs. --content-commit TEXT,--content-dir DIR- Compares on the map of this commit, or of this
Content/Simulationfolder. --overrides TEXT- Polaris parameters
key=value;..., as-PolarisSet=of the game. --game-drop- Starts with the drop of 0.2 m of the game. Default: a settled start.
--farm-water,--no-farm-water- The wheels read the soil water of the farm, or the water of the surface templates.
--every X,--warmup X,--horizon X- The start interval of the windows (default 10 s), the warm-up of a window (3 s) and its length (10 s).
--json PATH,--figure-dir DIR- The output files.
--selftest- Compares Core with itself through the
--sessionpath.
unreal_dbw_replay.py#
Plays a recorded drive-by-wire command log into the running game (the Polaris).
python Game/Core/Scripts/unreal_dbw_replay.py [--run NAME | --commands PATH] [--port N] [--place ID | --start E,N,HDG]
[--speed X] [--settle X] [--tail X] [--out DIR] [--selftest]
--run NAME- A log of
Tests/Game/Polaris/Data. Default:dbw_direct_test_01. That folder is not in the repository.python Tests/Game/Polaris/polaris_dbw.py extractmakes it from local recordings of the vehicle. --commands PATH- Another command CSV in place of
--run. --port N- The vehicle bridge port of the game. Default: 5556.
--place ID- The start place of
places.json. Default:spawn-icsc-garage. --start E,N,HDG- A start pose: east, north and compass heading in degrees of
base_footprint. --speed X,--settle X,--tail X- A rolling start speed (m/s), the hold time of a standing start (default 3 s) and the record time after the last command (default 2 s).
compare_lidar.py#
Compares the ray-cast Helios of ACRES Core with the GPU LiDAR renders of the game at the same poses.
python Game/Core/Scripts/compare_lidar.py [--work DIR] [--label TEXT] [--poses N] [--crops [--game-rules]] [OPTIONS]
--work DIR- The folder of the renders. Default:
$POLARIS_LIDAR_WORK, elselidar_simin$POLARIS_EPISODES. --poses N- The number of poses. Default: 60.
--crops,--game-rules- The Core scan with crops and grass cover, and with the rules of the game.
--sensors PATH- The sensor file of the renders. Default:
Game/Content/Simulation/sensors_polaris.json. --bin PATH,--scratch DIR,--summary PATH,--figure PATH- The
lidar_compareprogram, the work folder, the summary and the figure.
build_scene.py#
Exports the LiDAR geometry of ACRES Core from the placed Unreal meshes into Game/Core/Data/acre_scene.json.
python Game/Core/Scripts/build_scene.py [--level PATH] [--meshes DIR] [--obstacles PATH] [--out PATH] [--episodes DIR]
core_replay#
Replays a recorded drive-by-wire log of the Polaris through ACRES Core and the test stand on flat ground. It writes PREFIX_core.csv and PREFIX_bench.csv with one row for each 120 Hz step.
--ground SURFACEbench_asphalt,bench_grass,bench_gravelor a surface oftractor.json.
lidar_compare#
Makes ray-cast Helios scans at a list of poses (name,x,y,z,qx,qy,qz,qw,yaw_rad for each line). It writes one .scan file for each pose.
Game/Core/Build/lidar_compare --root DIR --poses PATH --out DIR [--noise] [--crops] [--game-rules]
[--crop-date YYYY-MM-DD] [--sensors PATH]
Run-Time Library Commands#
acres_fleet.baseline#
Makes the baseline of the scouting task with one function of the library (acres_runtime_baseline_run).
python -m acres_fleet.baseline --out DIR [--threads N] [--slots N] [--conditions LIST] [--fields LIST]
[--tables-dir DIR] [--reference DIR] [--no-report] [--map NAME]
--out DIR- The output folder. Required.
--threads N- The threads of the pool of the library. Default: 8.
--slots N- The slots of the fleet. Default: 3 for each thread.
--conditions LIST- The condition sets. Default:
dry,wet,shift. --fields LIST- Only these fields, for example
F04,RF004. --tables-dir DIR- Reads the cost tables of this folder and drives none.
--reference DIR- The recorded reference of the chain.
--no-report- Makes no report files.
--map NAME- The map by its name. Default:
ACRES_MAP, else the default map.
PYTHONPATH=Fast:Benchmark:Vehicle python -m acres_fleet.baseline --out /tmp/baseline --threads 8 --fields F56,F04
acres_fleet.tables#
Drives the cost tables of the tree with the library and writes them to the cache.
--threads N- Default: 8.
--conditions LIST- Default:
dry,wet,shift. --folder DIR- The output folder. Default: the folder of the identity in the cache.
--map NAME- The map by its name.
acres_fleet.maps#
Lists the maps with their hashes, drives their cost tables, or runs one command for each map.
python -m acres_fleet.maps [--tables LIST|all] [--threads N] [--run LIST|all [--jobs N] [--out DIR] -- COMMAND...]
--tables LIST- Drives the cost tables of these maps.
--run LIST- Runs the command after
--for each map, withACRES_MAPset. In the command,{map}is the name of the map and{out}isOUT/MAP. --jobs N- The processes at one time for
--run. Default: 1.
python -m acres_fleet.maps
python -m acres_fleet.maps --tables acre-split
python -m acres_fleet.maps --run default,acre-split --jobs 2 -- python -m acres_fleet.baseline --out {out}
acres_runtime_baseline_all#
The whole baseline in C++, with no Python.
Vehicle/Runtime/Build/acres_runtime_baseline_all --root DIR --out DIR [--threads N] [--slots N] [--conditions LIST]
[--fields LIST] [--tables DIR] [--reference DIR]
With --reference, the last line is BASELINE_PASS or BASELINE_FAIL.
acres_runtime_planner#
Drives the cost tables, or plans missions from the tables.
Vehicle/Runtime/Build/acres_runtime_planner tables --root DIR --segments PATH --out DIR [--conditions LIST] [--slots N] [--threads N]
Vehicle/Runtime/Build/acres_runtime_planner plans --root DIR --map PATH --tables DIR --missions PATH --out PATH
[--home DIR] [--threads N] [--repeat N]
The last line is PLANNER_DONE or PLANNER_FAIL.
acres_runtime_game_crosscheck#
Drives scouting missions through the local sockets of a simulator in lockstep (the game or core_sim), and compares the results.
Vehicle/Runtime/Build/acres_runtime_game_crosscheck drive --root DIR --tables PATH --control-port N --bridge-port N
--missions LIST --out DIR [--wait X] [--threads N] [--extra-s X]
Vehicle/Runtime/Build/acres_runtime_game_crosscheck compare --core DIR --game DIR --out PATH
Vehicle/Runtime/Build/acres_runtime_game_crosscheck planner --control-port N --root DIR --out DIR
Vehicle/Runtime/Build/acres_runtime_game_crosscheck realtime --mission FIELD --control-port N --bridge-port N
The last line of drive is GAME_DRIVE_DONE or GAME_DRIVE_FAIL.
Other Run-Time Tools#
| Command | Function |
|---|---|
Vehicle/Runtime/Build/acres_runtime_baseline --root DIR --reference DIR --set F\|S\|R [OPTIONS] |
Drives the prepared missions of a recorded reference through the fleet. |
Vehicle/Runtime/Build/acres_runtime_record_reference --root DIR --out DIR [--threads N] [--slots N] [--sets S,F,R] [--fields LIST] [--tables DIR] [--commit TEXT] |
Records the reference of the compiled chain. refresh.sh calls it. |
Vehicle/Runtime/Build/acres_runtime_checker_dump --root DIR --out PATH [--stride N] |
Writes each verdict of the checker plug-in to a file, for a comparison of two builds with cmp. |
python Vehicle/Runtime/Reference/compare_reference.py OLD NEW [--sets S,F,R] [--rows N] [--out PATH] |
Compares two recorded references mission by mission. |
python Tests/Runtime/baseline_regression.py DIR [--golden PATH] [--write [--commit TEXT] [--sim-version N]] [--before-refresh] |
Compares a baseline folder with the golden rows (Tests/Runtime/baseline_golden.json). |
python Tests/Runtime/cost_tables.py [--threads N] |
The cost tables of the tree in the cache. A CTest fixture. |
LiDAR Data Set Commands#
The package acres_data reads and writes the LiDAR data set format (Data Sets). The data root is the folder of ACRES_DATA, else ~/data/acres/lidar.
acres_data.generate_core#
Makes a simulated LiDAR set from ACRES Core: single-field missions that the default driver drives, with the 32-ring pattern at each control step (10 Hz).
PYTHONPATH=Data:Sim ACRES_RUNTIME_BUILD=Vehicle/Runtime/Build python -m acres_data.generate_core [OPTIONS]
--set NAME- The name of the set below the data root. Default:
core-v1. --out DIR- The folder of the set. It replaces
--set. --fields-tile TRAIN,VAL,TEST,--fields-region TRAIN,VAL,TEST- The fields of the tile (default
12,3,3) and the regional fields (default8,2,2) of each split. --seed N- Default: 0.
--max-steps N- The longest mission in control steps. 0: no limit. Default: 9000.
--workers N- Default: 8.
--only TEXT,--list- Runs only the jobs whose name has this text, or lists the jobs.
--record PATH- Writes the counts to a JSON file.
--crops,--sweep- Adds the crops, the ground cover and the intensity layer. Traces each column from the pose at its firing time.
Other Data Set Commands#
| Command | Function |
|---|---|
python -m acres_data.replay_core [--real SET] [--set SET] [--stride N] [--splits LIST] [--crops] [--sweep] [OPTIONS] |
The simulated twin of a real set: ACRES Core scans at the poses of the real scans. |
python -m acres_data.convert_polaris [--bag PATH] [--pose PATH] [--out DIR] [--workers N] [--record PATH] [--limit-sections N] |
Converts a recorded drive of the Polaris to the data set format. |
python -m acres_data.convert_extract [--extract DIR] [--out DIR] [--workers N] [--record PATH] |
Converts the sampled scans of earlier Polaris recordings. |
python -m acres_data.convert_game --run DIR --name NAME [--set SET] [--split NAME] [--workers N] [--record PATH] |
Converts a sensor episode of the game (PLY scans). |
python -m acres_data.compare fit\|show\|gap [OPTIONS] |
The gap between the simulated and the real LiDAR, and the fit of the sensor-matching step. |
python -m acres_data.speed [--sets SET...] [--splits SPLIT...] [--past N] [--samples N] [--workers N...] [--seed N] [--out PATH] |
The read rate of the PyTorch data set. |
The recordings of the real Polaris are not in the repository.
Game Control Tools#
These tools start the packaged game (Packaged/Linux/Acres.sh) and drive it through the sockets. Start only one game at a time.
| Command | Function |
|---|---|
python Tools/SimControl/lockstep_determinism.py --out DIR [--runs N] [--seconds X] [--game packaged\|editor\|core] [--headless] [--npc] |
Starts the game N times with the same seed and commands, and compares the Polaris trajectories. |
python Tools/SimControl/crosscheck_missions.py --output DIR [--fields LIST] [--stages core,game,report] [OPTIONS] |
Scouting missions in ACRES Core and in the game, with the measures of both episode logs. |
python Tools/SimControl/game_crosscheck.py --out DIR [--fields LIST] [--stages core,game,compare] [--offscreen] [OPTIONS] |
The same cross-check with acres_runtime_game_crosscheck. |
python Tools/SimControl/check_planner_support.py --output DIR [--port N] [--start] [--tool PATH] [--game PATH] |
Checks the operations clock, observe and skill and the channel /acres/events. |
python Tools/SimControl/render_check.py capture --out DIR [OPTIONS] |
Captures the camera, the GPU LiDAR and the main view at fixed poses. |
python Tools/SimControl/render_check.py compare A B [--floor DIR] [--json PATH] |
Compares two captures image by image and scan by scan. |
python Tools/SimControl/can_over_ros_check.py --out DIR [--seconds X] [--curvature X] [--throttle X] |
Drives the Maxxum through its J1939 bus over ROS 2. |
python Tools/SimControl/compare_episodes.py A.mcap B.mcap |
Compares the agent trajectories of two episode logs step by step. |
python Tools/SimControl/contact_sheet.py --output PATH --cell LABEL\|FILE... [OPTIONS] |
Makes one labelled contact sheet from pictures. |
python Tools/SimControl/game_manoeuvres.py record --out DIR [--only NAME...] |
Drives the Maxxum's manoeuvres in the game with each implement on three soils and two loads, in the form of the recordings of ACRES Core. |
python Tools/SimControl/game_manoeuvres.py compare --runs DIR [--json PATH] |
Compares each recording with ACRES Core and with the fast simulator. |
fast_episode.py#
Shows a run of the fast simulator in the game, for each procedure task (p1, p2, p3, p4) and each solver, for T4 (t4, t4_truck), for T5 (t5) and for each skill (drive to mow_lane, for example mow for K17). Source: Tools/SimControl/fast_episode.py, Fast/acres_batch/episode_log.py.
python Tools/SimControl/fast_episode.py record TASK --agents N --scene K --solver NAME --out RUN.json
python Tools/SimControl/fast_episode.py log RUN.json --origin E N YAW_DEG [--date D] [--hour H] [--speed S] [--start T] --out RUN.mcap
record runs the solver on one scene of the test bank and writes the event log and RUN.scene.json (the bank of the scene: T4, T5 and the skills make the scene again from it). It needs the GPU and the environment of Benchmark/acres_bench/drive/env.sh. log runs the record again, keeps the states in RUN.states.npz and writes the episode log. It needs PYTHONPATH=Game/Core/Build. The scenes of P1 and P3 have their own frame: --origin puts them on the map. For P2 and P4, use --origin 0 0 0.
python Tools/SimControl/fast_episode.py record p1 --agents 2 --scene 0 --solver reference --out hay.json
PYTHONPATH=Game/Core/Build python Tools/SimControl/fast_episode.py log hay.json --origin -673.7 -57.2 -15 \
--date 2026-04-25 --hour 11 --speed 10 --out hay.mcap
Packaged/Linux/Acres.sh -VehicleDemo -NoHUD -ReplayDirector -EpisodeReplay=$PWD/hay.mcap -EpisodeReplayExit \
-EnvDate=2026-04-25 -CropSeason=2026 -CropStage=date -DriveRegion
The game shows the poses of the fast simulator. The physics of the game does not run. A cubic curve joins the poses of two decisions.
Performance Tools#
benchmark_linux.py#
Benchmarks the packaged game at 1920 x 1080: the frame rate, the physics rate and the peak GPU memory.
--name NAME- The name of the run folder in
Game/Saved/Performance. Required. --vehicle maxxum|polaris- Default:
maxxum. --sensors,--sensor-stream- Records the sensors (
-SensorRecord), or turns on each sensor without files. --drive-region,--field-loop- The regional ground, and the spawn of the field loop.
--render-tier auto|low|high- Default:
auto. --warmup X,--duration X- Default: 15 s and 15 s.
--steer X- The road wheel angle of the Polaris circle, rad.
--extra TEXT,--exec TEXT- More game options, and console commands at the start.
--gpu-reserve-mib N- Stops the game when the device usage enters this reserve. Default: 1536.
--require-realtime- Fails unless the run has 60 FPS, a frame p95 of 16.67 ms or less and a physics rate of 119 Hz or more.
Other Performance Tools#
| Command | Function |
|---|---|
python Tools/Performance/lockstep_benchmark.py --name NAME [--steps N] [--warmup N] [--agents N] [--batched] [--rollout] [OPTIONS] [-- FLAGS] |
The wall time for each 0.1 s of simulation in lockstep. |
python Tools/Performance/full_scene_benchmark.py --prefix TEXT --evidence PATH [--only LIST] [--collect] [OPTIONS] |
Runs the benchmark matrix with benchmark_linux.py and writes one evidence file. |
python Tools/Performance/shm_check.py [--game PATH] [--base N] [--nullrhi] |
Checks the shared-memory camera images of -SensorShm. |
Model Tests of the Game#
| Command | Function |
|---|---|
python Tests/Game/Polaris/polaris_dbw.py extract\|fit [--write]\|replay RUN OUT |
The offline fit of the drive-by-wire model to the logs of the vehicle. --write writes the values into polaris.json. |
python Tests/Game/EpisodeLog/gen_schemas.py |
Writes Game/Source/Acres/AcresEpisodeSchemas.h from the message definitions. |
python Tests/Game/EpisodeLog/check_ros.py |
Checks that ROS 2 reads the episode log of the test. Run it in the ros2 environment. |