C++ Headers#
This section lists the public declarations of each C++ header. The pages come from the /// comments in the source code.
Generated Run mkdocs build to generate the pages again. Write Documentation says how these pages are made.
| Source Tree | Folder | Headers |
|---|---|---|
| Game module | Game/Source/Acres |
60 |
| ACRES Core | Game/Core/Source |
14 |
| acres_sim | Vehicle/ROS/acres_sim/include/acres_sim |
6 |
| acres_core_sim | Vehicle/ROS/acres_core_sim/include/acres_core_sim |
5 |
Only public members are in the reference. The Game describes the Unreal side.
Vehicles#
| Header | Description |
|---|---|
AcresVehicle.h |
The tractor (and its trailed implement) as an Unreal pawn: the glue between the SI vehicle model and Chaos, Unreal's physics engine. |
AcresVehicleModel.h |
Tractor dynamics: tyres, soil contact, suspension, drivetrain and steering (pure C++, no Unreal objects). |
AcresUtvModel.h |
Polaris Ranger CREW XP 1000 dynamics and its Dataspeed drive-by-wire (DBW) layer (pure C++, no Unreal objects). |
AcresSimModel.h |
Small engine-independent vehicle helpers: engine torque curve, wheel slip ratio and Ackermann steering. |
AcresSoilModel.h |
Soil library and tyre-soil terramechanics (pure C++, no Unreal objects). |
AcresPowerModel.h |
Engine fuel map and the vehicle energy ledger (pure C++, no Unreal objects). |
AcresCommandTiming.h |
When a controller's commands reach the physics: each message applies at the physics step that matches the time it arrived (pure C++, no Unreal objects). |
AcresAgents.h |
Which vehicles a session drives, and each one's own settings (single- and multi-agent sessions). |
Implements and Rigs#
| Header | Description |
|---|---|
AcresImplementModel.h |
Implement-soil interaction for the Maxxum's eight attachments (pure C++, no Unreal objects). |
AcresImplementCoupling.h |
Glue between the soil library (AcresSoilModel.h), the implement model (AcresImplementModel.h) and the places that drive it: the pawn (AcresVehicle.cpp) and the menu's validation (AcresSession.cpp). Pure C++ in SI units, no Unreal types, so Tests/Game/Implement builds and tests it. |
AcresFieldWorkModel.h |
What field work leaves on the ground: the visible surface of tillage, drilling, spraying, tyres and the backhoe, from the same physical state the implement and tyre models use. Pure C++ in SI units, no Unreal types, so Tests/Game/Implement builds and tests it. |
AcresRig.h |
Data-driven rigs for the farm-equipment and Polaris skeletal meshes (Game/Raw/farm-equipment). |
Farm, Soil and Water#
| Header | Description |
|---|---|
AcresFarmRuntime.h |
The live farm: crops, soil water, ruts and the harvester, wired into the Unreal world. |
AcresFarmModel.h |
Crop and soil-water maths for the farm (pure C++, no Unreal objects, no wall-clock time). |
AcresSoilVisuals.h |
Render-only ground effects for the farm: rut tiles, field-work detail, standing water and cosmetic particles. |
AcresFieldSetup.h |
Per-session field configuration from the menu's Fields tab: crop type, soil, starting wetness and terrain edits. |
AcresSurfaceMap.h |
Ground surface classes of the ACRE tile from vector polygons (pure C++, no Unreal types; Tests/Game/Vehicle builds and tests it). |
AcresCrops.h |
|
AcresPlaces.h |
Named places on the ACRE tile (Content/Simulation/ACRE/places.json, written by Map/places.py from the "ACRE Map Labels" page) and the spawn places the simulator starts from. |
Weather#
| Header | Description |
|---|---|
AcresEnvironment.h |
Unreal adapter for the weather model: steps AcresEnv::Model and drives the sky, light, fog and rain from it. |
AcresEnvironmentModel.h |
Weather, sky and clock model for the ACRE site (pure C++, no Unreal objects). |
Sensors#
| Header | Description |
|---|---|
AcresSensors.h |
Synthetic sensor episode recorder for the ACRE tractor: truth, actions, GNSS, IMU, LiDAR, camera and CAN. |
AcresCameraModel.h |
Photometric and geometric model of a machine-vision RGB camera, applied on the CPU to the scene-capture render. |
AcresLidarModel.h |
Radiometric and multi-return LiDAR model shared by the CPU-proxy and GPU ray-tracing paths. |
AcresLidarPhysics.h |
Engine-free pieces of the LiDAR radiometry that the Helios calibration added: the Minnaert incidence law, the peak loss of an echo stretched by a grazing footprint, the in-plane divergence of an elliptical beam, and a deterministic footprint-scale surface micro-slope. Plain C++ (no Unreal types) so that Tests/Game/Lidar/lidar_tests.cpp can check them against the Python fit. AcresLidarModel.cpp and AcresSensors.cpp call these; every function is inline and allocation-free. |
AcresLidarGpu.h |
GPU LiDAR: traces scan rays against the renderer's ray-tracing scene with inline ray queries. |
AcresGnssModel.h |
GNSS receiver model for the sensor recorder, in the position domain. |
AcresGeoUtm.h |
Universal Transverse Mercator projection (pure C++, header only, no Unreal types). |
AcresSensorStream.h |
Binary sensor stream: one vehicle's heavy sensor data (full organized LiDAR clouds, camera images) and its 100 Hz INS epochs, live, as length-prefixed binary frames over a local TCP socket. The ROS 2 bridge (Vehicle/ROS/acres_sim, the sim_bridge executable) turns them into sensor_msgs; the JSON RL bridge (AcresRlBridge.h) carries the drive-by-wire commands and reports next to it. |
AcresRenderTier.h |
Render tiers and the pinned sensor render profile. |
Logs and Control#
| Header | Description |
|---|---|
AcresSessionLog.h |
Streaming 120 Hz tractor log for menu sessions: <session>/tractor.csv plus session-summary.json on close. |
AcresEpisodeLog.h |
The episode log: an MCAP file of ROS 2 messages (CDR) with every agent's state at the physics rate, the farm events, conditions, hardware shifts and the episode clock (Docs/Reference/files.md, "Episode Log"). Pure C++17, no Unreal types and no ROS: the game (AcresSimControl.cpp) writes and replays it, ACRES Core compiles the same file, and Tests/Game/EpisodeLog/build.sh tests it. The message layouts mirror Vehicle/ROS/acres_interfaces/msg; the schema texts are generated into AcresEpisodeSchemas.h (Tests/Game/EpisodeLog/gen_schemas.py). |
AcresEpisodeSchemas.h |
Generated by Tests/Game/EpisodeLog/gen_schemas.py from Vehicle/ROS/acres_interfaces and the ROS 2 message packages: the ros2msg definitions the episode log (AcresEpisodeLog.h) writes into its MCAP schema records. Do not edit; rerun the script after changing a message. |
AcresSimControl.h |
Simulator control: the session-wide channel the ROS 2 side (Vehicle/ROS/acres_sim) and learners use to pause, play and step the world in lockstep, reset it, move and spawn entities, change the conditions and the vehicles' hardware shifts, record the episode log and replay one. Protocol: Docs/Reference/channels.md (newline-delimited JSON on 127.0.0.1, -SimControl=<port>); episode log: Docs/Reference/files.md, "Episode Log". |
AcresRlBridge.h |
Live reinforcement-learning bridge: lets an external agent (a Python client such as acres_policy.unreal, or Vehicle/ROS/acres_sim) drive the player's tractor in the running game, with full rendering and sensors running, over one of two transports: |
AcresReplay.h |
Replay input: a recorded drive the tractor can follow again. |
AcresVideoCapture.h |
Application#
| Header | Description |
|---|---|
AcresShell.h |
Game mode, HUD and the free-fly inspection camera. |
AcresMenu.h |
Front end: the full-screen menu, the terrain-brush editor and the in-session pause menu. |
AcresSession.h |
A simulation session as configured in the front-end menu, and how it becomes a running simulation. |
AcresNpc.h |
Farm life: pickups and tractors that drive the farm roads, workers who walk and scout crops, and highway traffic on US 52 along the south edge of the farm. |
Acres.h |
Game: Other#
| Header | Description |
|---|---|
AcresBakeRegionCommandlet.h |
|
AcresCropMarks.h |
Render-only look of the crop patches that a machine changed, for each sample of a patch. |
AcresDenseGrass.h |
Dense short grass near the main view: grass choice A (the owner chose A on 19 Nov 2026). |
AcresDriveRegion.h |
|
AcresFieldMarks.h |
Marks of field work on the 25 cm cells of the farm, shared by the game and ACRES Core. Engine-free. |
AcresFields.h |
Numeric field ids of ACRES, shared by the game and ACRES Core. Engine-free. |
AcresLidarCanopy.h |
|
AcresLidarDayState.h |
|
AcresLidarGeometry.h |
|
AcresMapData.h |
|
AcresObjectContact.h |
|
AcresObjectScriptsShared.h |
|
AcresPathObjects.h |
Objects on the path that are not in the map: a truck, a tractor and a car (each a box) and a person (an upright cylinder), the objects of ACRES Core (Game/Core/Source/AcresCoreBatch.h, FAcresObject; Docs/Models/farm-traffic.md), in the game. |
AcresRegionCropData.h |
|
AcresRegionStreaming.h |
|
AcresRegionalMap.h |
|
AcresRouteGuide.h |
The route guide of a piloted session: the lane and road graph of the scouting map (Content/Simulation/ACRE/Scouting/scouting_map.json, the key "graph") and the shortest route over it from the vehicle to a destination. The route is a guide for a human driver. It sends no command to a vehicle. |
AcresSiteMap.h |
The map of the site as the simulator has it: a drawn picture made from the layers of the game. The ground surfaces (asphalt, concrete, gravel, grass lanes, grass, dirt, field ground) give the base. The fields get the colour of their crop and an outline. The buildings, the bins and the trees of the scene export (Scouting/obstacles.json) come on top. No aerial image is in it. The HUD shows it in the minimap, in the inset of a replay and in the map of the key M. |
ACRES Core#
| Header | Description |
|---|---|
AcresCoreBatch.h |
Batched environments of ACRES Core: N independent Polaris environments on one shared world, stepped together on all CPU cores. This is what the Python module (Game/Core/Python) and the learners use; Vehicle/ROS/acres_core_sim will wrap the same class. |
AcresCoreEpisodeLog.h |
ACRES Core's episode log: the game's own writer (AcresEpisodeLog.h, the format of Docs/Reference/files.md, "Episode Log") fed from the Core, so a Core episode is the same MCAP file the game writes and replays in Unreal with -EpisodeReplay=. Every physics step: /sim/agent_states (the agents' base_footprint poses, wheels, drive-by-wire state, energy ledger, fuel, crop) and /sim/farm_stamps (the tyre and body contacts, so the game's farm repeats them); at the start and after every reset: /sim/episode, /sim/agents, /sim/conditions, /sim/shifts. The Core also writes the ds_dbw_msgs commands as the vehicle received them (/<agent>/vehicle/{steering,throttle,brake,ulc,gear}/cmd, /<agent>/vehicle/dbw_enabled), which the format allows. |
AcresCoreFarm.h |
What one environment's machines leave on the farm: crushed and harvested crop, wheel ruts and the flags of field work, the per-episode half of FAcresFarmRuntime (Wheel, Body, Cut, Work, Stamp and the cell maps) without Unreal. The crop layout, growth and soil come from the shared FAcresWorld; this holds only the changes, sparsely, so thousands of environments stay small and a reset is a clear(). |
AcresCoreHash.h |
SHA-1 for the identity checks of baked data (DriveRegion/crops.json names the region.bin and the crops.bin it belongs to by their SHA-1, as the game checks them with FSHA1). Not for security. |
AcresCoreJson.h |
A small JSON document reader for ACRES Core (no Unreal, no third-party library): the Core loads the same Content/Simulation files the game reads with Unreal's FJsonObject (site.json, surface_polygons.json, fields.json, tractor.json, farm.json, soils.json, sensors_polaris.json, ...). Numbers are doubles, objects keep their key order. Load-time only; not thread-safe while parsing, read-only (and thread-safe) afterwards. |
AcresCoreLidar.h |
Ray-cast LiDAR for ACRES Core: the Polaris' RoboSense Helios (1800 columns x 32 rings at 10 Hz, sensors_polaris.json "lidar") and the scouting task's planar 360-beam scan, traced against the terrain (AcresCoreTerrain.h), the static obstacle scene (AcresCoreScene.h) and the other vehicles' boxes and the objects on the path (FAcresLidarBox). |
AcresCoreMath.h |
Vector, quaternion and 3 x 3 matrix helpers for ACRES Core (header-only, double precision). |
AcresCorePolaris.h |
The Polaris Ranger in ACRES Core: the game's own drive-by-wire, powertrain, tyre and driveline model (AcresUtvModel.h, compiled unchanged) on a rigid chassis that reproduces what the game does with Chaos in AAcresVehiclePawn::AsyncPhysicsTickActor (AcresVehicle.cpp) and StepPolarisControls (AcresPolaris.cpp): |
AcresCorePool.h |
The worker pool of the batched environments of ACRES Core (FAcresBatch for the Polaris, FAcresTractorBatch for the Maxxum): persistent threads that run one job of Count indices at a time. A job is a blocking call (ParallelFor): the calling thread works too, and the call returns when every index is done. Each index runs on one thread only, and the result of an index does not depend on which thread ran it, so a batch gives the same bytes with any number of threads. The pool is not a control flow of its own: one caller, one job at a time, in the caller's step order. |
AcresCoreScene.h |
The static obstacles of the ACRE map for ACRES Core: buildings, grain bins and trees as simplified shapes (Game/Core/Data/acre_scene.json, written by Game/Core/Scripts/build_scene.py from placed render meshes and the level's tree instances), for the ray-cast LiDAR (AcresCoreLidar.h) and the vehicles' collision test. |
AcresCoreTerrain.h |
The ACRE survey terrain as the game's wheels see it: the corner heights of heights.f32 (1001 x 1001 float32 on the 1.524 m survey grid of site.json), each cell split into two triangles along its anti-diagonal, exactly as the triangulated collision mesh the wheel traces hit (AAcresVehiclePawn::AcreHeight, checked against the mesh to 1 cm by VerifyAcreTerrain). Heights, face normals and ray casts are exact on that mesh. |
AcresCoreTractor.h |
The Case IH Maxxum 150 in ACRES Core: the game's own tractor model (AcresVehicleModel.h: steering, drivetrain, tyres on the soil library, driveline) and implement model (AcresImplementModel.h, AcresImplementCoupling.h), both compiled unchanged, on a rigid chassis that does what the game does with Chaos in AAcresVehiclePawn:: AsyncPhysicsTickActor and StepImplementPhysics (AcresVehicle.cpp) for the Maxxum: |
AcresCoreTractorBatch.h |
Batched Maxxum environments of ACRES Core: N independent tractors (each with the same implement) on one shared world, stepped together on the worker pool (AcresCorePool.h), as FAcresBatch does for the Polaris. A Step advances every environment by SubSteps physics steps under its control row (held between rows; a NaN value keeps the last value of that column). The state, wheel and energy arrays are filled after every Step and Reset in structure-of-arrays layout for numpy. The wheel and energy columns are those of FAcresBatch (EWheelColumn, EnergyRow). |
AcresCoreWorld.h |
The static world of ACRES Core, shared read-only by every environment: the ACRE terrain, the surface map, the tyre surface templates and soil parameters of tractor.json, the soil texture and soil-water unit grids, the field raster, the crop patches and the named places. It replaces what the game does inside Unreal around the engine-free models: AAcresVehiclePawn::SampleSurface and SoilLibraryClassAt, FAcresFarmRuntime::Initialize (units, cells, patches) and Sample (soil water at a wheel), FAcresFieldSetup (fields, surface polygons, crop season). |
ROS 2 Bridge: acres_sim#
| Header | Description |
|---|---|
conversions.hpp |
Conversions between the game's stream frames and JSON lines and the vehicles' ROS 2 messages: the INS epoch to odometry, TF, ground truth, NavSatFix, Imu (the OxTS AV200 mounting on the Polaris) and TwistStamped; the DBW reports; the DBW and tractor commands to the RL bridge's JSON; a UTM reset pose to the game's reset command; the camera intrinsics and the Maxxum's mounts from the stream's hello. Everything here is a pure function (unit tested, test/test_conversions.cpp) and matches the Python bridge (acres_ros/sim_bridge.py) value for value. |
j1939.hpp |
SAE J1939 / ISO 11783 (ISOBUS) encoding of the game's CAN protocol (AcresRlBridge.h, -RlCan= / -RlCanUdp=): the C++ port of the Python module acres_sim.j1939 (installed with this package), function for function and bit for bit (test/test_j1939.cpp round trips, test/test_j1939_golden.py compares both on the same inputs). |
json.hpp |
JSON helpers shared by the game's line protocols (the RL / drive-by-wire bridge and the simulator control channel). |
sim_control.hpp |
Client of the game's simulator-control channel (Docs/Reference/channels.md, -SimControl=<port>) that offers it on ROS 2 at the root namespace: the simulation_interfaces services and action (/get_simulator_features, /get_simulation_state, /set_simulation_state, /step_simulation, /simulate_steps, /reset_simulation, /get_entities, /get_entity_state, /set_entity_state, /spawn_entity, /delete_entity, /get_spawnables, /get_named_poses), the ACRES services (/acres/set_conditions, /acres/set_vehicle_shift, /acres/record, /acres/farm_state, /acres/field_query) and the topic /sim/episode (transient local). |
stream.hpp |
The game's local transports, without ROS: the binary sensor stream (Game/Source/Acres/AcresSensorStream.h, -SensorStream=<port>), newline-delimited JSON over TCP (the RL / drive-by-wire bridge -RlPort=<port> and the simulator control channel -SimControl=<port>) and CAN frames over UDP (-RlCanUdp=<port>). The game listens on 127.0.0.1 only, and these clients refuse any other host. |
vehicle_bridge.hpp |
One vehicle of the running game on the topics its real counterpart uses (the C++ successor of acres_ros sim_bridge.py, topic for topic, frame for frame and value for value). |
Core Server: acres_core_sim#
| Header | Description |
|---|---|
CoreSimDbw.h |
The Polaris' drive-by-wire command path between the RL / DBW bridge's JSON messages and the vehicle model, as the game runs it (AcresRlBridge.cpp HandleDbw, AcresPolaris.cpp StepPolarisControls and PublishPolaris, AcresRlBridge.cpp SendDbwReports), without the keyboard driver and the session's own drivers (replay, drive script), which the Core does not have: |
CoreSimGeo.h |
The simulator's georeference without Unreal: the game's datum chain from the grid ENU frame of the ACRE tile to NAD83(2011) latitude / longitude and UTM zone 16N, as the Polaris' INS stream reports them (AcresSensors.cpp FAcresSensorRecorder::InsEpoch with sensors.json "ins.frame": "nad83"), and the affine world <-> UTM map of the simulator-control channel (AcresSimControl.cpp WorldToUtm / UtmToWorld). |
CoreSimIns.h |
The Polaris' OxTS AV200 INS as the game's sensor recorder models it (AcresSensors.cpp FAcresSensorRecorder::InsEpoch), fed from the Core's chassis: one epoch of the sensor stream's INS frame (AcresSensorStream.h EIns, 40 float64) at base_footprint, with the game's error model and datum chain. |
CoreSimNet.h |
The game's local transports, served: a TCP port on 127.0.0.1 with one client at a time (a second client waits in the listen backlog until the first disconnects), as the game's sensor stream (AcresSensorStream.h), RL / DBW bridge (AcresRlBridge.h) and simulator-control channel (AcresSimControl.h) are. acres_sim's clients (stream.hpp) connect to it unchanged. |
CoreSimServer.h |
ACRES Core behind the game's local protocols: the Polaris of ACRES Core (Game/Core/Source, FAcresBatch with one environment per agent) served on the same three kinds of socket the packaged game opens, so the ROS 2 bridge (Vehicle/ROS/acres_sim sim_bridge) and every other client of those sockets talk to it unchanged: |