AcresCoreTractorBatch.h#
Game/Core/Source/AcresCoreTractorBatch.h Generated
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).
Threads: Step and Reset are called from one thread at a time (they fan out internally).
ETractorControlColumn#
Columns of the control array of FAcresTractorBatch::Step (one row per environment, double; NaN keeps the value).
| Value | Description |
|---|---|
TcThrottle |
Pedal 0..1. |
TcBrake |
Pedal 0..1. |
TcSteerRad |
Bicycle-model steering angle, rad, positive left. |
TcDirection |
+1 forward, -1 reverse. |
TcGear |
Gear 1..16 (the game's numbers; the model's index + 1). |
TcDiffLock |
0 open, 1 rear, 2 rear and front. |
TcHandThrottle |
0..1. |
TcParkBrake |
0 / 1. |
TcRaise |
Implement raised (headland or transport raise), 0 / 1. |
TcPto |
PTO switch, 0 / 1. |
TcTransport |
Transport state, 0 / 1. |
TcDepthM |
Working depth, m (the hitch lever or the harrow's roller for it, ImplementControlsForDepth). |
TcHitchMode |
0 position, 1 draft, 2 float. |
TcDraftSetpointN |
Draft control set-point, N. |
TcSpray |
Sprayer section valves, 0 / 1. |
TcBoomFold |
Boom fold 0 (unfolded) .. 1 (folded). |
TcPickup |
Baler pickup down, 0 / 1. |
TcWindrowKgM |
Windrow linear density under the pickup, kg/m. |
TcLoaderLift |
Loader lift valve lever, -1..1. |
TcLoaderCurl |
Loader curl valve lever, -1..1. |
TcBaleOnFork |
A bale on the loader's fork, 0 / 1. |
TcHarvest |
The harvester's header on, 0 / 1. |
TcUnload |
Grain cart unloading auger on, 0 / 1. |
TcCartFillKgS |
Grain flowing into the grain cart from a harvester, kg/s. |
TcDrawbarN |
Test-stand drawbar pull, N. |
TcDrawbarHeightM |
Test-stand drawbar height above the ground, m. |
TcMowerSide |
Mower-conditioner: the work position of the header, -1 right, +1 left. |
TcCropKgM2 |
Mower-conditioner: the dry matter of the standing crop under the cutterbar, kg/m2. |
TcWingLeft |
Rotary cutter: the commanded position of the left wing, 0 down, 1 raised, 2 folded. |
TcWingRight |
Rotary cutter: the commanded position of the right wing, 0 down, 1 raised, 2 folded. |
TcCutHeightM |
Rotary cutter and flail shredder: the cut height that the deck is lowered to, m. |
TcHitchLever |
The hitch lever itself, 0 lowest .. 1 highest (in draft mode the depth limit); after depth_m. |
TcDraftMix |
The draft-position mix of the electronic hitch control in draft mode, 0 position .. 1 draft. |
TractorControlColumnCount |
ETractorStateColumn#
Columns of the state array (one row per environment, double). Positions are base_footprint in ENU m; velocities and rates in the body frame (FLU).
| Value | Description |
|---|---|
TsTime |
|
TsX |
|
TsY |
|
TsZ |
|
TsQw |
|
TsQx |
|
TsQy |
|
TsQz |
|
TsYaw |
|
TsPitch |
|
TsRoll |
|
TsVx |
|
TsVy |
|
TsVz |
|
TsWx |
|
TsWy |
|
TsWz |
|
TsAx |
|
TsAy |
|
TsAz |
|
TsSpeed |
|
TsSteerRad |
|
TsRpm |
|
TsGear |
|
TsEngineTorqueNm |
|
TsClutchEngagement |
|
TsFuelRateLph |
|
TsFuelUsedL |
|
TsDistanceM |
|
TsFuelPerHaL |
|
TsTractiveEfficiency |
|
TsGrounded |
|
TsRearSlip |
|
TsFrontSlip |
|
TsFrontAxleN |
|
TsRearAxleN |
|
TsMassKg |
|
TsDraftN |
|
TsPtoKW |
|
TsHydraulicKW |
|
TsImplementDepthM |
|
TsImplementLiftRad |
|
TsImplementInSoil |
|
TsPayloadKg |
|
TsTankL |
|
TsSprayedM2 |
|
TsBalesDropped |
|
TsFormingKg |
|
TsIntakeKgS |
|
TsBalerYawRad |
|
TsRoundPhase |
|
TsUnloadKgS |
|
TsBunkerKg |
|
TsCropCrushedStepM2 |
|
TsHarvestedStepKg |
|
TsWorkedStepM2 |
|
TsOffMap |
|
TsFieldUnder |
|
TsSurfaceUnder |
|
TsMowerSwing |
|
TsMowedM2 |
|
TsSwathKg |
|
TsWingLeftRad |
|
TsWingRightRad |
|
TsDeckHeightM |
|
TsCutWidthM |
|
TsMachineWidthM |
|
TsSensedDraftN |
The draft that the lower-link pins sense, N (the input of the hitch control, before its filter). |
TsToolXM |
The tool zone of a three-point implement, x in the frame of the rear axle, m (FAcresTractor::ToolX). |
TractorStateColumnCount |
FAcresTractorBatchOptions#
Options of FAcresTractorBatch::Init.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
World |
FAcresWorldOptions |
The world (its ContentDir must be set). | ||
Implement |
std::string |
The implement of every environment (LoadTractorConfig: "", "none", an implement-model id, "harvester") and the tractor.json vehicle and implement overrides. | ||
NumEnvs, Threads |
int |
Environments; worker threads (0: all hardware threads). | ||
PhysicsDt |
double |
1. / 120 |
Physics step, s; physics steps per Step. | |
bFarm |
bool |
true |
Keep crop, rut and work marks (the farm). | |
OffMapMarginM |
double |
m | 10 |
Distance from the tile edge at which an environment counts as off the map, m. |
FAcresTractorEnv#
One tractor environment.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
Controls |
FAcresTractorControls |
The controls held. | ||
EnergyAtStep |
AcresSim::FEnergyFlows |
Energy at the start of the last Step; crop crushed, harvest and worked area over the last Step. |
FAcresTractorBatch#
The batch. See the file comment.
| Name | Type | Unit | Default | Description |
|---|---|---|---|---|
State |
std::vector<double> |
Output arrays, refreshed by Step and Reset. |
FAcresTractorBatch::Init#
Loads the world and the tractor configuration, creates the environments (each at the origin until reset) and starts the pool. False with Error on a load failure.
FAcresTractorBatch::Reset#
Places environments, clears their farm marks and sets their controls to the start (brake on, the start gear, the implement's start controls).
| Argument | Description |
|---|---|
Poses |
Count x 4: base_footprint x, y (ENU m), yaw (rad counter-clockwise from east), forward speed (m/s). |
bSettled |
On the terrain at the static ride height (true), or dropped level from 0.2 m as the game does. |
bKeepFarm |
Keep the farm marks (crush, ruts, work flags; a season of several machines on one farm). |
FAcresTractorBatch::Step#
Advances every environment by SubSteps physics steps.
| Argument | Description |
|---|---|
Controls |
Size() x TractorControlColumnCount rows (ETractorControlColumn; NaN keeps a value), or null to hold the controls. |
FAcresTractorBatch::StepPhysics#
Advances every environment by one physics step under fully formed controls (one per environment).
FAcresTractorBatch::SetConditions#
Sets the soil-water scenario of environments (as FAcresBatch::SetConditions).
FAcresTractorBatch::SetWinter#
Sets the winter of environments (FAcresConditions::SnowDepthM, SnowDensity, IceShare, bFrozenSoil): the snow depth (m, 0 to 2) and density (kg/m3, 50 to 550), the share of glaze ice (0 to 1), frozen soil.
FAcresTractorBatch::SetGround#
A test stand's ground for environments (FAcresTractor::SetGround; bActive false: the world's again).
FAcresTractorBatch::SetWetSpots#
The wet spots of one environment's soil-water scenario (FAcresConditions::WetSpots): Count x 4 rows of x, y (ENU m), radius (m) and fraction (0 wilting point .. 1 field capacity .. 2 saturation); Count 0 removes them. False when the index is out of range or Count is above FAcresConditions::MaxWetSpots.
FAcresTractorBatch::ApplyFarmStamps#
Gives farm stamps to one environment's farm in sequence (FAcresBatch::ApplyFarmStamps without the log): Count x FAcresBatch::FarmStampColumnCount rows; OutAreas (may be null) receives the area of each. False when the index is out of range or the batch has no farm.