ROS 2 Editor

The ROS 2 Editor is a World Editor tool for building per-vehicle ROS 2 sensor configurations inside BeamNG.tech, launching the in-process low-latency native C++ ROS 2 bridge for those vehicles, and saving/loading reusable JSON templates. It complements the external BeamNG–ROS 2 packages by letting you author and run a vehicle’s published sensor set from the simulation UI.

The bridge runs inside the simulator process: sensor data is published directly from the engine through the loaded ROS 2 shared library, without a Python relay or socket round-trip. That avoids the extra copy/serialisation steps of the external Python integration, so topics stay low-latency and can be published at high rates (subject to each sensor’s update limiter).

ROS 2 Editor with library loaded and sensor type grid ROS 2 Editor with library loaded and sensor type grid

Prerequisites

Requirement
Description
Requirement
ROS 2 library
Description
Compatible native C++ bridge library for the current platform (.dll on Windows under Bin64, .so on Linux under BinLinux). Vehicle and sensor controls stay disabled until it is loaded.

The remote beamng_ros2 Python packages remain available for scenario orchestration; this editor focuses on in-simulator library loading, sensor draft editing, and per-vehicle start/stop.

Opening the editor

  1. Open the World Editor.
  2. In the mode bar, select ROS 2 Editor (device-hub icon).
  3. The ROS 2 Editor window opens.
The mode bar is folded by default, so the ROS 2 Editor icon may be hidden. See Showing hidden tools to reveal it via the Editor Modes menu.

ROS 2 library

At the top of the window:

  • The current library path is shown (green when loaded).
  • If nothing is loaded, use Browse… to pick the native C++ bridge library, or Load last used to reload the path stored in editor preferences (ros2Editor.general.lastRosLibPath).

Until the library loads successfully, the rest of the editor body is disabled. An incompatible library version surfaces an error in this section.

Scene vehicles

The Scene vehicles table lists every active vehicle. Green row tint means ROS is currently running for that vehicle.

Per-row actions:

Action
Purpose
Action
Select row
Purpose
Choose which vehicle’s sensor draft to edit.
Action
Focus camera
Purpose
Orbit-focus that vehicle.
Action
Load template
Purpose
Open a JSON sensor template into this vehicle’s draft.
Action
Save template
Purpose
Export this vehicle’s draft as a JSON template.
Action
Launch / Reload
Purpose
Start ROS for the vehicle with the merged draft, or re-apply if already running. Requires at least one sensor in the draft.
Action
Stop
Purpose
Tear down the ROS node for that vehicle.

ROS is started per vehicle. You can run several vehicles independently, each with its own sensor draft.

Adding and managing sensors

Below the vehicle table:

Control
Description
Control
Add sensor
Description
Icon grid of supported types from the packaged defaults (rosDefaults.json). Click a type to append a draft sensor with default config and a generated id (TypeName_N).
Control
Sensors on this vehicle
Description
List of draft sensors for the selected vehicle. Select a row to inspect it; Remove selected sensor deletes it from the draft.

Supported types in the defaults catalogue:

Group
Types
Group
Positional / ADAS-style
Types
Camera, LiDAR, RADAR, Ultrasonic, Advanced IMU, GPS, Ideal RADAR, Roads, Mesh
Group
Vehicle / state scalars
Types
Electrics, Powertrain, State, Damage, GForces, Time

Exact availability follows tech/rosDefaults.json shipped with the build (copied to the user tech/ folder on first use when needed).

Sensor inspector

With a sensor selected, the inspector edits the draft before launch.

ROS 2 topic / identity

Field
Description
Field
Sensor id
Description
Unique id within that vehicle’s ROS config. Used for topics and internal routing. Change it before launch if you need stable names across sessions.

Scalar channels

For scalar sensor types (Electrics, State, and similar):

Option
Description
Option
Publish all default signals
Description
When enabled (default), publish every field defined for that type in the defaults document.
Option
Scalar channels subset
Description
When Publish all is off, a filterable table appears. Tick individual fields; All / None shortcuts are available. Only selected fields are kept in the launch config.

Placement (positional sensors)

Sensors with pos / dir / up in their create config show a placement section:

Control
Description
Control
Position / orientation
Description
Edit vehicle-space pose numerically, or use the viewport gizmo overlays while the ROS 2 Editor mode is active.
Control
Stick to vehicle mesh
Description
When enabled, gizmo placement snaps to the vehicle surface (optional for RADAR; leave off if snap fails for a pose).
Control
Visualised
Description
Draw the sensor debug box/frame in the scene when supported.

Rates and publishing

Blob / GPU-backed types expose:

Control
Description
Control
Enable framerate limiter
Description
When on, publish at Update rate (Hz); when off (max mode), publishing is not rate-capped by that field.
Control
Update rate (Hz)
Description
Target publish rate when the limiter is enabled. Default follows the ROS bridge defaults (typically 60 Hz for blob sensors unless changed).

Sensor parameters

Type-specific controls (examples):

Sensor type
Example parameters
Sensor type
Camera
Example parameters
Resolution, FOV, near/far, colour / annotation / depth streams, exposure.
Sensor type
LiDAR
Example parameters
Vertical/horizontal resolution and angles, rotate flag, frequency, range.
Sensor type
RADAR
Example parameters
Size, FOV, range/velocity binning and related model parameters.
Sensor type
Ultrasonic
Example parameters
Near/far and range cutoffs.
Sensor type
GPS
Example parameters
Reference latitude/longitude for reported positions.

Parameters not given a dedicated control still appear in the generic parameter list when present on the sensor’s default create table.

JSON templates

Save template writes a launch-ready JSON document:

{
  "sensors": [
    {
      "id": "Camera_1",
      "type": "Camera",
      "config": { "...": "..." },
      "fields": [ "optional subset of scalar field names" ]
    }
  ]
}

The export merges each draft sensor with its type defaults (including message metadata from rosDefaults.json). If scalar subset mode is active, only the selected fields are kept.

Load template replaces the selected vehicle’s draft with the file contents. Sensors that already list fields are treated as subset mode on load.

Typical workflow

  1. Load the ROS 2 library once per editor session (or use Load last used).
  2. Spawn the ego (and any other) vehicles.
  3. Select a vehicle in the ROS 2 Editor.
  4. Add sensor types, set ids, placement, rates, and optional scalar subsets.
  5. Optionally save a JSON template for CI / reuse.
  6. Press Launch on the vehicle row.
  7. Consume topics from your ROS 2 graph; press Stop when finished, or Reload after editing the draft.

Related documentation

  • ROS 2 interface overview — external beamng-ros2-integration packages and messages.
  • ADAS Sensor Configuration Editor — vehicle-attached sensors for BeamNGpy / co-simulation / VSL (separate from the ROS draft, though many sensor concepts overlap).
  • Sensors — behaviour and parameters of individual BeamNG.tech sensors.
Last modified: August 20, 2026

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.