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#
- The caller gives one drive-by-wire command row for each environment, or curvature and speed.
- 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.
- 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. - 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.
- The farm gets the stamps of the tires and of the body.
- The batch fills the arrays of the state, the wheels and the energy.
The Game and ACRES Core#
| 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.