Skip to content

Architecture#

This page gives the parts of ACRES and the connections between them. Each part has its own page in the section Components.

The Parts#

The parts of ACRES: your code calls the Python packages; acres_map and acres_fleet use the run-time library, which contains ACRES Core; acres_core is one physics world in Python; the Unreal game connects to ROS 2 through acres_sim; the two simulators share the model sources, the map products and the configuration files. The parts of ACRES and how they connect YOUR CODE Python scripts and notebooks drive, record, evaluate Planners and learned models propose paths and commands ROS 2 nodes the topics of the real vehicle PYTHON PACKAGES acres_map map products and builder map variants map source layers acres_fleet Core, Fleet, Skills plans, routes, maps scan of the shield acres_core one physics world in Python: step, LiDAR, episode log acres_data LiDAR data sets converters readers of recordings SIMULATORS Run-time library libacres_runtime: missions, routes, planner, shield, checker, skills ACRES Core inside, many slots ACRES Core C++ physics without Unreal Polaris, terrain, soil, crops ray-cast LiDAR, INS, wheels Unreal game Unreal Engine 5.8, 120 Hz physics Maxxum, implements, weather, camera and GPU LiDAR SHARED BY THE SIMULATORS Engine-free model sources Acres/Source/Acres: one set of equations Map products and configuration files Acres/Content/Simulation, SimulationMaps, Config/ acres_sim
Your code calls the Python packages, the simulators and ROS 2. The two simulators share the engine-free model sources, the map products and the configuration files. Open the diagram
Part Folder Language Function Page
The game Game/ C++, Unreal Engine 5.8 The full simulator: the farm, the two vehicles, the implements, the weather and all sensors. The Game
ACRES Core Game/Core/ C++, Python module acres_core The Polaris on the same terrain, soil and crops, with a ray-cast LiDAR. No Unreal, no GPU. ACRES Core
The run-time library Vehicle/Runtime/ C++, Python package acres_fleet The vehicle software: missions, routes, planner, driver, shield, checker, skills and fleets. It contains ACRES Core. Run-Time Library
The batched simulator Fast/ Python, PyTorch Thousands of simplified Polaris drives on a GPU. Batched Simulator
The map pipeline Map/ Python, package acres_map The map layers and the map products. Map Pipeline
The ROS 2 workspace Vehicle/ROS/ C++, Python The ROS 2 bridge, the Core server, the vehicle node and the messages. ROS 2 Workspace
The LiDAR data sets Data/ Python, package acres_data One LiDAR format for simulated and real scans. LiDAR Data Sets
The configuration Config/ JSON The parameters of the vehicle software. Files and Formats
The validation Results/ Python, JSON The comparisons of the models with real data. Validation Results
The proofs Vehicle/Proofs/ Lean 4 The Lean models of the shield, the checker and the planner. Formal Verification
The tools Tools/ Python, shell Game control, performance, scene and asset tools, the local CI. Commands

Shared Model Code#

The game and ACRES Core compile the same engine-free model files in Game/Source/Acres. These files have the Polaris, the tire and soil, the power, the surfaces, the farm, the weather and the episode log. These files use standard C++ and SI units, and no Unreal type. The game adds the Unreal layer. ACRES Core adds its own rigid body, terrain and ray-cast LiDAR.

The layers of the game module: clients, the Unreal layer, the engine-free models, the files, and ACRES Core that compiles the same model files. Keyboard and menu a person drives Socket clients Python programs, CAN devices ROS 2 bridge acres_sim Unreal layer actors, threads, rendering, UI. Chaos integrates the chassis body. Shell and menu AcresShell AcresMenu AcresSession AcresAgents Vehicle pawn AcresVehicle AcresPolaris AcresVehicleControl Bridges AcresRlBridge AcresSimControl AcresSensorStream Farm and weather runtime AcresFarmRuntime AcresEnvironment AcresFieldSetup Sensors AcresSensors AcresLidarGpu AcresCameraModel AcresLidarModel AcresGnssModel Rigs, traffic, view AcresRig AcresNpc AcresHud AcresRenderTier AcresSoilVisuals one call for each physics step, all values in SI units Engine-free models standard C++, no Unreal types Vehicle models AcresVehicleModel AcresUtvModel AcresPowerModel Implement models AcresImplementModel AcresImplementCoupling AcresFieldWorkModel Soil and farm models AcresSoilModel AcresFarmModel AcresSurfaceMap Weather model AcresEnvironmentModel Sensor mathematics AcresLidarPhysics AcresGeoUtm Timing and episode log AcresCommandTiming AcresEpisodeLog compiles the same model files ACRES Core its own world layer for the Polaris: terrain, scene, rigid body, ray-cast LiDAR, batch Files Configuration Content/Simulation/ read at the start Map products Simulation/ACRE/ read at the start Session folder Saved/Sessions/ logs of the session ACRES Core reads the same files
The Unreal layer calls the engine-free models at each physics step. ACRES Core compiles the same model files. Open the diagram

Both simulators read the same parameter files and map products (Game/Content/Simulation, Game/Content/SimulationMaps) and the same configuration files (Config/).

The Sockets#

A session of the game opens three local sockets: the vehicle bridge, the sensor stream and the simulator control channel. The server core_sim of ACRES Core opens the same sockets. The ROS 2 bridge sim_bridge connects to them and publishes the topics of the real vehicle. Thus one bridge operates with the two simulators.

The three local sockets of one session: the simulator control channel for the session, and a vehicle bridge and a sensor stream for each agent, with the clients and the data that flows on each socket. CLIENTS SOCKETS ON 127.0.0.1 GAME OR CORE SERVER Session client sim_control.py ROS 2 bridge: services and the step action Simulator control channel JSON lines on TCP, one client one socket for the session -SimControl=5600 Session state, lockstep steps, resets, conditions, episode log requests replies, events Controller sim_control.JsonBridge ROS 2 bridge: command and report topics Vehicle bridge JSON lines on TCP, one client -RlPort=5556 J1939 CAN frames, UDP or SocketCAN -RlCanUdp= -RlCan= commands, resets reports, barrier ROS 2 bridge sim_bridge publishes the sensor topics and the clock Sensor stream binary frames on TCP, one client INS, LiDAR, camera, clock -SensorStream=5601 frames, barrier Agent 0 one vehicle: Polaris or Maxxum sensor rig of the vehicle More clients one controller for each agent Sockets of agent 1, 2, ... -RlPorts=5556,5557 -SensorStreams=5601,5602 Agent 1, 2, ... own vehicle bridge and sensor stream
The three sockets of a session and their clients. Open the diagram

Sockets of a Session gives the protocols.

Data Flow of a Mission#

  1. acres_fleet or vehicle_node asks the run-time library for a mission, for example the scout loop of F56.
  2. The planner of the library makes the route from the map products and the cost tables of the map.
  3. In each control step of 0.1 s, the library makes a command from the default driver or a checked chunk. Then the launch hold, the shield and the gear logic apply.
  4. The command goes to the physics. This is ACRES Core in the process, the game or core_sim through the sockets, or the real vehicle.
  5. The state, the scan and the reports come back for the next step.
  6. The episode log records the steps. The game can replay the log to render it.

Identity of a Result#

A simulated result has two identities: the map hash of the map products and the simulation version of the build. The planner refuses cost tables of a different map. Only Vehicle/Runtime/Reference/refresh.sh changes the simulation version.