Skip to main content

Feature Mapping: OpenDRIVE Standard → libOpenDRIVE C++ → WASM Adapter → Foxglove Schema

Version: 2.0 Last Updated: 2026-05-19 Audit Status: Updated for the current libOpenDRIVE WASM pipeline

This document maps OpenDRIVE features across four layers:

  1. OpenDRIVE Standard — normative definition from ASAM OpenDRIVE V1.8.1
  2. libOpenDRIVE C++ API — reference implementation compiled to WebAssembly
  3. This Converter (WASM adapter)sceneUpdateConverter.ts plus related TypeScript glue
  4. Foxglove OutputSceneUpdate primitives emitted to the 3D panel

1. Geometry Primitives (Reference Line)

#FeatureODR StandardlibOpenDRIVE C++This Converter (WASM adapter)Foxglove OutputStatusNotes
1.1Straight line[ODR §9.3] <line>GeomLineIncluded in get_road_network_mesh(eps)Internal mesh generation
1.2Arc[ODR §9.5] <arc curvature="κ">GeomArcIncluded in mesh generationInternal mesh generation
1.3Spiral (clothoid)[ODR §9.4] <spiral>GeomSpiralIncluded in mesh generation with spiral edge-case fixes enabledInternal mesh generation
1.4Cubic polynomial[ODR §9.7] <poly3>GeomPoly3Included in mesh generationInternal mesh generation
1.5Parametric cubic[ODR §9.6] <paramPoly3>GeomParamPoly3Included in mesh generationInternal mesh generation
1.6Cubic bezier[ODR §9.8] <cubicBezier>CubicBezier supportIncluded in mesh generationInternal mesh generation
1.7Local→global transform[ODR §9.2] inertial transformBuilt into geometry evaluationReturned vertices are already in global coordinatesAbsolute Point3 coordinates
1.8Adaptive linearizationApproximation qualityapproximate_linear(eps)Exposed as panel tessellation toleranceAffects all generated meshes

2. Road Elevation & Lateral Profile

#FeatureODR StandardlibOpenDRIVE C++This Converter (WASM adapter)Foxglove OutputStatusNotes
2.1Elevation profile[ODR §10.5.1] <elevation>CubicProfile supportEnabled via createFromXml()z-coordinate in all features
2.2Superelevation[ODR §10.5.2] <superelevation>Lateral banking supportEnabled with withLateralProfile=trueBaked into meshes
2.3Crossfall[ODR §10.5.3] <crossfall>Crossfall supportEnabled with withLateralProfile=trueBaked into meshes
2.4Lateral shape[ODR §10.5.3] <shape>Controlled by with_lateral_profileCurrent converter enables the flagBaked into meshes when presentFlag-dependent in libOpenDRIVE
2.5Surface CRG[ODR §10.6] <surface><CRG>Not supported by libOpenDRIVENot exposed

3. Lane Model

#FeatureODR StandardlibOpenDRIVE C++This Converter (WASM adapter)Foxglove OutputStatusNotes
3.1Lane sections[ODR §11.3] <laneSection>Piecewise lane-section modelReflected in returned lane chunksSceneEntity per lane chunk
3.2Lane numbering[ODR §11.1] center=0, left=+, right=−Lane::idPreserved in entity IDs and metadatalane_id metadata
3.3Lane width[ODR §11.6.1] <width>Width profilesUsed during mesh generationSurface and outline geometry
3.4Lane border[ODR §11.6.2] <border>Border profilesUsed during mesh generationSurface and outline geometry
3.5Lane offset[ODR §11.4] <laneOffset>Cubic lane-offset supportEnabled via createFromXml()Surface and outline geometry
3.6Lane height[ODR §11.6.3] <height>Lane-height supportEnabled via withLaneHeight=trueSurface and object placement geometry
3.7Lane type[ODR §11.7.1] e_laneTypeLane type enum/stringMapped to colors including walking, slipLane, shared, tram, rail, bus, taxi, hovColored lane surfaces
3.8Lane material[ODR §11.7.2] <material>Not surfaced as a visual layerNot rendered separately
3.9Width accumulation[ODR §11.6.1] center-out accumulationHandled inside libOpenDRIVEReflected in returned meshesSurface and outline geometry
3.10Lateral offset[ODR §8.3] s/t/h frameget_xyz(s,t,h)-style evaluationReflected in returned verticesAbsolute Point3 coordinates

4. Road Markings

#FeatureODR StandardlibOpenDRIVE C++This Converter (WASM adapter)Foxglove OutputStatusNotes
4.1Road mark group[ODR §11.8] <roadMark>Grouped road-mark supportAdapted from roadmarks_mesh chunksTriangleListPrimitive
4.2Mark type[ODR §11.8] solid, broken, etc.Type-aware road-mark mesh generationPreserved as per-chunk metadataFilled meshes with natural gaps
4.3Mark color[ODR §11.8] 9 colorsColor-aware road-mark dataColor mapping covers standard, white, yellow, blue, green, red, orange, violet, blackColored road-mark meshes
4.4Mark weight[ODR §11.8] standard/boldWidth and weight contribute to generated geometryConsumed through libOpenDRIVE mesh generationMesh width
4.5Explicit marks[ODR §11.8] <explicit><line>Explicit mark line supportConsumed as generated mesh chunksFilled meshesAdapted at mesh level
4.6Mark meshVisualization layerroadmarks_meshAdapted directly to Foxglove trianglesTriangleListPrimitive
4.7Center lane marks[ODR §11.8] lane 0 markingsIncluded if present in mesh outputAdapted like any other chunkFilled meshes

