C++ API Reference
SimOne C++ API is the C++ integration layer for autonomous driving algorithm development. It provides core functionality including simulation data reading, vehicle control, HD map queries, and evaluation reporting. All interfaces are defined under namespace SimOneAPI.
Typical Call Sequence
Standard initialization flow for integrating an autonomous driving algorithm with SimOne:
1. InitSimOneAPI() ← Establish BridgeIO connection, register frame callback
2. HDMapAPI::LoadHDMap() ← Optional: preload HD map (wait for map ready)
3. SensorAPI / PNCAPI ← Read sensor data / send control commands in frame callback
4. EvaluationAPI ← Optional: report evaluation events
Note: InitSimOneAPI() must be called before all other API calls.
Module Overview
Foundation Layer
| Module |
Header File |
Description |
API Details |
| ServiceAPI |
SimOneServiceAPI.h |
Initialization (InitSimOneAPI), version query, log configuration, inter-node messaging |
→ View |
| PNCAPI |
SimOnePNCAPI.h |
Vehicle control (SetDrive/SetTrajectory/SetPose), state retrieval, waypoints, driving mode switching, traffic light control |
→ View |
| ControlTransAPI |
SimOneControlTransAPI.h |
Low-level drive control pass-through (SetDriveEx/GetDriveEx), for hardware-in-loop scenarios |
→ View |
Perception Layer
| Module |
Header File |
Description |
API Details |
| SensorAPI |
SimOneSensorAPI.h |
Read GPS, ground truth (obstacles), radar, ultrasonic, sensor fusion, lane lines, traffic lights, and environment data; supports polling and callback modes |
→ View |
| StreamingAPI |
SimOneStreamingAPI.h |
Camera image streams (RGB / JPEG / H265), LiDAR point cloud streams (large frame data, independent streaming protocol) |
→ View |
| V2XAPI |
SimOneV2XAPI.h |
V2X message reading (GetV2XInfo) and callback registration (SetV2XInfoUpdateCB), supports NFS format |
→ View |
Map Layer
| Module |
Header File |
Description |
API Details |
| HDMapAPI |
SimOneHDMapAPI.h |
Map loading (LoadHDMap), nearest lane query (GetNearMostLane), lane geometry (GetLaneST/GetLaneSample), route planning (GenerateRoute/Navigate), traffic light/sign/stop line queries |
→ View |
Scenario & Evaluation Layer
| Module |
Header File |
Description |
API Details |
| EvaluationAPI |
SimOneEvaluationAPI.h |
Evaluation service initialization (InitEvaluationService), record reporting (AddEvaluationRecord/SaveEvaluationRecord), judgment event callbacks (SetJudgeEventCB/AddJudgeEvent) |
→ View |
| ScenarioTransAPI |
SimOneScenarioTransAPI.h |
Write custom condition variables to the scenario engine (SetUserDefinedValueCondition) and read them back (GetUserDefinedValueCondition), used to trigger scenario rules |
→ View |
Global Function Index
Core Data Structures
All sensor input and vehicle state data structures are defined in SimOneIOStruct.h. Commonly used structs:
| Struct |
Purpose |
SimOne_Data_Gps |
Ego vehicle GPS (position, velocity, orientation) |
SimOne_Data_Obstacle |
Obstacle list (ground truth) |
SimOne_Data_Control |
Throttle / brake / steering output command |
SimOne_Data_Control_Trajectory |
Trajectory point list (for trajectory tracking mode) |
SimOne_Data_Image |
Camera image frame metadata |
SimOne_Data_TrafficLight |
Single traffic light state |
SimOne_Data_LaneInfo |
Lane perception information |
SimOne_Data_Environment |
Environment parameters (weather/lighting, etc.) |
Base container types: