Skip to content

ACRES Core#

ACRES Core is the simulator without Unreal. It runs N independent Polaris environments on one shared ACRE world, on all CPU cores. It needs no GPU. The Python module is acres_core (acres_core).

What It Contains#

ACRES Core compiles the engine-free model files of the game without a change, and adds its own world layer.

Part Source Function
Models of the game Game/Source/Acres/AcresUtvModel.cpp, AcresVehicleModel.cpp, AcresSimModel.cpp, AcresSoilModel.cpp, AcresPowerModel.cpp, AcresSurfaceMap.cpp, AcresFarmModel.cpp, AcresEnvironmentModel.cpp, AcresEpisodeLog.cpp and the regional files The Polaris, the tire and soil, the power, the surfaces, the farm, the weather and the episode log. The list is in Game/Core/CMakeLists.txt.
Rigid body Game/Core/Source/AcresCorePolaris.h The chassis of the Polaris. A ray from each suspension mount finds the terrain. The step is the semi-implicit Euler step of Chaos.
World Game/Core/Source/AcresCoreWorld.h, AcresCoreTerrain.h The terrain, the surface map, the soil grids, the field raster, the crop patches and the places. One read-only copy for all environments.
Farm Game/Core/Source/AcresCoreFarm.h The ruts and the crushed crop of each environment.
LiDAR Game/Core/Source/AcresCoreLidar.h, AcresCoreScene.h The ray-cast Helios (1800 columns x 32 rings at 10 Hz) and a planar scan of 360 beams, against the terrain, the scene and the objects on the path.
Batch Game/Core/Source/AcresCoreBatch.h N environments that step together.
Python module Game/Core/Python/acres_core_module.cpp The pybind11 binding.
Scene data Game/Core/Data/acre_scene.json, Game/Core/Data/acre_scene.triangles.f32 The buildings, the grain bins and the trees as simple shapes. Game/Core/Scripts/build_scene.py makes them.

Data Flow of One Step#

One control step of the ACRES Core batch: the command rows go to N environments on the thread pool. Each environment reads its row and runs 12 physics steps: drive-by-wire, steering and powertrain, wheel contacts, driveline solve, farm stamps, rigid body. Then the batch publishes the state arrays. The episode log and the LiDAR scan are optional. One control step of the Core batch, 0.1 s INPUTS EACH ENVIRONMENT, ON ONE THREAD OF THE POOL OUTPUTS Command rows shape (N, 18), ds_dbw units NaN mode: no message Shared world terrain, surface map, soil units, crop patches, obstacle scene read-only for all threads Environment settings soil-water scenario, Polaris parameters FAcresBatch::Step 1 Read the command row new messages, subsystems that the caller holds 12 physics steps of 1/120 s A held command arrives again each 6 steps (20 Hz). 2 Drive-by-wire watchdog, actuators, ULC StepDbw 3 Steering and powertrain road wheels, engine, CVT StepUtvPowertrain 4 Four wheel contacts ray cast, surface, soil water PrepareUtvWheel 5 Driveline solve wheel speeds, tyre forces, fuel SolveUtvDriveline 6 Farm stamps tyre and body marks: crushed crop, ruts 7 Rigid body and energy ledger forces, semi-implicit Euler step AccountChassis 8 Publish the arrays one row for each environment Episode log, optional MCAP, one state message for each physics step State arrays state (N, 49) wheels (N, 4, 13) energy (N, 24) zone_crushed (N, 8) LiDAR scan, optional ray casts from the new poses lidar() The thread pool runs all environments at the same time. One environment uses one thread. The result does not change with the number of threads.
One control step of 0.1 s for each environment, on one thread of the pool. Open the diagram
  1. The caller gives one drive-by-wire command row for each environment, or curvature and speed.
  2. The batch steps each environment 12 physics steps of 1/120 s (0.1 s) in parallel. One environment is stepped by one thread only.
  3. A command row counts as a message at the first physics step. The batch sends it again each 6 physics steps (resend_steps) while it is held. A NaN mode is no message: the subsystem then times out after 0.1 s, as on the vehicle.
  4. In each physics step, the model of the game computes the drive-by-wire, the powertrain and the four wheels. The rigid body integrates the chassis.
  5. The farm gets the stamps of the tires and of the body.
  6. The batch fills the arrays of the state, the wheels and the energy.