5. Lane Surfaces (Tessellation)

#FeatureODR StandardlibOpenDRIVE C++This Converter (WASM adapter)Foxglove OutputStatusNotes
5.1Lane meshVisualization layerlanes_meshAdapted per lane chunkTriangleListPrimitive
5.2Lane border lineVisualization layerOutline indices from lane meshAdapted to Foxglove line geometryLinePrimitive
5.3Outline indicesVisualization layerget_lane_outline_indices()Used to build lane-boundary overlayLinePrimitive indices
5.4Full network meshVisualization layerget_road_network_mesh(eps)Single mesh-generation entry pointMultiple scene entities

6. Junctions

#FeatureODR StandardlibOpenDRIVE C++This Converter (WASM adapter)Foxglove OutputStatusNotes
6.1Junction connections[ODR §12.3] <connection>Junction topology supportJunction road IDs used for surface coloringJunction lanes rendered with distinct color
6.2Junction groups[ODR §12.5] <junctionGroup>Not exposedNot adapted
6.3Virtual junctions[ODR §12.6] type="virtual"Not exposedNot adapted

7. Road Objects & Signals

#FeatureODR StandardlibOpenDRIVE C++This Converter (WASM adapter)Foxglove OutputStatusNotes
7.1Road objects[ODR §13] <object>road_objects_meshAdapted per object chunkTriangleListPrimitive
7.2Road signals[ODR §14] <signal>road_signals_meshAdapted per signal chunkTriangleListPrimitive
7.3Object outlines[ODR §13.4] <outline>Used during object mesh generationRepresented by generated mesh geometryTriangleListPrimitive
7.4Object repeat[ODR §13.5] <repeat>Expanded during object mesh generationRepresented by generated mesh geometryTriangleListPrimitive

8. Coordinate Systems & Geo-Referencing

#FeatureODR StandardlibOpenDRIVE C++This Converter (WASM adapter)Foxglove OutputStatusNotes
8.1Inertial frame[ODR §8.2] x=East, y=North, z=UpNative output frameUsed directlyframe_id="global"
8.2s/t/h frame[ODR §8.3] curvilinear coordinatesInternal evaluation frameConsumed inside libOpenDRIVEAbsolute mesh coordinates
8.3geoReference[ODR §8.5] PROJ stringParsed by libOpenDRIVEOriginal coordinates preserved; no extra projection in adapterAbsolute mesh coordinates⚠️Preserved, not reprojected
8.4Header offset[ODR §8.5] <offset>Available in map dataAdapter does not apply extra post-transformAbsolute mesh coordinates⚠️No additional adapter transform
8.5Map centeringVisualization optioncenter_map flag existsConverter intentionally passes falseOriginal coordinates preserved

9. Foxglove SceneUpdate Output

#FeatureFoxglove SchemaField ValuesSource
9.1SceneUpdate{ deletions, entities }Uses SceneEntityDeletionType.ALL when settings changesceneUpdateConverter.ts
9.2SceneEntity.idStable upsert keys using dot notation mirroring XODR hierarchyLane: road.{roadId}.lanesection.{s0}.lane.{laneId}; boundary: road.{roadId}.lanesection.{s0}.lane.{laneId}.boundary; marks: road.{roadId}.roadmark.{chunk}; objects: road.{roadId}.object.{objectId}; signals: road.{roadId}.signal.{signalId}sceneUpdateConverter.ts
9.3frame_id"global"OpenDRIVE inertial frame maps directly to Foxglove world coordinatesconstants.ts, scene.ts
9.4lifetime{sec:0, nsec:0}Persistent until replaced or deletedscene.ts
9.5frame_lockedtrueAnchors entities to the selected framescene.ts
9.6timestampMCAP receiveTimeShared across all entities in one updatesceneUpdateConverter.ts
9.7Lane surfacesTriangleListPrimitiveIndexed triangles, uniform color per lane chunksceneUpdateConverter.ts
9.8Lane boundariesLinePrimitivetype=LINE_LIST, world-space thicknesssceneUpdateConverter.ts
9.9Road marks / objects / signalsTriangleListPrimitiveIndexed triangles with stable per-chunk IDssceneUpdateConverter.ts
9.10MetadataKeyValuePair[]Lane, mark, object, and signal metadata attached per entity typesceneUpdateConverter.ts

10. Summary Statistics

CategoryTotal Features✅ Implemented⚠️ Partial / Conditional❌ Not Implemented
Geometry primitives8800
Elevation/profile5401
Lane model10901
Road markings7700
Lane surfaces4400
Junctions3102
Objects & signals4400
Coordinates/geo5221
Total4639 (85%)2 (4%)5 (11%)
Foxglove output101000

References