Opposite Driving Side Converter

Prev Next

Overview

The Convert Driving Side option transforms paired ASAM OpenDRIVE (.xodr) and OpenSCENARIO (.xosc) files between Right-Hand Traffic (RHT) and Left-Hand Traffic (LHT).

By performing a full spatial mirror across road geometries, lane structures, vehicle spawn points, trajectories, and traffic rules, it ensures complete behavioral consistency without requiring manual scenario re-authoring. All converted datasets undergo automated ASAM schema re-validation and include synchronized OpenLABEL ground-truth metadata ready for immediate simulation.


Steps to Convert and Download ScenariosDownload Opposite Driving Side Converter

  1. Open any OpenX Scenario from your workspace.

  2. In the top-right toolbar, click the Download dropdown button.

  3. Select Download Left-Hand Drive Scenario (or Download Right-Hand Drive Scenario) from the available options.

Note: The downloaded .zip file contains 3 synchronized files: OpenDRIVE (.xodr), OpenSCENARIO (.xosc), and OpenLABEL (.json).

Handedness Transformation Mechanics & Conversion Logic

When switching between Right-Hand Traffic (RHT) and Left-Hand Traffic (LHT), the platform applies a coordinate-level spatial reflection across a vertical mirror axis (x = 0 in world coordinates). The transformation guarantees geometric continuity, valid lane topology, and consistent vehicle maneuvers.

1. OpenDRIVE (Map & Infrastructure) Transformations

  • Traffic Rule Definition: Updates the road rule attribute to the target standard (RHT to LHT, or LHT to RHT).

  • Lane Groups & IDs: Swaps left and right lane groups. All lane IDs are negated (for example, Lane +1 becomes Lane -1), ensuring driving directions align with the target traffic rules.

  • Plan-View Geometry:

    • Reflects initial Cartesian positions: x' = -x

    • Adjusts heading angles: hdg' = π - hdg

    • Negates curve parameters (such as arc and spiral curvatures).

  • Superelevation & Crossfall: Inverts lateral slope coefficients across the road profile (t-axis) from (a, b, c, d) to (-a, -b, -c, -d).

  • Objects & Road Signals: Inverts lateral distances (t to -t) and orientations; remaps lane validity ranges (fromLane to toLane) to the mirrored lane IDs.

  • Junction Connections: Updates all incoming and outgoing lane connection IDs to match the newly assigned lane IDs.

2. OpenSCENARIO (Vehicles, Positions & Actions) Transformations

Vehicle behaviors, routes, and coordinate references are converted across all supported OpenSCENARIO positioning formats:

  • World Positions (WorldPosition):

    • Horizontal position is reflected: x' = -x

    • Absolute yaw heading is transformed: hdg' = π - hdg

    • Roll angle is inverted: r' = -r (preserving vehicle bank in corners).

  • Lane Positions (LanePosition / RelativeLanePosition):

    • Lane identifier is negated: laneId becomes -laneId

    • Lateral lane offset is negated: offset becomes -offset

    • Longitudinal distance along the road (s) remains unchanged.

  • Road Positions (RoadPosition / RelativeRoadPosition):

    • Lateral offset t from the reference line is inverted: t becomes -t.

  • Relative Object Positions (RelativeObjectPosition):

    • Entity-local lateral offset is inverted: dy becomes -dy while longitudinal distance (dx) and vertical distance (dz) remain intact.

  • Geographic Coordinates (GeoPosition):

    • Longitude coordinates are reflected using tangent-plane projection relative to the map's geodetic reference origin (+lon_0, +lat_0).

  • Trajectories & Maneuvers:

    • Clothoid/spiral curvature and curvature rate of change are inverted to mirror turning maneuvers accurately.

    • Linked road logic file paths are updated to point to the newly generated OpenDRIVE file.

3. Automated Validation & OpenLABEL Generation

  1. ASAM Schema Compliance: Both transformed XML files are validated against official ASAM OpenDRIVE (v1.6.0) and ASAM OpenSCENARIO (v1.1.0) XSD schemas prior to export.

  2. OpenLABEL Ground Truth: An updated OpenLABEL JSON file is automatically compiled, containing full scene categorization, mirrored entity paths, and scenario tags.