The Game and ACRES Core#

ACRES Core and the game side by side: the two simulators compile the same engine-free model sources and read the same data. The game adds the Chaos body, the renderer, the GPU sensors, the weather and the Maxxum. ACRES Core adds its own rigid body, terrain, obstacle scene, ray-cast LiDAR and batch. The Python module and core_sim use ACRES Core. Two simulators, one set of model sources THE GAME ADDS SHARED BY THE TWO SIMULATORS ACRES CORE ADDS The game (Unreal Engine) Chaos rigid body chassis integration, collisions Collision mesh ray casts for the wheel contacts Renderer and GPU sensors camera, GPU LiDAR, GNSS, INS Weather and water grid sky, rain, soil-water thread Traffic and workers farm vehicles, persons Maxxum and implements tractor, hitch, PTO Engine-free sources Vehicle and drive-by-wire AcresUtvModel AcresVehicleModel AcresSimModel Soil, tyre and energy AcresSoilModel AcresPowerModel Farm, surface and weather AcresFarmModel AcresSurfaceMap AcresEnvironmentModel Episode log writer Configuration and ACRE map compiles compiles reads reads ACRES Core (libacres_core) Rigid body of the Polaris semi-implicit Euler, 1/120 s Terrain survey triangles, exact ray casts Obstacle scene buildings, bins, trees, collisions Ray-cast LiDAR Helios pattern, planar pattern Farm state crushed crop, ruts, soil water Batch N environments, thread pool INTERFACES AND USERS Three local sockets bridge, control channel, sensor stream ROS 2 bridge sim_bridge same topics for the two simulators core_sim same sockets acres_core Python module Your code A ROS 2 node sees the same interfaces from the game and from core_sim. Your code steps thousands of Core environments from Python.
The two simulators compile the same engine-free model sources and read the same data. Open the diagram
Item The Game ACRES Core
Vehicles The Maxxum with implements, and the Polaris The Polaris
Chassis integration Chaos Its own rigid body with the step of Chaos
Terrain The collision mesh of the level The terrain triangles of the same survey
Sensors Camera, GPU LiDAR, INS, GNSS, IMU, CAN Ray-cast LiDAR, INS and wheel signals
Environments in one process One world with up to 8 agents A batch of independent environments
Episode log Yes Yes, the same format

ACRES Core has no camera. The two simulators use the same model code, but different chassis integrators and terrain geometry. Thus their trajectories are near, not equal. Validation Results gives the comparison.

Build and Test#

PYTHON=$(command -v python) Game/Core/build.sh            # build, then the fast tests
PYTHON=$(command -v python) Game/Core/build.sh --all      # every test except golden and bench

The build folder is Game/Core/Build. It has libacres_core.so, libacres_core_static.a, the module acres_core*.so, the test programs (Tests/Core/*_tests.cpp) and the tools core_replay and lidar_compare. Build and Test Commands gives the options.

The build uses fixed numerical options: -O2 -ffp-contract=off -fno-fast-math. Thus two machines with the same compiler give the same numbers.

Tools#

Command Function
Game/Core/Scripts/bench.py The throughput of the batch.
Game/Core/Scripts/replay_logs.py ACRES Core against the recorded drive-by-wire logs and the test stand.
Game/Core/Scripts/compare_unreal.py, Game/Core/Scripts/unreal_dbw_replay.py ACRES Core against the game on the same commands.
Game/Core/Scripts/compare_lidar.py The Core LiDAR against the GPU LiDAR of the game.
Game/Core/Scripts/build_scene.py The scene data from the placed meshes of the level.

Simulation Commands gives each command.

Users of ACRES Core#

  • The run-time library (Vehicle/Runtime/) contains ACRES Core. Its fleets and skills drive Core environments.
  • The ROS 2 server core_sim (Vehicle/ROS/acres_core_sim) puts ACRES Core behind the sockets of the game.
  • The LiDAR data set tools (Data/) make simulated scans.