State

Overview

The State sensor exposes the host vehicle’s pose and motion in world space: simulation time, position, direction, up vector, velocity, front reference point, and orientation quaternion. It is a non-positional ground-truth source with no physical hardware equivalent.

Positions and vectors are in world space (Z-up map coordinates). See Coordinate systems .

The sensor is available to use from Python API . It has no extensions.tech_sensors.create* / get*Readings Lua API.

Usage

This sensor does not use extensions.tech_sensors.create*. Request it through a tech client (BeamNGpy, ROS, or similar) with a vehicle SensorRequest containing {type = 'State'}.


{type = 'State'}

Args:

None.

Returns: response(table):

  • type: 'VehicleUpdate'
  • state: table with the fields below
Field
Type
Description
Field
time
Type
number
Description
Simulation time (seconds)
Field
pos
Type
{x, y, z}
Description
World position (meters)
Field
dir
Type
{x, y, z}
Description
Forward direction unit vector
Field
up
Type
{x, y, z}
Description
Up direction unit vector
Field
vel
Type
{x, y, z}
Description
Velocity (m/s)
Field
front
Type
{x, y, z}
Description
Front reference position
Field
rotation
Type
{x, y, z, w}
Description
Orientation quaternion

This sensor has no extensions.tech_sensors.create* / get*Readings Lua API. For BeamNGpy usage, attributes, and poll response fields, see the Python API .

Last modified: August 5, 2026

On this page:

Any further questions?

Join our discord
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this forum thread.