跳转至

Namespace SimOneAPI

Namespace List > SimOneAPI

Classes

Type Name
struct LaneData
struct LaneData_
struct LaneIndexInfo_
struct LaneInfo
struct LaneInfo_
struct LaneLineTypeInfo_
struct LaneSample
struct LaneSample_
struct OverlapLaneInfo_
struct TyrePosInfo
struct TyrePosInfo_

Public Types

Type Name
enum EDirectionType_
enum ELaneLineType_

Public Functions

Type Name
bool AddEvaluationRecord (const char * mainVehicleId, const char * jsonString)
添加评价算法所需的各类信息(JSON格式) Add various types of information required for the evaluation algorithm (in JSON format).
bool AddJudgeEvent (const char * mainVehicleId, const char * data, bool terminate=false)
发送场景判定事件 Broadcast scenario judgment event information for report generation.
bool ContainsLane (const SSD::SimString & id)
查询指定车道是否存在于地图中 Check if the specified lane exists in the map.
int Continue ()
继续,用于非帧同步调试 Continue, used for non frame synchronized debugging.
bool GenerateRoute (const SSD::SimPoint3DVector & inputPoints, SSD::SimVector< int > & indexOfValidPoints, SSD::SimPoint3DVector & route)
获取路网路径规划 Get road network path planning.
bool GenerateRoute_V2 (const SSD::SimPoint3DVector & inputPoints, SSD::SimVector< int > & indexOfValidPoints, HDMapStandalone::MRoutePath & path, SSD::SimVector< HDMapStandalone::MRoutePoint > & routePtList)
获取路网路径规划详细信息 Get detailed information about road network path planning.
bool GetCaseInfo (SimOne_Data_CaseInfo * pCaseInfo)
获取案例详情 Get the details of the case.
ESimOne_Case_Status GetCaseRunStatus ()
获取案例运行状态 Get the status of the case (running, stopped).
bool GetControlMode (const char * mainVehicleId, SimOne_Data_Control_Mode * pControlMode)
获取车辆控制模式 Get the vehicle control mode.
void GetCrossHatchList (const SSD::SimString & id, SSD::SimVector< HDMapStandalone::MObject > & crossHatchList)
获取指定车道所在道路上的网状线列表 Get the mesh lines list on the road where the specified lane is located.
void GetCrosswalkList (const HDMapStandalone::MSignal & light, const SSD::SimString & id, SSD::SimVector< HDMapStandalone::MObject > & crosswalkList)
获取交通灯给定作用车道的关联人行横道线列表 Get the list of crosswalk lines associated with the traffic light for the given operating lane.
bool GetDistanceToLaneBoundary (const SSD::SimPoint3D & pos, SSD::SimString & id, double & distToLeft, double & distToRight, double & distToLeft2D, double & distToRight2D)
获取离最近车道左右边缘线的距离 Get the distance to the nearest lane's left and right boundary lines.
bool GetDriveEx (SimOne_Data_Control_Ex * pControlEx)
获取车辆扩展驾驶控制数据 Get vehicle extended drive control data.
bool GetDriverControl (const char * mainVehicleId, SimOne_Data_Control * pControl)
获取SimOneDriver控制信号 Get SimOneDriver drive control signals.
bool GetEnvironment (SimOne_Data_Environment * pEnvironment)
获取当前环境相关信息(天气、光照、地面等) Retrieve Current Environment-related Information (Weather, Lighting, Ground, etc)
LaneInfo GetForwardLaneInfo (const SSD::SimPoint3D & pos, const TyrePosInfo & tyrePosInfo, const double & forward)
获取前方车道信息 Get forward lane information.
bool GetForwardLaneSample (const SSD::SimPoint3D & inputPt, const SSD::SimString & id, const double & forward, SSD::SimVector< HDMapStandalone::MLaneInfo > & laneInfoList)
获取前方一定距离内的所有车道信息(包括车道ID、左右边缘线、虚拟中心线) Get all lane information (including lane ID, left and right boundary lines, virtual centerline) within a certain distance ahead.
bool GetGps (const char * mainVehicleId, SimOne_Data_Gps * pGps)
获取主车GPS信息 Get main vehicle GPS
bool GetGroundTruth (const char * mainVehicleId, SimOne_Data_Obstacle * pObstacle)
得到仿真场景中的物体的真值 Get Ground Truth Data of Objects(Obstacles) from simulation scene.
bool GetHDMapData (SimOne_Data_Map * hdMap)
获取高精度地图元数据信息 Retrieve high-precision map metadata information.
bool GetHeights (const SSD::SimPoint3D & inputPt, const double & radius, SSD::SimVector< double > & heights, SSD::SimVector< long > & roadIds, SSD::SimVector< bool > & insideRoadStates)
获取路网指定坐标点的高程列表 Get the elevation list for the specified coordinate point in the road network.
bool GetInertialFromLaneST (const SSD::SimString & id, const double & s, const double & t, SSD::SimPoint3D & inertial, SSD::SimPoint3D & dir)
根据车道ST坐标获取局部坐标 Get local coordinates based on lane ST coordinates.
void GetJunction (const long & junctionId, HDMapStandalone::MJunction & junction)
获取指定十字路口的详细信息 Get detailed information about the specified intersection.
void GetJunctionCenter (const SSD::SimString & junctionId, SSD::SimPoint3D & pos)
获取路口中心点的坐标 Get the coordinates of the center point of the junction.
void GetJunctionList (SSD::SimVector< SSD::SimString > & juncList)
获取所有交叉路口ID列表 Get a list of all Junction IDs.
void GetLaneData (SSD::SimVector< HDMapStandalone::MLaneInfo > & data)
获取所有车道线信息列表 Get a list of all lane line information.
double GetLaneLength (const SSD::SimString & id)
获取车道长度 Get the length of the lane.
void GetLaneLineInfo (SSD::SimVector< HDMapStandalone::MLaneLineInfo > & data)
获取所有车道线信息列表 Get a list of all lane line information.
bool GetLaneLink (const SSD::SimString & id, HDMapStandalone::MLaneLink & laneLink)
获取车道连接信息 Get lane connection information.
void GetLaneList (const long & roadId, SSD::SimStringVector & laneList)
获取指定道路ID内所有的车道名称 Get the names of all lanes within the specified road ID.
bool GetLaneMiddlePoint (const SSD::SimPoint3D & inputPt, const SSD::SimString & id, SSD::SimPoint3D & targetPoint, SSD::SimPoint3D & dir)
获取输入点投影到指定车道中心线上的点和切线方向 Get the point and tangent direction obtained by projecting the input point onto the centerline of the specified lane.
bool GetLaneST (const SSD::SimString & id, const SSD::SimPoint3D & pos, double & s, double & t)
获取相对于车道虚拟中心线的ST坐标 Get the ST coordinates relative to the lane's virtual centerline.
bool GetLaneSample (const SSD::SimString & id, HDMapStandalone::MLaneInfo & info)
获取车道信息(包含车道ID,左右边缘线,虚拟中心线) Get lane information (including lane ID, left and right boundary lines, virtual centerline).
bool GetLaneSampleByLocation (const SSD::SimPoint3D & pos, HDMapStandalone::MLaneInfo & info)
获取当前车辆位置所在车道的信息(包括车道ID、左右边缘线、虚拟中心线) Get lane information (including lane ID, left and right boundary lines, virtual centerline) for the current vehicle position.
bool GetLaneType (const SSD::SimString & id, HDMapStandalone::MLaneType & laneType)
获取车道类型 Get lane type.
bool GetLaneWidth (const SSD::SimString & id, const SSD::SimPoint3D & pos, double & width)
获取车道宽度 Get lane width.
bool GetMainVehicleList (SimOne_Data_MainVehicle_Info * pMainVehicleInfo)
获取主车信息列表 Retrieve the list of main vehicle information.
bool GetMainVehicleStatus (const char * mainVehicleId, SimOne_Data_MainVehicle_Status * pMainVehicleStatus)
获取主车状态信息 Get main vehicle status information.
bool GetNearLanes (const SSD::SimPoint3D & pos, const double & distance, SSD::SimStringVector & nearLanes)
获取临近车道列表 Get the list of nearby lanes.
bool GetNearLanesWithAngle (const SSD::SimPoint3D & pos, const double & distance, const double & headingAngle, const double & angleShift, SSD::SimStringVector & nearLanes)
获取视野范围内所有车道 Get all lanes within the field of view.
bool GetNearMostLane (const SSD::SimPoint3D & pos, SSD::SimString & id, double & s, double & t, double & s_toCenterLine, double & t_toCenterLine)
获取最接近输入点的车道,所属车道优先 Get the lane closest to the input point, prioritizing the lane to which it belongs.
void GetNextJunction (const SSD::SimPoint3D & inputPt, SSD::SimString & junctionName)
获取下一个路口 Get the next junction.
bool GetNextJunctionLights (const SSD::SimString & laneName, SSD::SimString & juncId, SSD::SimVector< HDMapStandalone::MSignal > & lights, SSD::SimVector< SSD::SimVector< int > > & validityIndexList)
获取下一个路口的信号灯信息 Get the traffic light information at the next junction.
bool GetParkingSpaceIds (const SSD::SimPoint3D & inputPt, double distance, SSD::SimStringVector & ids)
获取地图中指定点前方一定距离内的停车位列表 Get a list of parking spaces located ahead of a specified point in the map, within a certain distance.
void GetParkingSpaceList (SSD::SimVector< HDMapStandalone::MParkingSpace > & parkingSpaceList)
获取地图中停车位列表 Get a list of parking spaces in the map.
bool GetRadarDetections (const char * mainVehicleId, const char * sensorId, SimOne_Data_RadarDetection * pDetections)
得到毫米波雷达目标信息 Obtaining Millimeter-Wave Radar Target Information
double GetRoadLength (const long & roadId)
获取道路长度 Get the length of the road.
bool GetRoadMark (const SSD::SimPoint3D & pos, const SSD::SimString & id, HDMapStandalone::MRoadMark & left, HDMapStandalone::MRoadMark & right)
根据指定车道ID和局部坐标获取输入点左右两侧车道标线信息 Get lane marking information on both sides of the input point based on the specified lane ID and local coordinates.
bool GetRoadST (const SSD::SimString & id, const SSD::SimPoint3D & pos, double & s, double & t, double & z)
获取相对于道路参考线的ST坐标 Get the ST coordinates relative to the road reference line.
void GetRoadType (const SSD::SimString & roadId, SSD::SimVector< HDMapStandalone::MRoadTypeInfo > & roadTypeInfoList)
获取道路类型信息 Get the road type information.
bool GetSectionLaneList (const SSD::SimString & laneId, SSD::SimStringVector & sectionLaneList)
获取指定车道线所在Section的所有车道线ID列表 Get the list of lane line IDs for the specified lane line in the section.
void GetSectionList (const long & roadId, SSD::SimStringVector & rightList, SSD::SimStringVector & leftList)
获取section列表 Get the section list.
bool GetSensorConfigurations (const char * mainVehicleId, SimOne_Data_SensorConfigurations * pSensorConfigurations)
得到所有传感器的配置信息(Id、类型、频率、位置和朝向等) Retrieve Configuration Information for All Sensors (ID, Type, Frequency, Position, and Orientation, etc
bool GetSensorDetections (const char * mainVehicleId, const char * sensorId, SimOne_Data_SensorDetections * pGroundtruth)
获取传感器检测到物体的对应真值,支持的传感器包括目标级相机、目标级激光雷达、完美传感器 Retrieve Ground Truth Corresponding to Objects Detected by Sensors, including Object-Based Cameras, Object-Based LiDAR, and Perfect Sensors.
bool GetSensorLaneInfo (const char * mainVehicleId, const char * sensorId, SimOne_Data_LaneInfo * pLaneInfo)
获取传感器检测到车道与车道线数据,仅目标级相机和融合传感器支持 Retrieve Lane and Lane Line Data Detected by Sensors, Supported Only by Object-Based Cameras and Fusion Sensors.
bool GetSensorRoadMarkInfo (const char * mainVehicleId, const char * sensorId, SimOne_Data_RoadMarkInfo * pRoadMarkInfo)
获取传感器检测到地面喷漆信息包括车道停止线、地面箭头、人行横道线 Retrieve Sensor-Detected Ground Paint Information, including Lane Stop Lines, Ground Arrows, and Pedestrian Crosswalk Lines.
void GetSignalListOnLaneByType (const SSD::SimString & laneName, const SSD::SimString & type, SSD::SimVector< HDMapStandalone::MSignal > & signalInfo)
通过信号类型获取指定道路的车道指示信息,地面标识(type="Graphics") Get lane guidance information and ground markings (type="Graphics") for the specified road based on signal type.
bool GetSimOneWheelContactPoint (SimOne_Data_Wheel_Contact_Point * pWheelContactPoint)
获取车轮接触点信息 Get vehicle wheel contact point.
void GetSpecifiedLaneCrosswalkList (const SSD::SimString & id, SSD::SimVector< HDMapStandalone::MObject > & crosswalkList)
获取给定车道的关联人行横道线列表 Get the list of crosswalk lines associated with the given lane.
void GetSpecifiedLaneStoplineList (const SSD::SimString & id, SSD::SimVector< HDMapStandalone::MObject > & stoplineList)
获取给定车道的关联停止线列表 Get the list of stop lines associated with the given lane.
void GetSpecifiedLaneTrafficLightList (const SSD::SimString & id, SSD::SimVector< HDMapStandalone::MSignal > & list)
获取指定车道绑定的信号灯列表 Get the list of traffic lights associated with the specified lane.
void GetSpecifiedLaneTrafficSignalList (const SSD::SimString & id, SSD::SimVector< HDMapStandalone::MSignal > & list)
获取地图中指定车道关联交通标志列表 Get the list of traffic signs associated with the specified lane in the map.
void GetStoplineList (const HDMapStandalone::MSignal & light, const SSD::SimString & id, SSD::SimVector< HDMapStandalone::MObject > & stoplineList)
获取交通灯给定作用车道的关联停止线列表 Get the list of stop lines associated with the traffic light for the given operating lane.
SIMONE_NET_API bool GetStreamingImage (const char * ip, unsigned short port, SimOne_Streaming_Image * pImage)
获得物理级摄像头图像数据. Retrieve image data from streaming based camera.
SIMONE_NET_API bool GetStreamingPointCloud (const char * ip, unsigned short port, unsigned short infoPort, SimOne_Streaming_Point_Cloud * pPointCloud)
获得物理级激光雷达点云数据. Retrieve point cloud data from streaming based lidar.
SIMONE_NET_API bool GetStreamingRadar4DPointCloud (const char * ip, unsigned short port, SimOne_Streaming_Point_Cloud * pPointCloud)
获取毫米波雷达4D点云数据 Get Streaming Radar 4D PointCloud Data.
bool GetTopoGraph (HDMapStandalone::MTopoGraph & topoGraph)
获取拓扑信息 Get the topological graph.
bool GetTrafficLight (const char * mainVehicleId, int opendriveLightId, SimOne_Data_TrafficLight * pTrafficLight)
得到仿真场景中的交通灯的真值 Retrieve Ground Truth for Traffic Light Signals in the Simulation Scene
void GetTrafficLightList (SSD::SimVector< HDMapStandalone::MSignal > & list)
获取地图中信号灯列表 Get a list of traffic signals in the map.
void GetTrafficSignList (SSD::SimVector< HDMapStandalone::MSignal > & list)
获取地图中交通标志列表 Get a list of traffic signs in the map.
bool GetUltrasonicRadar (const char * mainVehicleId, const char * sensorId, SimOne_Data_UltrasonicRadar * pUltrasonic)
获得一个超声波雷达信息 Retrieve Individual Ultrasonic Radar Information
bool GetUltrasonicRadars (const char * mainVehicleId, SimOne_Data_UltrasonicRadars * pUltrasonics)
获得所有超声波雷达信息 Retrieve All Ultrasonic Radar Information for Vehicle Configuration
bool GetUserDefinedValueCondition (char * name, char * value)
获取OpenScenario中UserDefinedValueCondition的名称和值对 Get the pair of name and value which used in UserDefinedValueCondition in OpenScenario.
bool GetV2XInfo (const char * mainVehicleId, const char * sensorId, int infoType, SimOne_Data_V2XNFS * pDetections)
获得对应车辆编号V2X中的UPER编码之后的V2X消息 Retrieve V2X Message After UPER Encoding for the Corresponding Vehicle Identifier in V2X.
bool GetVehicleState (const char * mainVehicleId, SimOne_Data_Vehicle_Extra * pVehExtraState)
获取通过RegisterVehicleState注册的主车状态信息 Get states of main vehicle dynamics which are registered by RegisterVehicleState.
bool GetVehicleStatus_Array (double * pVehicleStatus, unsigned int size)
获取车辆状态数组 Get vehicle status array.
const char * GetVersion ()
获取当前库的版本号 Get the current version number of the library.
bool GetWayPoints (const char * mainVehicleId, SimOne_Data_WayPoints * pWayPoints)
获取案例主车路径点 Get Main Vehicle WayPoints.
bool GetWheelContactPoint_Array (double * pWheelContactPoint, unsigned int size)
获取车轮接触点数据数组 Get vehicle wheel contact point array.
bool InitEvaluationService (const char * mainVehicleId, const char * serviceIP="127.0.0.1", int port=8078, bool withMainVehicle=true, bool withObstacleNeeded=true)
初始化评价服务 Initialize service for evaluation of autonomous driving algorithms.
bool InitEvaluationServiceWithLocalData (const char * mainVehicleId, bool withMainVehicle=true, bool withObstacleNeeded=true)
初始化评价服务,本地存储数据 Initialize evaluation service with local data storage.
bool InitSimOneAPI (const char * mainVehicleId="0", bool isFrameSync=false, const char * serverIP="127.0.0.1", int port=23789, void(*)() startCase=0, void(*)() endCase=0, int registerNodeId=0)
初始化SimOne API Initialize the SimOne API.
bool InitSimOneAPIEx (char ** mainVehicleIdList, int count, bool isFrameSync=false, const char * serverIP="127.0.0.1", int port=23789, void(*)() startCase=0, void(*)() endCase=0, int registerNodeId=0)
多车版本-初始化SimOne API Initialize the SimOne API for the multi-vehicle version.
bool InitSimOneAPIExWithTimeOut (char ** mainVehicleIdList, int count, bool isFrameSync=false, const char * serverIP="127.0.0.1", int port=23789, int timeOutMS=-1, void(*)() startCase=0, void(*)() endCase=0, int registerNodeId=0)
多车版本 - 初始化SimOne API 带超时 Initialize the SimOne API with timeout for the multi-vehicle version.
bool InitSimOneAPIWithTimeOut (const char * mainVehicleId="0", bool isFrameSync=false, const char * serverIP="127.0.0.1", int port=23789, int timeOutMS=-1, void(*)() startCase=0, void(*)() endCase=0, int registerNodeId=0)
初始化SimOne API 带超时 Initialize the SimOne API with timeout.
bool IsDriving (const SSD::SimString & id)
判断车道是否为机动车道 Determine if the lane is a motor vehicle lane.
bool IsInJunction (const SSD::SimString & id, SSD::SimString & juncId)
判断车道是否在交叉路口内 Determine if the lane is within an intersection.
bool IsInsideLane (const SSD::SimPoint3D & inputPt, const SSD::SimString & laneName, HDMapStandalone::MSideState & sideState)
判断坐标点是否在车道内 Determine if the coordinate point is within the lane.
bool IsOverlapLaneLine (const SSD::SimPoint3D & pos, const double & radius, SSD::SimString & id)
判断给定位置是否与车道线重叠 Check if the specified position overlaps with a lane line.
bool IsTwoSideRoad (const long & roadId)
判断指定道路是否是双向道路 Determine if the specified road is a two-way road.
bool LoadHDMap (int timeOutSeconds)
加载高精度地图 Load the high-definition map.
bool Navigate (const SSD::SimPoint3DVector & inputPoints, SSD::SimVector< int > & indexOfValidPoints, SSD::SimVector< long > & roadIdList)
获取规划路径所途径道路的ID列表 Get the ID list of roads traversed by the planned path.
void NextFrame (int frame)
进行下一帧 Proceed to the next frame in a frame-synchronized scene.
int Pause ()
暂停,用于非帧同步调试 Pause, used for non frame synchronized debugging.
bool ReceiveRouteMessageCB (void(*)(int fromId, ESimOne_Client_Type fromType, int length, const void *pBuffer, int commandId) cb)
节点通信数据接收API Node communication data receiving API.
bool RegisterVehicleState (const char * mainVehicleId, ESimOne_Data_Vehicle_State * pStateIndics, int size)
注册SimOne_Data_Gps包含的状态以外的主车状态信息 Register states of main vehicle dynamics beyond those included inSimOne_Data_Gps .
bool SaveEvaluationRecord ()
保存评价算法所需的各类信息(JSON格式) Save various types of information required for the evaluation algorithm (in JSON format).
bool SendRouteMessage (int length, void * pBuffer, int msgId, int toNodeId, ESimOne_Client_Type toNodeType)
节点通信数据发送API Node communication data sending API.
bool SetDrive (const char * mainVehicleId, SimOne_Data_Control * pControl)
主车控制 Set vehicle drive control.
bool SetDriveEx (const char * mainVehicleId, SimOne_Data_Control_Ex * pControlEx)
设置车辆扩展驾驶控制 Set vehicle extended drive control.
bool SetDriveMode (const char * mainVehicleId, ESimOne_Drive_Mode driveMode)
主车控制模式 Set the driving mode of the vehicle dynamics.
bool SetDriveTrajectory (const char * mainVehicleId, SimOne_Data_Control_Trajectory * pControlTrajectory)
主车控制:通过规划轨迹进行控制 Set vehicle drive control by planning trajectory.
void SetDriverName (const char * mainVehicleId, const char * name)
设置主车控制器的名字 Set the main vehicle driver's name.
bool SetEnvironment (SimOne_Data_Environment * pEnvironment)
设置当前环境相关信息(天气、光照、地面等) Set Current Environment-related Information (Weather, Lighting, Ground, etc.)
bool SetFrameCB (void(*)(int frame) FrameStart, void(*)(int frame) FrameEnd)
仿真场景中每帧的回调函数 Callback function for each frame in a simulation scene.
bool SetGpsUpdateCB (void(*)(const char *mainVehicleId, SimOne_Data_Gps *pGps) cb)
注册主车GPS更新回调 Register callback function of applying for GPS information.
bool SetGroundTruthUpdateCB (void(*)(const char *mainVehicleId, SimOne_Data_Obstacle *pObstacle) cb)
注册仿真场景中物体真值的更新回调 Register callback function of applying for objects' ground truth.
bool SetJudgeEventCB (void(*)(const char *mainVehicleId, SimOne_Data_JudgeEvent *judgeEventDetailInfo) cb)
场景判定事件回调 Callback for scenario judgment events.
bool SetLogOut (ESimOne_LogLevel_Type level, const char * format, ...)
日志设置接口 Logging configuration interface.
bool SetMainVehicleStatusUpdateCB (void(*)(const char *mainVehicleId, SimOne_Data_MainVehicle_Status *pMainVehicleStatus) cb)
获取主车状态信息回调的函数 Get main vehicle status callback function.
bool SetPose (const char * mainVehicleId, SimOne_Data_Pose_Control * pPose)
设置主车位置 Set the main vehicle's pose.
void SetPubVehicleStatusConfigFile (const char * configFile)
设置车辆状态DDS配置文件 Set DDS config file with full path.
void SetPubWheelContactPointConfigFile (const char * configFile)
设置车轮接触点DDS发布配置文件 Set DDS config file with full path for wheel contact point publishing.
bool SetRadarDetectionsUpdateCB (void(*)(const char *mainVehicleId, const char *sensorId, SimOne_Data_RadarDetection *pDetections) cb)
毫米波雷达目标信息回调 Register Millimeter-Wave Radar Target Information Callback
bool SetScenarioEventCB (void(*)(const char *source, const char *target, const char *type, const char *content) cb)
场景事件回调 Register the callback for scenario events.
bool SetSensorDetectionsUpdateCB (void(*)(const char *mainVehicleId, const char *sensorId, SimOne_Data_SensorDetections *pGroundtruth) cb)
传感器真值信息更新回调,支持的传感器包括目标级相机、目标级激光雷达、完美传感器 Registering Callback for Sensor Ground Truth Information Updates, supporting sensors such as Object-Based Cameras, Object-Based LiDAR, and Perfect Sensors.
bool SetSensorLaneInfoCB (void(*)(const char *mainVehicleId, const char *sensorId, SimOne_Data_LaneInfo *pLaneInfo) cb)
获取传感器检测到车道与车道线数据回调 Callback to Retrieve Lane and Lane Line Data Detected by Sensors, Supported Only by Object-Based Cameras and Fusion Sensors
bool SetSensorRoadMarkInfoCB (void(*)(const char *mainVehicleId, const char *sensorId, SimOne_Data_RoadMarkInfo *pRoadMarkInfo) cb)
获取传感器检测到地面喷漆信息包括车道停止线、地面箭头、人行横道线数据回调 Callback to Retrieve Sensor-Detected Ground Paint Information, including Lane Stop Lines, Ground Arrows, and Pedestrian Crosswalk Line Data, Supported Only by Object-Based Cameras
bool SetSignalLights (const char * mainVehicleId, SimOne_Data_Signal_Lights * pSignalLights)
设置车辆信号灯状态 Set signal lights for the vehicle.
bool SetSimOneVehicleStatus (const char * mainVehicleId, SimOne_Data_Vehicle_Status * pStatusData)
设置车辆驾驶控制状态 Set vehicle drive control.
SIMONE_NET_API bool SetStreamingImageUpdateCB (const char * ip, unsigned short port, void(*)(SimOne_Streaming_Image *pImage) cb)
获得物理级摄像头图像数据更新回调. Callback for Updates on image data from streaming based camera.
SIMONE_NET_API bool SetStreamingPointCloudUpdateCB (const char * ip, unsigned short port, unsigned short infoPort, void(*)(SimOne_Streaming_Point_Cloud *pPointCloud) cb)
获得物理级激光雷达点云数据更新回调. Callback for Updates on point cloud data from streaming based lidar.
SIMONE_NET_API bool SetStreamingRadar4DPointCloudUpdateCB (const char * ip, unsigned short port, void(*)(SimOne_Streaming_Point_Cloud *pPointCloud) cb)
毫米波雷达4D点云数据更新回调 Streaming Radar 4D PointCloud Data update callback.
void SetSubVehicleStatusConfigFile (const char * configFile)
设置车辆状态DDS订阅配置文件 Set DDS config file with full path for vehicle status subscribing.
void SetSubWheelContactPointConfigFile (const char * configFile)
设置车轮接触点DDS订阅配置文件 Set DDS config file with full path for wheel contact point subscribing.
bool SetTrajectory (const char * mainVehicleId, SimOne_Data_Trajectory * Trajectory)
预测轨迹设置 Set vehicle waypoints.
bool SetUltrasonicRadarsCB (void(*)(const char *mainVehicleId, SimOne_Data_UltrasonicRadars *pUltrasonics) cb)
超声波雷达真值信息更新回调 Register the callback func applying for ultrasonics radar detections
bool SetUserDefinedValueCondition (char * name, char * value)
设置OpenScenario中UserDefinedValueCondition的名称和值对 Set the pair of name and value which used in UserDefinedValueCondition in OpenScenario.
bool SetV2XInfoUpdateCB (void(*)(const char *mainVehicleId, const char *sensorId, SimOne_Data_V2XNFS *pDetections) cb)
获得对应车辆编号V2X中的UPER编码之后的V2X消息更新回调 Callback for Updates on V2X Messages After UPER Encoding for the Corresponding Vehicle Identifier in V2X.
bool SetVehicleEvent (const char * mainVehicleId, SimOne_Data_Vehicle_EventInfo * pEvent)
设置主车预警消息 Set vehicle event information.
bool SetVehicleInitState (const char * mainVehicleId, SimOne_Vehicle_Init_State initState)
设置主车初始状态 Set the main vehicle initial state.
bool SetVehicleStatus_Array (double * pStatusData, unsigned int size)
设置车辆状态数组 Set vehicle status array.
bool SetVehicleToInitState (const char * mainVehicleId)
重置主车到初始状态 Reset the main vehicle state to the initial state.
bool SetWheelContactPoint_Array (double * pWheelContactPointData, unsigned int size)
设置车轮接触点数据数组 Set vehicle wheel contact point array.
bool TerminateSimOneAPI ()
退出API节点 Exit the API node.
int Wait ()
等待并获取当前帧值 Wait and get the current frame value.
void setHdmapLoad ()
直接设置高精地图已经初始化完成 Directly set that the high-definition map has been initialized successfully.

Public Types Documentation

enum EDirectionType_

enum SimOneAPI::EDirectionType_ {
    Forward = 0,
    TurnLeft = 1,
    TurnRight = 2,
    TurnBack = 3,
    ForwardAndTurnLeft = 4,
    ForwardAndTurnRight = 5,
    ForwardAndTurnBack = 6,
    TurnLeftAndTurnBack = 7
};

enum ELaneLineType_

enum SimOneAPI::ELaneLineType_ {
    none = 0,
    whiteSolid = 1,
    whiteDotted = 2,
    yellowSolid = 3,
    yellowDotted = 4
};

Public Functions Documentation

function AddEvaluationRecord

添加评价算法所需的各类信息(JSON格式) Add various types of information required for the evaluation algorithm (in JSON format).

bool SimOneAPI::AddEvaluationRecord (
    const char * mainVehicleId,
    const char * jsonString
) 

此函数用于为评价算法添加记录,记录以JSON格式提供,包括属性类别、时间戳等信息 This function is used to add records for the evaluation algorithm. The records are provided in JSON format and include information such as property category, timestamp, etc.

Parameters:

  • mainVehicleId 主车的ID ID of the main vehicle.
  • jsonString 评价记录的JSON格式字符串,可通过JSON dump生成。例如:{"category": "signal", "timestamp": 1648363819335, "ACC": "on", "ACCSpeed": 20} JSON format string for the evaluation record, which can be generated by a JSON dump. For example: {"category": "signal", "timestamp": 1648363819335, "ACC": "on", "ACCSpeed": 20}.

Returns:

成功添加返回true,否则返回false Returns true if successfully added, false otherwise.


function AddJudgeEvent

发送场景判定事件 Broadcast scenario judgment event information for report generation.

bool SimOneAPI::AddJudgeEvent (
    const char * mainVehicleId,
    const char * data,
    bool terminate=false
) 

此函数用于发送场景中的判定事件信息,通常用于报告生成 This function is used to broadcast judgment event information in a scenario, typically for report generation.

Parameters:

  • mainVehicleId 主车的ID ID of the main vehicle.
  • data 场景的判定事件信息 Judge event information of the scenario.
  • terminate 是否终止场景,默认为false Whether to terminate the scenario, default is false.

Returns:

成功发送返回true,否则返回false Returns true if successfully broadcast, false otherwise.


function ContainsLane

查询指定车道是否存在于地图中 Check if the specified lane exists in the map.

bool SimOneAPI::ContainsLane (
    const SSD::SimString & id
) 

此函数用于检查当前地图中是否存在指定ID的车道 This function is used to check whether a lane with the specified ID exists in the current map.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.

Returns:

如果存在则返回true,否则返回false Returns true if it exists, else returns false.


function Continue

继续,用于非帧同步调试 Continue, used for non frame synchronized debugging.

int SimOneAPI::Continue () 

此函数用于在暂停后继续运行当前案例,通常在非帧同步的调试过程中使用 This function is used to resume running the current case after a pause, typically in non-frame synchronized debugging scenarios.

Returns:

返回整数状态码,0表示成功,非0表示失败 Returns an integer status code, 0 indicates success, non-zero indicates failure.


function GenerateRoute

获取路网路径规划 Get road network path planning.

bool SimOneAPI::GenerateRoute (
    const SSD::SimPoint3DVector & inputPoints,
    SSD::SimVector < int > & indexOfValidPoints,
    SSD::SimPoint3DVector & route
) 

此函数用于根据指定的输入点生成路线。它将从输入点中筛选出有效点,并利用这些点来规划路线 This function is used to generate a route for specified input points. It picks valid ones from the input points, which will be used for generating the route.

Parameters:

  • inputPoints 用于引导生成路线的输入点 Input points that guide the generated route.
  • indexOfValidPoints 从输入点中选出的有效点的索引 Indices of valid points picked from input points.
  • route 生成的路线 Generated route.

Returns:

如果已生成任何路线,则返回true,否则返回false Returns true if any route has been generated, else returns false.


function GenerateRoute_V2

获取路网路径规划详细信息 Get detailed information about road network path planning.

bool SimOneAPI::GenerateRoute_V2 (
    const SSD::SimPoint3DVector & inputPoints,
    SSD::SimVector < int > & indexOfValidPoints,
    HDMapStandalone::MRoutePath & path,
    SSD::SimVector < HDMapStandalone::MRoutePoint > & routePtList
) 

此函数用于根据输入点生成路网的路径规划详细信息,包括路线的途径点和段信息 This function is used to generate detailed information of road network path planning based on input points, including waypoints and segment information of the route.

Parameters:

  • inputPoints 用于指导生成路线应通过的输入点 Input points that guide the generated route should pass over.
  • indexOfValidPoints 从输入点中选择有效的点 Pick valid ones from input points. Valid ones will be used for generating route.
  • path 生成路线的途径点和段信息 Waypoints and segment info of the generated route.
  • routePtList 生成路线的车道详细信息 Lane detail information of the generated route.

Returns:

如果生成了任何路线,则返回true,否则返回false Returns true if any route has been generated, else returns false.


function GetCaseInfo

获取案例详情 Get the details of the case.

bool SimOneAPI::GetCaseInfo (
    SimOne_Data_CaseInfo * pCaseInfo
) 

此函数用于获取当前模拟案例的详细信息 This function is used to retrieve detailed information about the current simulation case.

Parameters:

  • pCaseInfo 指向案例信息结构的指针,包括案例名称、案例ID、任务ID和会话ID Pointer to the case information structure, including case name, case ID, task ID, and session ID.

Returns:

成功获取返回true,否则返回false Returns true if information is successfully retrieved, false otherwise.


function GetCaseRunStatus

获取案例运行状态 Get the status of the case (running, stopped).

ESimOne_Case_Status SimOneAPI::GetCaseRunStatus () 

此函数用于检索当前模拟案例的运行状态,如运行中或已停止 This function is used to retrieve the running status of the current simulation case, such as running or stopped.

Returns:

返回案例的运行状态,如停止或运行中 Returns the running status of the case, such as Stopped or Running.


function GetControlMode

获取车辆控制模式 Get the vehicle control mode.

bool SimOneAPI::GetControlMode (
    const char * mainVehicleId,
    SimOne_Data_Control_Mode * pControlMode
) 

此函数用于获取主车的当前控制模式 This function is used to retrieve the current control mode of the main vehicle.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pControlMode 车辆控制模式 Vehicle control mode.

Returns:

如果成功获取控制模式,则返回true,否则返回false Returns true if the control mode is successfully retrieved, false otherwise.


function GetCrossHatchList

获取指定车道所在道路上的网状线列表 Get the mesh lines list on the road where the specified lane is located.

void SimOneAPI::GetCrossHatchList (
    const SSD::SimString & id,
    SSD::SimVector < HDMapStandalone::MObject > & crossHatchList
) 

此函数用于获取在指定车道所在道路附近的网状线列表 This function is used to get the list of cross hatches in the neighborhood of the road where the specified lane is located.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • crossHatchList 与指定车道相关的网状线列表 List of cross hatches associated with the specified lane.

function GetCrosswalkList

获取交通灯给定作用车道的关联人行横道线列表 Get the list of crosswalk lines associated with the traffic light for the given operating lane.

void SimOneAPI::GetCrosswalkList (
    const HDMapStandalone::MSignal & light,
    const SSD::SimString & id,
    SSD::SimVector < HDMapStandalone::MObject > & crosswalkList
) 

此函数用于获取与交通灯相关联并与指定车道匹配的人行横道线列表 This function is used to get the list of crosswalks that are associated with a traffic light and matched to a specified lane.

Parameters:

  • light 交通灯对象 Traffic light object.
  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • crosswalkList 与交通灯关联的人行横道线列表 List of crosswalks that are associated with the traffic light.

function GetDistanceToLaneBoundary

获取离最近车道左右边缘线的距离 Get the distance to the nearest lane's left and right boundary lines.

bool SimOneAPI::GetDistanceToLaneBoundary (
    const SSD::SimPoint3D & pos,
    SSD::SimString & id,
    double & distToLeft,
    double & distToRight,
    double & distToLeft2D,
    double & distToRight2D
) 

此函数用于获取输入位置到最近车道左右边界线的距离信息,包括3D空间和2D空间(忽略高度)中的距离 This function is used to get the distance information from the input location to the nearest lane's left and right boundaries in both 3D and 2D space (ignoring height).

Parameters:

  • pos 输入的3D位置 Input 3D location.
  • id 找到的车道ID,格式为roadId_sectionIndex_laneId Lane ID of the found lane, formatted as roadId_sectionIndex_laneId.
  • distToLeft 3D空间中到左边界的距离 The distance to left boundary in 3D space.
  • distToRight 3D空间中到右边界的距离 The distance to right boundary in 3D space.
  • distToLeft2D 2D空间中到左边界的距离(忽略高度) The distance to left boundary in 2D space (ignoring height).
  • distToRight2D 2D空间中到右边界的距离(忽略高度) The distance to right boundary in 2D space (ignoring height).

Returns:

当找到最近的车道时返回true,否则返回false Returns true if the nearest lane is found, else returns false.


function GetDriveEx

获取车辆扩展驾驶控制数据 Get vehicle extended drive control data.

bool SimOneAPI::GetDriveEx (
    SimOne_Data_Control_Ex * pControlEx
) 

Parameters:

  • pControlEx 车辆扩展控制数据(输出) Vehicle extended control data (output).

Returns:

成功获取返回true,否则返回false Returns true if successful, false otherwise.


function GetDriverControl

获取SimOneDriver控制信号 Get SimOneDriver drive control signals.

bool SimOneAPI::GetDriverControl (
    const char * mainVehicleId,
    SimOne_Data_Control * pControl
) 

此函数用于获取SimOneDriver提供的主车驾驶控制数据 This function is used to retrieve the main vehicle's driving control data provided by SimOneDriver.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pControl 由SimOneDriver提供的车辆控制数据 Vehicle control data from SimOneDriver.

Returns:

如果成功获取控制数据,则返回true,否则返回false Returns true if the control data is successfully retrieved, false otherwise.


function GetEnvironment

获取当前环境相关信息(天气、光照、地面等) Retrieve Current Environment-related Information (Weather, Lighting, Ground, etc)

bool SimOneAPI::GetEnvironment (
    SimOne_Data_Environment * pEnvironment
) 

此函数用于获取当前仿真场景环境信息 This function is used to get the current simulation environment information.

Parameters:

  • pEnvironment 仿真环境信息 simulation environment data

Returns:

如果成功获取仿真场景环境信息,则返回true,否则返回false Returns true if the simulation environment data is successfully retrieved, false otherwise


function GetForwardLaneInfo

获取前方车道信息 Get forward lane information.

LaneInfo SimOneAPI::GetForwardLaneInfo (
    const SSD::SimPoint3D & pos,
    const TyrePosInfo & tyrePosInfo,
    const double & forward
) 

此函数用于获取从指定位置开始向前指定距离的车道信息,包括车道的位置和特性 This function is used to get lane information for a certain distance in the forward direction from the specified position, including the lane's position and characteristics.

Parameters:

  • pos 指定位置的坐标 The coordinates of the specified position.
  • tyrePosInfo 轮胎位置信息 Tyre position information.
  • forward 检索前方车道信息的距离 The distance for retrieving forward lane information.

Returns:

指定位置前方的车道信息 Lane information for the forward direction from the specified position.


function GetForwardLaneSample

获取前方一定距离内的所有车道信息(包括车道ID、左右边缘线、虚拟中心线) Get all lane information (including lane ID, left and right boundary lines, virtual centerline) within a certain distance ahead.

bool SimOneAPI::GetForwardLaneSample (
    const SSD::SimPoint3D & inputPt,
    const SSD::SimString & id,
    const double & forward,
    SSD::SimVector < HDMapStandalone::MLaneInfo > & laneInfoList
) 

此函数用于获取当前位置前方特定距离内的车道样本信息,包括车道ID、左右边缘线和虚拟中心线 This function is used to get lane sample information within a certain distance ahead of the current position, including lane ID, left and right boundary lines, and the virtual centerline.

Parameters:

  • inputPt 当前的3D位置 Input current 3D position, pos is a 3D point.
  • id 找到的车道ID,格式为roadId_sectionIndex_laneId Lane ID of the found lane, formatted as roadId_sectionIndex_laneId.
  • forward 输入点前方的距离 The forward distance from the input point.
  • laneInfoList 指定前向范围内的车道信息(HDMapStandalone::MLaneInfo) Lane information (HDMapStandalone::MLaneInfo) for the specified forward range.

Returns:

如果地图中存在指定的车道,则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false.


function GetGps

获取主车GPS信息 Get main vehicle GPS

bool SimOneAPI::GetGps (
    const char * mainVehicleId,
    SimOne_Data_Gps * pGps
) 

此函数用于获取主车当前GPS信息 This function is used to get current GPS data of the main vehicle

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle
  • pGps GPS消息 GPS data

Returns:

如果成功获取GPS数据,则返回true,否则返回false Returns true if the GPS data is successfully retrieved, false otherwise


function GetGroundTruth

得到仿真场景中的物体的真值 Get Ground Truth Data of Objects(Obstacles) from simulation scene.

bool SimOneAPI::GetGroundTruth (
    const char * mainVehicleId,
    SimOne_Data_Obstacle * pObstacle
) 

此函数用于获取仿真场景中物体的真值 This function is used to get the obstacle ground truth in scenario.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle
  • pObstacle 物体真值消息 Obstacle data

Returns:

如果成功获取感知物数据,则返回true,否则返回false Returns true if the obstacle data is successfully retrieved, false otherwise


function GetHDMapData

获取高精度地图元数据信息 Retrieve high-precision map metadata information.

bool SimOneAPI::GetHDMapData (
    SimOne_Data_Map * hdMap
) 

此函数用于获取在SimOne网络应用中配置的高精度地图数据 This function is used to retrieve high-precision map data as configured in the SimOne web application.

Parameters:

  • hdMap 指向高精度地图数据的指针 Pointer to high-precision map data.

Returns:

成功获取返回true,否则返回false Returns true if the information is successfully retrieved, false otherwise.


function GetHeights

获取路网指定坐标点的高程列表 Get the elevation list for the specified coordinate point in the road network.

bool SimOneAPI::GetHeights (
    const SSD::SimPoint3D & inputPt,
    const double & radius,
    SSD::SimVector < double > & heights,
    SSD::SimVector < long > & roadIds,
    SSD::SimVector < bool > & insideRoadStates
) 

此函数用于获取输入点半径范围内的高程列表。这个点可能与多个不同高度的道路垂直交叉,例如在高速公路或隧道上 This function is used to get a list of heights in the radius area of an input point, which may intersect vertically with multiple roads at different heights, e.g., on highways or in tunnels.

Parameters:

  • inputPt 输入的3D位置 Input 3D location.
  • radius 检测范围的半径 Radius indicates how far away to detect in a circle. It should be set larger than 3 meters in length. Setting it as 3 meters is recommended.
  • heights 返回的高程/一个高程 Returns heights/one height.
  • roadIds 返回高程所依据的道路ID Returns the road IDs that the target height is based on.
  • insideRoadStates 返回输入点是否在目标道路内 Returns whether the input point is inside the target roads or not.

Returns:

如果找到任何高程则返回true,否则返回false Returns true if any height is found, else returns false.


function GetInertialFromLaneST

根据车道ST坐标获取局部坐标 Get local coordinates based on lane ST coordinates.

bool SimOneAPI::GetInertialFromLaneST (
    const SSD::SimString & id,
    const double & s,
    const double & t,
    SSD::SimPoint3D & inertial,
    SSD::SimPoint3D & dir
) 

此函数用于根据车道的中心线相对的[s, t]坐标值对获取局部ENU坐标系中的[x, y, z]位置 This function is used to obtain the [x, y, z] position in the local ENU coordinate system, based on the [s, t] value pair relative to the lane's center line.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • s [s, t]表示在s-t坐标系统中的输入点s值 [s, t] represents the input point's s value in the s-t coordinate system.
  • t [s, t]表示在s-t坐标系统中的输入点t值 [s, t] represents the input point's t value in the s-t coordinate system.
  • inertial 局部ENU坐标系中的[x, y, z]位置 The [x, y, z] position in local ENU.
  • dir 车道中线上的局部ENU方向 The direction in local ENU on the lane's middle line.

Returns:

如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false.


function GetJunction

获取指定十字路口的详细信息 Get detailed information about the specified intersection.

void SimOneAPI::GetJunction (
    const long & junctionId,
    HDMapStandalone::MJunction & junction
) 

此函数用于获取指定十字路口ID的详细信息,包括交叉路口的结构和特性 This function is used to get detailed information of the specified junction ID, including the structure and characteristics of the intersection.

Parameters:

  • junctionId 输入的十字路口ID Input junction ID.
  • junction 指定十字路口的详细信息,格式为MJunction Junction detail information as MJunction.

function GetJunctionCenter

获取路口中心点的坐标 Get the coordinates of the center point of the junction.

void SimOneAPI::GetJunctionCenter (
    const SSD::SimString & junctionId,
    SSD::SimPoint3D & pos
) 

此函数用于检索指定路口的中心点的3D坐标 This function is used to retrieve the 3D coordinates of the center point of the specified junction.

Parameters:

  • junctionId 路口的ID The ID of the junction.
  • pos 中心点的3D坐标 The 3D coordinates of the center point.

function GetJunctionList

获取所有交叉路口ID列表 Get a list of all Junction IDs.

void SimOneAPI::GetJunctionList (
    SSD::SimVector < SSD::SimString > & juncList
) 

此函数用于获取地图中所有交叉路口的ID,并输出到参数 juncList 中 This function is used to get all junction IDs in the map and output them to juncList.

Parameters:

  • juncList 存储所有交叉路口ID的列表 juncList stores all junction IDs.

function GetLaneData

获取所有车道线信息列表 Get a list of all lane line information.

void SimOneAPI::GetLaneData (
    SSD::SimVector < HDMapStandalone::MLaneInfo > & data
) 

此函数用于获取地图中所有车道的信息 This function is used to get information for all lanes in the map.

Parameters:

  • data 地图中所有车道的MLaneInfo对象列表 List of all MLaneInfo objects for lanes in the map.

function GetLaneLength

获取车道长度 Get the length of the lane.

double SimOneAPI::GetLaneLength (
    const SSD::SimString & id
) 

此函数用于获取指定车道ID的车道长度 This function is used to get the length of the lane for a given lane ID.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.

Returns:

返回指定车道的长度 Returns the length of the lane.


function GetLaneLineInfo

获取所有车道线信息列表 Get a list of all lane line information.

void SimOneAPI::GetLaneLineInfo (
    SSD::SimVector < HDMapStandalone::MLaneLineInfo > & data
) 

此函数用于获取地图中所有车道线的信息,包括每条车道线的具体特征 This function is used to get information of all lane lines in the map, including specific characteristics of each lane line.

Parameters:

  • data 地图中所有车道线的MLaneLineInfo对象列表 List of all MLaneLineInfo objects for lane lines in the map.

获取车道连接信息 Get lane connection information.

bool SimOneAPI::GetLaneLink (
    const SSD::SimString & id,
    HDMapStandalone::MLaneLink & laneLink
) 

此函数用于基于车道ID获取车道的连接信息 This function is used to get a lane's link information based on the lane's ID.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • laneLink 指定车道的连接信息(HDMapStandalone::MLaneLink) Lane link information (HDMapStandalone::MLaneLink) of the specified lane.

Returns:

如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false.


function GetLaneList

获取指定道路ID内所有的车道名称 Get the names of all lanes within the specified road ID.

void SimOneAPI::GetLaneList (
    const long & roadId,
    SSD::SimStringVector & laneList
) 

此函数用于获取属于指定道路ID的所有车道的名称列表 This function is used to get the list of names of all lanes that belong to the specified road ID.

Parameters:

  • roadId 输入的道路ID Input road ID.
  • laneList 指定道路ID内的车道名称列表 List of lane names within the specified road ID.

function GetLaneMiddlePoint

获取输入点投影到指定车道中心线上的点和切线方向 Get the point and tangent direction obtained by projecting the input point onto the centerline of the specified lane.

bool SimOneAPI::GetLaneMiddlePoint (
    const SSD::SimPoint3D & inputPt,
    const SSD::SimString & id,
    SSD::SimPoint3D & targetPoint,
    SSD::SimPoint3D & dir
) 

此函数用于获取输入点投影到指定车道中心线上的目标点和该点的切线方向 This function is used to get the target point where the input point is projected onto the specified lane's middle line, and the tangent direction at that point.

Parameters:

  • inputPt 输入的3D位置 Input 3D location.
  • id 找到的车道ID,格式为roadId_sectionIndex_laneId Lane ID of the found lane, formatted as roadId_sectionIndex_laneId.
  • targetPoint 指定车道中心线上的目标点 The target point that is on the specified lane's middle line.
  • dir 车道中心线上目标点的切线方向 The tangent direction at the target point on the lane's middle line.

Returns:

当找到任何车道时返回true,否则返回false Returns true when any lane is found, else returns false.


function GetLaneST

获取相对于车道虚拟中心线的ST坐标 Get the ST coordinates relative to the lane's virtual centerline.

bool SimOneAPI::GetLaneST (
    const SSD::SimString & id,
    const SSD::SimPoint3D & pos,
    double & s,
    double & t
) 

此函数用于获取输入点相对于指定车道中心线的[s, t]坐标值对 This function is used to obtain the [s, t] coordinate pair of the input point relative to the centerline of the specified lane.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • pos 输入的3D位置 Input 3D location.
  • s 输入点在s-t坐标系统中相对于指定车道s值 The input point's s value in the s-t coordinate system, relative to the specified lane.
  • t 输入点在s-t坐标系统中相对于指定车道t值 The input point's t value in the s-t coordinate system, relative to the specified lane.

Returns:

如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false.


function GetLaneSample

获取车道信息(包含车道ID,左右边缘线,虚拟中心线) Get lane information (including lane ID, left and right boundary lines, virtual centerline).

bool SimOneAPI::GetLaneSample (
    const SSD::SimString & id,
    HDMapStandalone::MLaneInfo & info
) 

此函数用于获取特定车道的详细信息,包括车道ID、左右边缘线和虚拟中心线 This function is used to get detailed information of a specified lane, including the lane ID, left and right boundary lines, and the virtual centerline.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • info 指定车道的信息(HDMapStandalone::MLaneInfo) Lane information (HDMapStandalone::MLaneInfo) of the specified lane.

Returns:

如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false.


function GetLaneSampleByLocation

获取当前车辆位置所在车道的信息(包括车道ID、左右边缘线、虚拟中心线) Get lane information (including lane ID, left and right boundary lines, virtual centerline) for the current vehicle position.

bool SimOneAPI::GetLaneSampleByLocation (
    const SSD::SimPoint3D & pos,
    HDMapStandalone::MLaneInfo & info
) 

此函数用于根据输入的3D位置获取该位置所在车道的详细信息,包括车道ID、左右边缘线和虚拟中心线 This function is used to get detailed information of the lane at a given 3D location, including lane ID, left and right boundary lines, and the virtual centerline.

Parameters:

  • pos 输入的3D位置 Input 3D location.
  • info 指定位置所在车道的信息(HDMapStandalone::MLaneInfo) Lane information (HDMapStandalone::MLaneInfo) of the lane at the specified location.

Returns:

如果在地图中找到指定位置的车道,则返回true,否则返回false Returns true if the lane at the specified location exists in the map, else returns false.


function GetLaneType

获取车道类型 Get lane type.

bool SimOneAPI::GetLaneType (
    const SSD::SimString & id,
    HDMapStandalone::MLaneType & laneType
) 

此函数用于获取指定车道ID的车道类型 This function is used to get the type of a lane specified by its ID.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • laneType 指定车道的类型 Lane type of the specified lane.

Returns:

如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false.


function GetLaneWidth

获取车道宽度 Get lane width.

bool SimOneAPI::GetLaneWidth (
    const SSD::SimString & id,
    const SSD::SimPoint3D & pos,
    double & width
) 

此函数用于获取指定点的双切线方向上的车道宽度 This function is used to get the lane's width in the bitangent direction of a specified point.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • pos 输入的3D位置 Input 3D location.
  • width 指定车道的宽度 Lane width of the specified lane.

Returns:

如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false.


function GetMainVehicleList

获取主车信息列表 Retrieve the list of main vehicle information.

bool SimOneAPI::GetMainVehicleList (
    SimOne_Data_MainVehicle_Info * pMainVehicleInfo
) 

此函数用于获取主车信息列表,通常只需要检索一次 This function is used to retrieve the list of main vehicle information, which typically only needs to be retrieved once.

Parameters:

  • pMainVehicleInfo 指向主车信息结构的指针,包括车辆ID、数量和类型 Pointer to the main vehicle information structure, including vehicle ID, number, and type.

Returns:

成功获取返回true,否则返回false Returns true if the information is successfully retrieved, false otherwise.


function GetMainVehicleStatus

获取主车状态信息 Get main vehicle status information.

bool SimOneAPI::GetMainVehicleStatus (
    const char * mainVehicleId,
    SimOne_Data_MainVehicle_Status * pMainVehicleStatus
) 

此函数用于获取指定主车的状态信息 This function is used to retrieve the status information of a specified main vehicle.

Parameters:

  • mainVehicleId 主车的ID ID of the main vehicle.
  • pMainVehicleStatus 指向主车状态信息的指针 Pointer to the main vehicle status information.

Returns:

成功获取返回true,否则返回false Returns true if the information is successfully retrieved, false otherwise.


function GetNearLanes

获取临近车道列表 Get the list of nearby lanes.

bool SimOneAPI::GetNearLanes (
    const SSD::SimPoint3D & pos,
    const double & distance,
    SSD::SimStringVector & nearLanes
) 

此函数用于获取指定范围内与输入点临近的车道列表 This function is used to get a list of lanes that are close to the input point within a specified range.

Parameters:

  • pos 输入的3D位置 Input 3D location.
  • distance 指定范围的距离 Input range distance.
  • nearLanes 找到的车道ID列表,每个ID格式为roadId_sectionIndex_laneId Lane IDs of the found lanes, each ID formatted as roadId_sectionIndex_laneId.

Returns:

当找到一个或多个车道时返回true,否则返回false Returns true when one or more lanes are found, else returns false.


function GetNearLanesWithAngle

获取视野范围内所有车道 Get all lanes within the field of view.

bool SimOneAPI::GetNearLanesWithAngle (
    const SSD::SimPoint3D & pos,
    const double & distance,
    const double & headingAngle,
    const double & angleShift,
    SSD::SimStringVector & nearLanes
) 

此函数用于获取指定范围和指定角度范围内靠近输入点的车道 This function is used to get lanes that are close to the input point within a specified distance range and within a specified angle range in the 2D-inertial system.

Parameters:

  • pos 输入的3D位置 Input 3D location.
  • distance 搜索的距离范围 Input distance range to search.
  • headingAngle 相对于2D惯性系统X轴的指定前进方向角度,以弧度定义 A specified heading direction's angle relative to the x-axis in the 2D-inertial system, defined in radians.
  • angleShift 用于定义角度范围为[headingAngle - angleShift, headingAngle + angleShift],以弧度定义 To define the range of angle as [headingAngle - angleShift, headingAngle + angleShift], defined in radians.
  • nearLanes 找到的车道ID列表,每个ID格式为roadId_sectionIndex_laneId Lane IDs of the found lanes, each ID formatted as roadId_sectionIndex_laneId.

Returns:

当找到一个或多个车道时返回true,否则返回false Returns true when one or more lanes are found, else returns false.


function GetNearMostLane

获取最接近输入点的车道,所属车道优先 Get the lane closest to the input point, prioritizing the lane to which it belongs.

bool SimOneAPI::GetNearMostLane (
    const SSD::SimPoint3D & pos,
    SSD::SimString & id,
    double & s,
    double & t,
    double & s_toCenterLine,
    double & t_toCenterLine
) 

此函数用于获取与输入点最接近或几何上重叠的车道。当有多个车道的几何形状与输入点重叠时,将选择最近的一个 This function is used to get the lane that is nearest to or geometrically overlapping the input point. When the geometry of more than one lane overlaps the input point, the nearest one will be selected.

Parameters:

  • pos 输入的3D位置 Input 3D location.
  • id 找到的车道ID,格式为roadId_sectionIndex_laneId Lane ID of the found lane, formatted as roadId_sectionIndex_laneId.
  • s 在s-t坐标系统中相对于找到的车道的输入点s值 The input point's s value in the s-t coordinate system, relative to the found lane.
  • t 在s-t坐标系统中相对于找到的车道的输入点t值 The input point's t value in the s-t coordinate system, relative to the found lane.
  • s_toCenterLine 相对于找到的车道所属道路中心线的s-t坐标系统中的输入点s值。准确度较低,如需高精度值请使用API GetRoadST The input point's s value in the s-t coordinate system, relative to the center line of the road. Values are approximately accurate; for higher accuracy, use API GetRoadST.
  • t_toCenterLine 相对于找到的车道所属道路中心线的s-t坐标系统中的输入点t值。准确度较低,如需高精度值请使用API GetRoadST The input point's t value in the s-t coordinate system, relative to the center line of the road. Values are approximately accurate; for higher accuracy, use API GetRoadST.

Returns:

找到任何车道时返回true,否则返回false Returns true when any lane is found, else returns false.


function GetNextJunction

获取下一个路口 Get the next junction.

void SimOneAPI::GetNextJunction (
    const SSD::SimPoint3D & inputPt,
    SSD::SimString & junctionName
) 

此函数用于检索离当前点距离最近的路口 This function is used to retrieve the distance from the current point to the nearest junction.

Parameters:

  • inputPt 当前点的坐标 The coordinates of the current point.
  • junctionName 路口的名称 The name of the junction.

function GetNextJunctionLights

获取下一个路口的信号灯信息 Get the traffic light information at the next junction.

bool SimOneAPI::GetNextJunctionLights (
    const SSD::SimString & laneName,
    SSD::SimString & juncId,
    SSD::SimVector < HDMapStandalone::MSignal > & lights,
    SSD::SimVector < SSD::SimVector < int > > & validityIndexList
) 

此函数用于检索下一个路口的信号灯信息 This function is used to retrieve the traffic light information at the next junction.

Parameters:

  • laneName 车道的名称 The name of the lane.
  • juncId 路口的ID The ID of the junction.
  • lights 信号灯信息 The traffic light information.
  • validityIndexList 有效性信息 The validity information.

function GetParkingSpaceIds

获取地图中指定点前方一定距离内的停车位列表 Get a list of parking spaces located ahead of a specified point in the map, within a certain distance.

bool SimOneAPI::GetParkingSpaceIds (
    const SSD::SimPoint3D & inputPt,
    double distance,
    SSD::SimStringVector & ids
) 

此函数用于获取输入点前方特定距离范围内的停车位列表 This function is used to get a list of parking spaces within a certain range of distance ahead of the input point.

Parameters:

  • inputPt 输入的3D位置 Input 3D location.
  • distance 检测范围的距离 Input range distance.
  • ids 前方一定距离内的停车位列表 List of parking spaces within the specified distance.

Returns:

如果存在,则返回true,否则返回false Returns true if parking spaces exist within the range, else returns false.


function GetParkingSpaceList

获取地图中停车位列表 Get a list of parking spaces in the map.

void SimOneAPI::GetParkingSpaceList (
    SSD::SimVector < HDMapStandalone::MParkingSpace > & parkingSpaceList
) 

此函数用于获取地图中所有停车位的列表 This function is used to obtain a list of all parking spaces in the map.

Parameters:

  • parkingSpaceList 地图中停车位列表 List of parking spaces in the map.

function GetRadarDetections

得到毫米波雷达目标信息 Obtaining Millimeter-Wave Radar Target Information

bool SimOneAPI::GetRadarDetections (
    const char * mainVehicleId,
    const char * sensorId,
    SimOne_Data_RadarDetection * pDetections
) 

此函数用于获取仿真场景中毫米波雷达感知物信息 This function is used to get the obstacle data detected by millimeter-wave radar.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle
  • sensorId 毫米波雷达传感器ID Sensor Index
  • pDetections 毫米波雷达感知消息 Radar detections

Returns:

如果成功获取感知物数据,则返回true,否则返回false Returns true if the obstacle data is successfully retrieved, false otherwise


function GetRoadLength

获取道路长度 Get the length of the road.

double SimOneAPI::GetRoadLength (
    const long & roadId
) 

此函数用于获取指定道路ID的道路长度 This function is used to get the length of the road for a given road ID.

Parameters:

  • roadId 输入的道路ID Input road ID.

Returns:

返回指定道路的长度 Returns the length of the road.


function GetRoadMark

根据指定车道ID和局部坐标获取输入点左右两侧车道标线信息 Get lane marking information on both sides of the input point based on the specified lane ID and local coordinates.

bool SimOneAPI::GetRoadMark (
    const SSD::SimPoint3D & pos,
    const SSD::SimString & id,
    HDMapStandalone::MRoadMark & left,
    HDMapStandalone::MRoadMark & right
) 

此函数用于获取指定车道ID和输入点局部坐标处左右两侧的车道标线信息 This function is used to get the lane marking information on both the left and right sides at the local coordinates of the input point and the specified lane ID.

Parameters:

  • pos 输入的3D位置 Input 3D location.
  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • left 输入点左侧的车道标线 Left side roadmark at the input point.
  • right 输入点右侧的车道标线 Right side roadmark at the input point.

Returns:

如果找到车道标线,则返回true,否则返回false Returns true if the roadmark is found, else returns false.


function GetRoadST

获取相对于道路参考线的ST坐标 Get the ST coordinates relative to the road reference line.

bool SimOneAPI::GetRoadST (
    const SSD::SimString & id,
    const SSD::SimPoint3D & pos,
    double & s,
    double & t,
    double & z
) 

此函数用于获取输入点相对于车道所属道路的参考线的[s, t]坐标值对,以及在局部ENU坐标系中的高度值z This function is used to obtain the [s, t] coordinate pair of the input point relative to the reference line of the road that owns the lane, along with the height value z in the local ENU coordinate system.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • pos 输入的3D位置 Input 3D location.
  • s [s, t]表示输入点在s-t坐标系统中的s值 [s, t] represents the input point's s value in the s-t coordinate system.
  • t [s, t]表示输入点在s-t坐标系统中的t值 [s, t] represents the input point's t value in the s-t coordinate system.
  • z z表示输入点在局部ENU坐标系中的高度值 z represents the input point's height value in the local ENU coordinate system.

Returns:

如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false.


function GetRoadType

获取道路类型信息 Get the road type information.

void SimOneAPI::GetRoadType (
    const SSD::SimString & roadId,
    SSD::SimVector < HDMapStandalone::MRoadTypeInfo > & roadTypeInfoList
) 

此函数用于检索指定道路ID的道路类型信息 This function is used to retrieve the road type information for the specified road ID.

Parameters:

  • roadId 指定道路的ID The ID of the specified road.
  • roadTypeInfoList 用于存储结果的道路类型信息向量 The vector to store the road type information.

function GetSectionLaneList

获取指定车道线所在Section的所有车道线ID列表 Get the list of lane line IDs for the specified lane line in the section.

bool SimOneAPI::GetSectionLaneList (
    const SSD::SimString & laneId,
    SSD::SimStringVector & sectionLaneList
) 

此函数用于获取与指定车道ID处于同一Section中的所有车道线的ID列表。请注意,使用格式roadId_sectionIndex_laneId的laneId时,不应将laneId设置为0,因为0不是有效的车道ID This function is used to get the list of lane IDs that are in the same section as the specified lane ID. Note that the laneId in the format roadId_sectionIndex_laneId should not be set to 0, as 0 does not represent a valid lane ID.

Parameters:

  • laneId 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • sectionLaneList 指定车道所在Section的所有车道线ID列表 List of lane IDs in the same section as the specified lane.

Returns:

当找到一个或多个车道时返回true,否则返回false Returns true when one or more lanes are found, else returns false.


function GetSectionList

获取section列表 Get the section list.

void SimOneAPI::GetSectionList (
    const long & roadId,
    SSD::SimStringVector & rightList,
    SSD::SimStringVector & leftList
) 

此函数用于检索指定道路ID的section列表,包括右侧和左侧的sections This function is used to retrieve the list of sections for the specified road ID, including both right and left sections.

Parameters:

  • roadId 指定道路的ID The ID of the specified road.
  • rightList 用于存储右侧section列表的向量 The vector to store the list of right sections.
  • leftList 用于存储左侧section列表的向量 The vector to store the list of left sections.

function GetSensorConfigurations

得到所有传感器的配置信息(Id、类型、频率、位置和朝向等) Retrieve Configuration Information for All Sensors (ID, Type, Frequency, Position, and Orientation, etc

bool SimOneAPI::GetSensorConfigurations (
    const char * mainVehicleId,
    SimOne_Data_SensorConfigurations * pSensorConfigurations
) 

此函数用于获取仿真主车中搭载的所有传感器配置信息. This function is used to get the config infromation of all the sensor(s) onboard the vehicle.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle
  • pSensorConfigurations 传感器配置信息 SensorConfigurations data

Returns:

如果成功获取传感器配置数据,则返回true,否则返回false Returns true if the sensor configuration data is successfully retrieved, false otherwise


function GetSensorDetections

获取传感器检测到物体的对应真值,支持的传感器包括目标级相机、目标级激光雷达、完美传感器 Retrieve Ground Truth Corresponding to Objects Detected by Sensors, including Object-Based Cameras, Object-Based LiDAR, and Perfect Sensors.

bool SimOneAPI::GetSensorDetections (
    const char * mainVehicleId,
    const char * sensorId,
    SimOne_Data_SensorDetections * pGroundtruth
) 

此函数用于获取仿真场景中目标级传感器感知物信息 This function is used to get the obstacle data detected by object based sensor.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle
  • sensorId 目标级传感器ID Sensor Index
  • pGroundtruth 目标级传感器感知消息 Object based sensor detections

Returns:

如果成功获取感知物数据,则返回true,否则返回false Returns true if the obstacle data is successfully retrieved, false otherwise


function GetSensorLaneInfo

获取传感器检测到车道与车道线数据,仅目标级相机和融合传感器支持 Retrieve Lane and Lane Line Data Detected by Sensors, Supported Only by Object-Based Cameras and Fusion Sensors.

bool SimOneAPI::GetSensorLaneInfo (
    const char * mainVehicleId,
    const char * sensorId,
    SimOne_Data_LaneInfo * pLaneInfo
) 

此函数用于获取仿真场景中通过目标级摄像头或目标级融合传感器感知到的主车当前车道消息 This function is used to get the current lane information detected by object based camera or fusion sensor

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle
  • sensorId 目标级传感器ID Sensor Index
  • pLaneInfo 车道数据 Lane data

Returns:

如果成功获取到车道数据,则返回true,否则返回false Returns true if the lane data is successfully retrieved, false otherwise


function GetSensorRoadMarkInfo

获取传感器检测到地面喷漆信息包括车道停止线、地面箭头、人行横道线 Retrieve Sensor-Detected Ground Paint Information, including Lane Stop Lines, Ground Arrows, and Pedestrian Crosswalk Lines.

bool SimOneAPI::GetSensorRoadMarkInfo (
    const char * mainVehicleId,
    const char * sensorId,
    SimOne_Data_RoadMarkInfo * pRoadMarkInfo
) 

此函数用于获取仿真场景中通过目标级摄像头感知到的地面喷漆消息 This function is used to get the ground paint information which detected by object based camera

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle
  • sensorId 目标级传感器ID Sensor Index
  • pRoadMarkInfo 地面喷漆信息 Road mark data

Returns:

如果成功获取到地面喷漆信息,则返回true,否则返回false Returns true if the lane data is successfully retrieved, false otherwise


function GetSignalListOnLaneByType

通过信号类型获取指定道路的车道指示信息,地面标识(type="Graphics") Get lane guidance information and ground markings (type="Graphics") for the specified road based on signal type.

void SimOneAPI::GetSignalListOnLaneByType (
    const SSD::SimString & laneName,
    const SSD::SimString & type,
    SSD::SimVector < HDMapStandalone::MSignal > & signalInfo
) 

此函数用于根据信号类型(如"Graphics")获取指定车道上的信号列表,包括车道指示信息和地面标识 This function is used to get a list of signals of a specified type (like "Graphics") on a specified lane, including lane guidance information and ground markings.

Parameters:

  • laneName 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • type 信号类型字符串,如"Graphics" Signal type string, like "Graphics".
  • signalInfo 作为MSignal的信号信息列表 List of signal information as MSignal.

function GetSimOneWheelContactPoint

获取车轮接触点信息 Get vehicle wheel contact point.

bool SimOneAPI::GetSimOneWheelContactPoint (
    SimOne_Data_Wheel_Contact_Point * pWheelContactPoint
) 

此函数用于获取车辆轮胎与地面接触点的信息 This function is used to get information about the contact points between vehicle wheels and the ground.

Parameters:

  • pWheelContactPoint 用于存储车轮接触点信息的结构体 Structure to store vehicle wheel contact point information.

Returns:

获取成功返回true,否则返回false Returns true if successful, false otherwise.


function GetSpecifiedLaneCrosswalkList

获取给定车道的关联人行横道线列表 Get the list of crosswalk lines associated with the given lane.

void SimOneAPI::GetSpecifiedLaneCrosswalkList (
    const SSD::SimString & id,
    SSD::SimVector < HDMapStandalone::MObject > & crosswalkList
) 

此函数用于获取与指定车道ID相关联的人行横道线列表 This function is used to get the list of crosswalks that are associated with the specified lane ID.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • crosswalkList 与指定车道相关联的人行横道线列表 List of crosswalks that are associated with the specified lane.

function GetSpecifiedLaneStoplineList

获取给定车道的关联停止线列表 Get the list of stop lines associated with the given lane.

void SimOneAPI::GetSpecifiedLaneStoplineList (
    const SSD::SimString & id,
    SSD::SimVector < HDMapStandalone::MObject > & stoplineList
) 

此函数用于获取与指定车道ID相关联的停止线列表 This function is used to get the list of stop lines that are associated with the specified lane ID.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • stoplineList 与指定车道相关联的停止线列表 List of stop lines that are associated with the specified lane.

function GetSpecifiedLaneTrafficLightList

获取指定车道绑定的信号灯列表 Get the list of traffic lights associated with the specified lane.

void SimOneAPI::GetSpecifiedLaneTrafficLightList (
    const SSD::SimString & id,
    SSD::SimVector < HDMapStandalone::MSignal > & list
) 

此函数用于获取与指定车道ID绑定的信号灯列表 This function is used to get the list of traffic lights that are bound to the specified lane ID.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • list 与指定车道相关联的信号灯对象列表 List of traffic light objects associated with the specified lane.

function GetSpecifiedLaneTrafficSignalList

获取地图中指定车道关联交通标志列表 Get the list of traffic signs associated with the specified lane in the map.

void SimOneAPI::GetSpecifiedLaneTrafficSignalList (
    const SSD::SimString & id,
    SSD::SimVector < HDMapStandalone::MSignal > & list
) 

此函数用于获取与地图中指定车道ID关联的交通标志列表 This function is used to get the list of traffic signs associated with the specified lane ID in the map.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • list 与指定车道相关联的交通标志对象列表 List of traffic sign objects associated with the specified lane.

function GetStoplineList

获取交通灯给定作用车道的关联停止线列表 Get the list of stop lines associated with the traffic light for the given operating lane.

void SimOneAPI::GetStoplineList (
    const HDMapStandalone::MSignal & light,
    const SSD::SimString & id,
    SSD::SimVector < HDMapStandalone::MObject > & stoplineList
) 

此函数用于获取与交通灯相关联并与指定车道匹配的停止线列表 This function is used to get the list of stop lines that are associated with a traffic light and matched to a specified lane.

Parameters:

  • light 交通灯对象 Traffic light object.
  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • stoplineList 与交通灯关联的停止线列表 List of stop lines that are associated with the traffic light.

function GetStreamingImage

获得物理级摄像头图像数据. Retrieve image data from streaming based camera.

SIMONE_NET_API bool SimOneAPI::GetStreamingImage (
    const char * ip,
    unsigned short port,
    SimOne_Streaming_Image * pImage
) 

此函数用于获取物理级摄像头仿真图像数据 This function is used to get the image data from streaming based camera.

Parameters:

  • ip 物理级摄像头UDP输出IP地址 UDP IP which the streaming image send to
  • port 物理级摄像头UDP输出端口号 UDP Port which the streaming image send to
  • pImage 仿真图像数据 Image data

Returns:

如果成功获取到仿真图像数据,则返回true,否则返回false Returns true if the image data is successfully retrieved, false otherwise


function GetStreamingPointCloud

获得物理级激光雷达点云数据. Retrieve point cloud data from streaming based lidar.

SIMONE_NET_API bool SimOneAPI::GetStreamingPointCloud (
    const char * ip,
    unsigned short port,
    unsigned short infoPort,
    SimOne_Streaming_Point_Cloud * pPointCloud
) 

此函数用于获取物理级激光雷达仿真点云数据 This function is used to get the point cloud data from streaming based lidar.

Parameters:

  • ip 物理级激光雷达UDP输出IP地址 UDP IP which the streaming point cloud send to
  • port 物理级激光雷达UDP输出端口号 UDP Port which the streaming point cloud send to
  • infoPort 物理级激光雷达UDP输出设备信息端口号 UDP Port which the device information send to
  • pPointCloud 仿真点云数据 Point cloud data

Returns:

如果成功获取到仿真点云数据,则返回true,否则返回false Returns true if the point cloud data is successfully retrieved, false otherwise


function GetStreamingRadar4DPointCloud

获取毫米波雷达4D点云数据 Get Streaming Radar 4D PointCloud Data.

SIMONE_NET_API bool SimOneAPI::GetStreamingRadar4DPointCloud (
    const char * ip,
    unsigned short port,
    SimOne_Streaming_Point_Cloud * pPointCloud
) 

此函数用于获取毫米波雷达4D点云数据 This function is used to get the 4D point cloud data from streaming based radar.

Parameters:

  • ip 毫米波雷达UDP输出IP地址 UDP IP which the streaming point cloud send to.
  • port 毫米波雷达UDP输出端口号 UDP Port which the streaming point cloud send to.
  • pPointCloud 仿真点云数据(输出),pointCloudData结构由SimOne_Streaming_Radar4D_Point组成 PointCloud data (output), pointCloudData struct by SimOne_Streaming_Radar4D_Point.

Returns:

如果成功获取到仿真点云数据,则返回true,否则返回false Returns true if the point cloud data is successfully retrieved, false otherwise.


function GetTopoGraph

获取拓扑信息 Get the topological graph.

bool SimOneAPI::GetTopoGraph (
    HDMapStandalone::MTopoGraph & topoGraph
) 

此函数用于检索代表道路网络的拓扑图 This function is used to retrieve the topological graph representing the road network.

Parameters:

  • topoGraph 用于存储结果的拓扑图对象 The topological graph object to store the result.

Returns:

如果成功检索到拓扑图,则返回true,否则返回false Returns true if the topological graph is successfully retrieved, false otherwise.


function GetTrafficLight

得到仿真场景中的交通灯的真值 Retrieve Ground Truth for Traffic Light Signals in the Simulation Scene

bool SimOneAPI::GetTrafficLight (
    const char * mainVehicleId,
    int opendriveLightId,
    SimOne_Data_TrafficLight * pTrafficLight
) 

此函数用于获取仿真场景中某个交通灯消息 This function is used to get one of the traffic lights data in simulation scenario.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle
  • opendriveLightId 交通灯在opendrive中的ID SensorConfigurations data
  • pTrafficLight 交通灯数据 Traffic light data

Returns:

如果成功获取到交通灯数据,则返回true,否则返回false Returns true if the traffic light data is successfully retrieved, false otherwise


function GetTrafficLightList

获取地图中信号灯列表 Get a list of traffic signals in the map.

void SimOneAPI::GetTrafficLightList (
    SSD::SimVector < HDMapStandalone::MSignal > & list
) 

此函数用于获取地图中所有信号灯的列表 This function is used to obtain a list of all traffic signals in the map.

Parameters:

  • list 地图中信号灯对象列表 List of traffic signal objects in the map.

function GetTrafficSignList

获取地图中交通标志列表 Get a list of traffic signs in the map.

void SimOneAPI::GetTrafficSignList (
    SSD::SimVector < HDMapStandalone::MSignal > & list
) 

此函数用于获取地图中所有交通标志的列表 This function is used to obtain a list of all traffic signs in the map.

Parameters:

  • list 地图中交通标志对象列表 List of traffic sign objects in the map.

function GetUltrasonicRadar

获得一个超声波雷达信息 Retrieve Individual Ultrasonic Radar Information

bool SimOneAPI::GetUltrasonicRadar (
    const char * mainVehicleId,
    const char * sensorId,
    SimOne_Data_UltrasonicRadar * pUltrasonic
) 

此函数用于获取仿真场景中超声波雷达感知物信息 This function is used to get the obstacle data detected by ultrasonic radar.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle
  • sensorId 超声波雷达传感器ID Sensor Index
  • pUltrasonic 超声波雷达感知消息 Radar detections

Returns:

如果成功获取感知物数据,则返回true,否则返回false Returns true if the obstacle data is successfully retrieved, false otherwise


function GetUltrasonicRadars

获得所有超声波雷达信息 Retrieve All Ultrasonic Radar Information for Vehicle Configuration

bool SimOneAPI::GetUltrasonicRadars (
    const char * mainVehicleId,
    SimOne_Data_UltrasonicRadars * pUltrasonics
) 

此函数用于获取仿真场景中所有超声波雷达感知物信息 This function is used to get the obstacle data detected by all ultrasonic radars.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle
  • pUltrasonics 所有超声波雷达感知消息 All Radars' detections

Returns:

如果成功获取感知物数据,则返回true,否则返回false Returns true if the obstacle data is successfully retrieved, false otherwise


function GetUserDefinedValueCondition

获取OpenScenario中UserDefinedValueCondition的名称和值对 Get the pair of name and value which used in UserDefinedValueCondition in OpenScenario.

bool SimOneAPI::GetUserDefinedValueCondition (
    char * name,
    char * value
) 

此函数用于获取OpenScenario中UserDefinedValueCondition使用的名称和值对 This function is used to get the name-value pair used in UserDefinedValueCondition in OpenScenario.

Parameters:

  • name UserDefinedValueCondition中的名称 Name in UserDefinedValueCondition.
  • value 用于存储获取到的值(输出) Value in UserDefinedValueCondition (output).

Returns:

获取成功返回true,否则返回false Returns true if successful, false otherwise.


function GetV2XInfo

获得对应车辆编号V2X中的UPER编码之后的V2X消息 Retrieve V2X Message After UPER Encoding for the Corresponding Vehicle Identifier in V2X.

bool SimOneAPI::GetV2XInfo (
    const char * mainVehicleId,
    const char * sensorId,
    int infoType,
    SimOne_Data_V2XNFS * pDetections
) 

此函数用于通过V2X中对应车辆编号获取V2X中的UPER编码之后的V2X消息 This function is used to get the UPER ASN message by the corresponding vehicle identifier in V2X.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • sensorId OBU传感器ID OBU sensor Id.
  • infoType OBU消息类型,对应枚举ESimOne_V2X_MessageFrame_PR的值 Type of the OBU message which matches with enum ESimOne_V2X_MessageFrame_PR.
  • pDetections V2XASN信息 V2XASN data.

Returns:

如果成功获取到V2XASN信息,则返回true,否则返回false Returns true if the V2XASN data is successfully retrieved, false otherwise.


function GetVehicleState

获取通过RegisterVehicleState注册的主车状态信息 Get states of main vehicle dynamics which are registered by RegisterVehicleState.

bool SimOneAPI::GetVehicleState (
    const char * mainVehicleId,
    SimOne_Data_Vehicle_Extra * pVehExtraState
) 

此函数用于获取通过RegisterVehicleState注册的主车的动态状态信息 This function is used to get the dynamics states of the main vehicle which are registered through RegisterVehicleState.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pVehExtraState 主车动态状态信息 States of main vehicle dynamics.

Returns:

如果成功获取状态信息,则返回true,否则返回false Returns true if the states are successfully retrieved, false otherwise.


function GetVehicleStatus_Array

获取车辆状态数组 Get vehicle status array.

bool SimOneAPI::GetVehicleStatus_Array (
    double * pVehicleStatus,
    unsigned int size
) 

此函数用于获取车辆状态数据数组 This function is used to get an array of vehicle status data.

Parameters:

  • pVehicleStatus 用于存储车辆状态数据的数组 Array to store vehicle status data.
  • size 状态数据数组的大小 Size of status data array.

Returns:

获取成功返回true,否则返回false Returns true if successful, false otherwise.


function GetVersion

获取当前库的版本号 Get the current version number of the library.

const char * SimOneAPI::GetVersion () 

该函数返回SimOne服务的当前版本号 This function returns the current version number of the SimOne service.

Returns:

返回库的版本号字符串 Returns the version number string of the library.


function GetWayPoints

获取案例主车路径点 Get Main Vehicle WayPoints.

bool SimOneAPI::GetWayPoints (
    const char * mainVehicleId,
    SimOne_Data_WayPoints * pWayPoints
) 

此函数用于获取主车在案例中的路径点数据 This function is used to retrieve the waypoint data of the main vehicle in a scenario.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pWayPoints 主车路径点数据 Main Vehicle WayPoints data.

Returns:

如果成功获取路径点数据,则返回true,否则返回false Returns true if the waypoint data is successfully retrieved, false otherwise.


function GetWheelContactPoint_Array

获取车轮接触点数据数组 Get vehicle wheel contact point array.

bool SimOneAPI::GetWheelContactPoint_Array (
    double * pWheelContactPoint,
    unsigned int size
) 

此函数用于获取车辆轮胎与地面接触点的数据数组 This function is used to get an array of data about the contact points between vehicle wheels and the ground.

Parameters:

  • pWheelContactPoint 用于存储车轮接触点数据的数组 Array to store vehicle wheel contact point data.
  • size 车轮接触点数据数组的大小 Size of wheel contact point array.

Returns:

获取成功返回true,否则返回false Returns true if successful, false otherwise.


function InitEvaluationService

初始化评价服务 Initialize service for evaluation of autonomous driving algorithms.

bool SimOneAPI::InitEvaluationService (
    const char * mainVehicleId,
    const char * serviceIP="127.0.0.1",
    int port=8078,
    bool withMainVehicle=true,
    bool withObstacleNeeded=true
) 

此函数用于初始化自动驾驶算法的评价服务。默认情况下,评价数据和GPS数据会发送到评价服务(类别:判定、主车) This function initializes the evaluation service for autonomous driving algorithms. By default, judge data and GPS data are sent to the evaluation service (categories: judge, main vehicle).

Parameters:

  • mainVehicleId 主车的ID ID of the main vehicle.
  • serviceIP 评价服务的IP地址 IP address of the evaluation service.
  • port 评价服务的端口号 Port number of the evaluation service.
  • withMainVehicle 是否将主车数据发送到评价服务器 Whether to send MainVehicle data to the evaluation server.
  • withObstacleNeeded 是否将障碍物数据发送到评价服务器 Whether to send Obstacle data to the evaluation server.

Returns:

成功初始化返回true,否则返回false Returns true if the initialization is successful, false otherwise.


function InitEvaluationServiceWithLocalData

初始化评价服务,本地存储数据 Initialize evaluation service with local data storage.

bool SimOneAPI::InitEvaluationServiceWithLocalData (
    const char * mainVehicleId,
    bool withMainVehicle=true,
    bool withObstacleNeeded=true
) 

此函数用于初始化自动驾驶算法的评价服务,并将判定数据和GPS数据作为默认存储在本地(类别:判定、主车) This function initializes the evaluation service for autonomous driving algorithms and stores judge data and GPS data locally by default (categories: judge, main vehicle).

Parameters:

  • mainVehicleId 主车的ID ID of the main vehicle.
  • withMainVehicle 是否默认将主车数据发送到评价服务器 Whether to send MainVehicle data to the evaluation server by default.
  • withObstacleNeeded 是否将障碍物数据发送到评价服务器 Whether to send Obstacle data to the evaluation server.

Returns:

成功初始化返回true,否则返回false Returns true if the initialization is successful, false otherwise.


function InitSimOneAPI

初始化SimOne API Initialize the SimOne API.

bool SimOneAPI::InitSimOneAPI (
    const char * mainVehicleId="0",
    bool isFrameSync=false,
    const char * serverIP="127.0.0.1",
    int port=23789,
    void(*)() startCase=0,
    void(*)() endCase=0,
    int registerNodeId=0
) 

此函数用于启动SimOne API,适用于自动驾驶算法的初始化 This function is used to start the SimOne API, suitable for initializing autonomous driving algorithms.

Parameters:

  • mainVehicleId 主车的ID,字符串类型,默认为"0" Main vehicle ID as a string, default is "0".
  • isFrameSync 是否同步帧,true表示同步,false表示异步,默认为false Whether to synchronize frames, true for synchronization, false for asynchronous, default is false.
  • serverIP BridgeIO服务器IP地址,默认为"127.0.0.1" BridgeIO server IP address, default is "127.0.0.1".
  • port BridgeIO服务器端口号,默认为23789 BridgeIO server port number, default is 23789.
  • startCase 案例开始前调用的回调函数,函数签名为:void startCase() Callback function called before the case starts, function signature: void startCase().
  • endCase 案例结束后调用的回调函数,函数签名为:void endCase() Callback function called after the case ends, function signature: void endCase().
  • registerNodeId 注册节点ID(当前未使用),默认为0 Register node ID (currently not in use), default is 0.

Returns:

成功初始化返回true,否则返回false Returns true if initialization is successful, false otherwise.


function InitSimOneAPIEx

多车版本-初始化SimOne API Initialize the SimOne API for the multi-vehicle version.

bool SimOneAPI::InitSimOneAPIEx (
    char ** mainVehicleIdList,
    int count,
    bool isFrameSync=false,
    const char * serverIP="127.0.0.1",
    int port=23789,
    void(*)() startCase=0,
    void(*)() endCase=0,
    int registerNodeId=0
) 

此函数用于多车版本的SimOne API初始化,适合自动驾驶算法 This function is used for the initialization of the multi-vehicle version of the SimOne API, suitable for autonomous driving algorithms.

Parameters:

  • mainVehicleIdList 主车辆ID列表 List of main vehicle IDs.
  • count 主车辆ID数量 Number of main vehicle IDs.
  • isFrameSync 是否进行帧同步 Whether to perform frame synchronization.
  • serverIP BridgeIO服务器IP地址 BridgeIO server IP address.
  • port BridgeIO服务器端口号 BridgeIO server port number.
  • startCase 案例开始前的回调函数 Callback function called before the case starts.
  • endCase 案例结束后的回调函数 Callback function called after the case ends.
  • registerNodeId 注册节点ID(当前未使用) Register node ID (currently not in use).

Returns:

成功初始化返回true,否则返回false Returns true if initialization is successful, false otherwise.


function InitSimOneAPIExWithTimeOut

多车版本 - 初始化SimOne API 带超时 Initialize the SimOne API with timeout for the multi-vehicle version.

bool SimOneAPI::InitSimOneAPIExWithTimeOut (
    char ** mainVehicleIdList,
    int count,
    bool isFrameSync=false,
    const char * serverIP="127.0.0.1",
    int port=23789,
    int timeOutMS=-1,
    void(*)() startCase=0,
    void(*)() endCase=0,
    int registerNodeId=0
) 

此函数用于多车版本的SimOne API初始化,并包含超时设置,适用于自动驾驶算法 This function is used for the initialization of the multi-vehicle version of the SimOne API with a timeout setting, suitable for autonomous driving algorithms.

Parameters:

  • mainVehicleIdList 主车辆ID列表 List of main vehicle IDs.
  • count 主车辆ID的数量 Number of main vehicle IDs.
  • isFrameSync 是否进行帧同步 Whether to perform frame synchronization.
  • serverIP BridgeIO服务器IP地址 BridgeIO server IP address.
  • port BridgeIO服务器端口号 BridgeIO server port number.
  • timeOutMS 超时时间(毫秒) Timeout duration in milliseconds.
  • startCase 案例开始前的回调函数 Callback function called before the case starts.
  • endCase 案例结束后的回调函数 Callback function called after the case ends.
  • registerNodeId 注册节点ID(当前未使用) Register node ID (currently not in use).

Returns:

成功初始化返回true,否则返回false Returns true if initialization is successful, false otherwise.


function InitSimOneAPIWithTimeOut

初始化SimOne API 带超时 Initialize the SimOne API with timeout.

bool SimOneAPI::InitSimOneAPIWithTimeOut (
    const char * mainVehicleId="0",
    bool isFrameSync=false,
    const char * serverIP="127.0.0.1",
    int port=23789,
    int timeOutMS=-1,
    void(*)() startCase=0,
    void(*)() endCase=0,
    int registerNodeId=0
) 

此函数用于带超时的SimOne API初始化,适合自动驾驶算法 This function initializes the SimOne API with a timeout, suitable for autonomous driving algorithms.

Parameters:

  • mainVehicleId 主机车辆ID(从0到9) Host vehicle ID (from 0 to 9).
  • isFrameSync 是否进行帧同步 Whether to perform frame synchronization.
  • serverIP BridgeIO服务器IP地址 BridgeIO server IP address.
  • port BridgeIO服务器端口号 BridgeIO server port number.
  • timeOutMS 超时时间,以毫秒为单位 Timeout duration in milliseconds.
  • startCase 案例开始前的回调函数 Callback function called before the case starts.
  • endCase 案例结束后的回调函数 Callback function called after the case ends.
  • registerNodeId 注册节点ID(当前未使用) Register node ID (currently not in use).

Returns:

成功初始化返回true,否则返回false Returns true if initialization is successful, false otherwise.


function IsDriving

判断车道是否为机动车道 Determine if the lane is a motor vehicle lane.

bool SimOneAPI::IsDriving (
    const SSD::SimString & id
) 

此函数用于检查指定的车道ID是否代表一个机动车道 This function is used to check whether the specified lane ID represents a motor vehicle lane.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.

Returns:

如果指定车道是机动车道,则返回true,否则返回false Returns true if the specified lane is a driving type, else returns false.


function IsInJunction

判断车道是否在交叉路口内 Determine if the lane is within an intersection.

bool SimOneAPI::IsInJunction (
    const SSD::SimString & id,
    SSD::SimString & juncId
) 

此函数用于检查当前车道是否属于某个交叉路口 This function is used to check whether the current lane belongs to a junction.

Parameters:

  • id 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • juncId 所属交叉路口的ID Owner junction ID.

Returns:

如果指定车道在交叉路口内,则返回true,否则返回false Returns true if the specified lane is in a junction, else returns false.


function IsInsideLane

判断坐标点是否在车道内 Determine if the coordinate point is within the lane.

bool SimOneAPI::IsInsideLane (
    const SSD::SimPoint3D & inputPt,
    const SSD::SimString & laneName,
    HDMapStandalone::MSideState & sideState
) 

此函数用于检查指定的3D坐标点是否位于指定车道内,并提供该点是在车道的左侧、右侧还是内部的信息 This function is used to check whether a specified 3D location is inside the specified lane, and provides information on whether it is on the left side, right side, or inside the lane.

Parameters:

  • inputPt 输入的3D位置 Input 3D location.
  • laneName 输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId.
  • sideState 指定点相对于车道的位置状态,如左侧、右侧或内部 sideState that specifies the relative position of the point as either outside left side, right side, or inside.

Returns:

如果指定点在指定车道内,则返回true,否则返回false Returns true if the specified point is inside the specified lane, else returns false.


function IsOverlapLaneLine

判断给定位置是否与车道线重叠 Check if the specified position overlaps with a lane line.

bool SimOneAPI::IsOverlapLaneLine (
    const SSD::SimPoint3D & pos,
    const double & radius,
    SSD::SimString & id
) 

此函数用于确定给定位置及其周围一定半径内是否与车道线重叠 This function is used to determine whether the given position and its surrounding area within a certain radius overlap with a lane line.

Parameters:

  • pos 指定位置的坐标 The coordinates of the specified position.
  • radius 用于重叠检查的半径 The radius used for overlap checking.
  • id 重叠的车道线ID The ID of the overlapping lane line.

Returns:

如果给定位置与车道线重叠,则返回true,否则返回false Returns true if there is an overlap with a lane line at the given position, false otherwise.


function IsTwoSideRoad

判断指定道路是否是双向道路 Determine if the specified road is a two-way road.

bool SimOneAPI::IsTwoSideRoad (
    const long & roadId
) 

此函数用于检查指定的道路ID是否代表一个双向道路 This function is used to check whether the specified road ID represents a two-way road.

Parameters:

  • roadId 输入的道路ID Input road ID.

Returns:

如果是双向道路则返回true,否则返回false Returns true if it is a two-way road, else returns false.


function LoadHDMap

加载高精度地图 Load the high-definition map.

bool SimOneAPI::LoadHDMap (
    int timeOutSeconds
) 

此函数用于加载SimOne网络应用配置的高精度地图 This function is used to load the high-definition map configured by the SimOne web application.

Parameters:

  • timeOutSeconds 超时设置,用于重复检查高精地图是否准备好加载。超时后将停止并返回 Timeout setting for repeatedly checking whether the HD map is ready to load. The function will stop and return when the timeout is reached.

Returns:

成功加载返回true,否则返回false Returns true if the map is successfully loaded, false otherwise.


function Navigate

获取规划路径所途径道路的ID列表 Get the ID list of roads traversed by the planned path.

bool SimOneAPI::Navigate (
    const SSD::SimPoint3DVector & inputPoints,
    SSD::SimVector < int > & indexOfValidPoints,
    SSD::SimVector < long > & roadIdList
) 

此函数用于提供一个规划路径,通过输入点生成,并返回该路径所途径的道路ID列表 This function provides a routing path generated by input points and returns the list of road IDs traversed by this routing path.

Parameters:

  • inputPoints 用于引导生成路线的输入点 Input points that guide the generated route.
  • indexOfValidPoints 从输入点中选出的有效点的索引 Indices of valid points picked from input points.
  • roadIdList 路径所途径的道路ID列表 List of road IDs that are traversed by the routing path.

Returns:

如果已生成任何路线,则返回true,否则返回false Returns true if any route has been generated, else returns false.


function NextFrame

进行下一帧 Proceed to the next frame in a frame-synchronized scene.

void SimOneAPI::NextFrame (
    int frame
) 

此函数用于在帧同步的场景中移动到下一帧 This function is used to move to the next frame in a frame-synchronized scene.

Parameters:

  • frame 当前帧的值 The value of the current frame.

function Pause

暂停,用于非帧同步调试 Pause, used for non frame synchronized debugging.

int SimOneAPI::Pause () 

此函数用于暂停当前运行的案例,通常在非帧同步的调试过程中使用 This function is used to pause the currently running case, typically in non-frame synchronized debugging scenarios.

Returns:

返回整数状态码,0表示成功,非0表示失败 Returns an integer status code, 0 indicates success, non-zero indicates failure.


function ReceiveRouteMessageCB

节点通信数据接收API Node communication data receiving API.

bool SimOneAPI::ReceiveRouteMessageCB (
    void(*)(int fromId, ESimOne_Client_Type fromType, int length, const void *pBuffer, int commandId) cb
) 

该函数用于注册回调,以从其他节点接收数据 This function is used to register a callback to receive data from other nodes.

Parameters:

  • cb 回调函数,用于处理接收到的数据,函数签名为: void callback(int fromId, ESimOne_Client_Type fromType, int length, const void* pBuffer, int commandId)

  • fromId: 发送方节点的ID / ID of the sending node

  • fromType: 发送方节点的类型 / Type of the sending node

  • length: 接收到的数据长度 / Length of the received data

  • pBuffer: 接收到的数据缓冲区 / Buffer containing the received data

  • commandId: 命令ID(当前未使用)/ Command ID (not in use currently)

Returns:

成功返回true,失败返回false Returns true if successful, false otherwise.


function RegisterVehicleState

注册SimOne_Data_Gps包含的状态以外的主车状态信息 Register states of main vehicle dynamics beyond those included inSimOne_Data_Gps .

bool SimOneAPI::RegisterVehicleState (
    const char * mainVehicleId,
    ESimOne_Data_Vehicle_State * pStateIndics,
    int size
) 

此函数用于注册主车的动态状态信息,这些状态信息不包含在SimOne_Data_Gps中 This function is used to register the dynamics states of the main vehicle which are not included in SimOne_Data_Gps.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pStateIndics 状态名称的数组 Array of state names.
  • size pStateIndics中状态的数量 Number of states in pStateIndics.

Returns:

如果注册成功,则返回true,否则返回false Returns true if registration is successful, false otherwise.


function SaveEvaluationRecord

保存评价算法所需的各类信息(JSON格式) Save various types of information required for the evaluation algorithm (in JSON format).

bool SimOneAPI::SaveEvaluationRecord () 

此函数用于保存为评价算法提供的各类信息记录,这些记录以JSON格式存储 This function is used to save various types of information records provided for the evaluation algorithm, which are stored in JSON format.

Returns:

成功保存返回true,否则返回false Returns true if the information is successfully saved, false otherwise.


function SendRouteMessage

节点通信数据发送API Node communication data sending API.

bool SimOneAPI::SendRouteMessage (
    int length,
    void * pBuffer,
    int msgId,
    int toNodeId,
    ESimOne_Client_Type toNodeType
) 

该函数用于向指定节点发送数据 This function is used to send data to a specified node.

Parameters:

  • length 发送数据的长度 The length of the data to send.
  • pBuffer 发送数据的缓冲区指针 Pointer to the data buffer to be sent.
  • msgId 发送的消息ID The ID of the message being sent.
  • toNodeId 消息接收节点的ID ID of the node to which the message is sent.
  • toNodeType 消息接收节点的类型 Type of the node to which the message is sent.

Returns:

成功返回true,失败返回false Returns true if successful, false otherwise.


function SetDrive

主车控制 Set vehicle drive control.

bool SimOneAPI::SetDrive (
    const char * mainVehicleId,
    SimOne_Data_Control * pControl
) 

此函数用于设置主车的驾驶控制数据,包括速度、方向等 This function is used to set the drive control data for the main vehicle, including speed, direction, etc.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pControl 车辆控制数据 Vehicle control data.

Returns:

如果控制设置成功,则返回true,否则返回false Returns true if the control setting is successful, false otherwise.


function SetDriveEx

设置车辆扩展驾驶控制 Set vehicle extended drive control.

bool SimOneAPI::SetDriveEx (
    const char * mainVehicleId,
    SimOne_Data_Control_Ex * pControlEx
) 

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pControlEx 车辆扩展控制数据 Vehicle extended control data.

Returns:

成功设置返回true,否则返回false Returns true if successful, false otherwise.


function SetDriveMode

主车控制模式 Set the driving mode of the vehicle dynamics.

bool SimOneAPI::SetDriveMode (
    const char * mainVehicleId,
    ESimOne_Drive_Mode driveMode
) 

此函数用于设置主车的驾驶模式,可以是API控制模块、SimOneDriver控制模块或两者的组合 This function is used to set the driving mode of the main vehicle, which can be controlled by the API module, SimOneDriver module, or a combination of both. * ESimOne_Drive_Mode_API: 由API控制模块驾驶 Driving by API controlling module. * ESimOne_Drive_Mode_Driver: 由SimOneDriver控制模块驾驶 Driving by SimOneDriver controlling module. * ESimOne_Drive_Mode_API_Lateral: 横向控制由API模块,纵向控制由SimOneDriver模块 Lateral control under API module, longitudinal control under SimOneDriver module. * ESimOne_Drive_Mode_API_Longitudinal: 横向控制由SimOneDriver模块,纵向控制由API模块 Lateral control under SimOneDriver module, longitudinal control under API module.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • driveMode 车辆驾驶控制模式 Vehicle driving control mode.

Returns:

如果模式设置成功,则返回true,否则返回false Returns true if the mode is successfully set, false otherwise.


function SetDriveTrajectory

主车控制:通过规划轨迹进行控制 Set vehicle drive control by planning trajectory.

bool SimOneAPI::SetDriveTrajectory (
    const char * mainVehicleId,
    SimOne_Data_Control_Trajectory * pControlTrajectory
) 

此函数用于通过规划轨迹设置主车的驾驶控制,不应与SetDrive同时使用 This function is used to set the main vehicle's drive control by using a planning trajectory, and should not be used simultaneously with SetDrive.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pControlTrajectory 车辆规划轨迹 Vehicle planning trajectory.

Returns:

如果设置成功,则返回true,否则返回false Returns true if the setting is successful, false otherwise.


function SetDriverName

设置主车控制器的名字 Set the main vehicle driver's name.

void SimOneAPI::SetDriverName (
    const char * mainVehicleId,
    const char * name
) 

此函数用于为主车控制器设置驾驶员的名字,名字长度最大为8个字符 This function is used to set the driver's name for the main vehicle controller, with a maximum length of 8 characters.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • name 车辆驾驶员的名字,最大长度为8个字符 Vehicle driver's name, with a maximum length of 8 characters.

function SetEnvironment

设置当前环境相关信息(天气、光照、地面等) Set Current Environment-related Information (Weather, Lighting, Ground, etc.)

bool SimOneAPI::SetEnvironment (
    SimOne_Data_Environment * pEnvironment
) 

此函数用于设置当前仿真场景环境信息 This function is used to set the current simulation environment information.

Parameters:

  • pEnvironment 仿真环境信息 simulation environment data

Returns:

如果成功设置仿真场景环境信息,则返回true,否则返回false Returns true if the simulation environment data is successfully set, false otherwise


function SetFrameCB

仿真场景中每帧的回调函数 Callback function for each frame in a simulation scene.

bool SimOneAPI::SetFrameCB (
    void(*)(int frame) FrameStart,
    void(*)(int frame) FrameEnd
) 

此函数用于注册在每帧开始和结束时调用的回调函数 This function is used to register callback functions that are called at the beginning and end of each frame in a simulation.

Parameters:

  • FrameStart 每帧开始时调用的回调函数,函数签名为:void FrameStart(int frame) Callback function called at the beginning of each frame, function signature: void FrameStart(int frame).
  • FrameEnd 每帧结束时调用的回调函数,函数签名为:void FrameEnd(int frame) Callback function called at the end of each frame, function signature: void FrameEnd(int frame).

Returns:

成功注册返回true,否则返回false Returns true if successfully registered, false otherwise.


function SetGpsUpdateCB

注册主车GPS更新回调 Register callback function of applying for GPS information.

bool SimOneAPI::SetGpsUpdateCB (
    void(*)(const char *mainVehicleId, SimOne_Data_Gps *pGps) cb
) 

此函数用于注册获取主车GPS信息的回调函数 This function is used to register a callback function for getting GPS data of the main vehicle.

Parameters:

  • cb 获取主车GPS信息的回调函数,函数签名为: void callback(const char* mainVehicleId, SimOne_Data_Gps *pGps)

  • mainVehicleId: 主车的ID / Id of the main vehicle

  • pGps: GPS消息 / GPS data

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetGroundTruthUpdateCB

注册仿真场景中物体真值的更新回调 Register callback function of applying for objects' ground truth.

bool SimOneAPI::SetGroundTruthUpdateCB (
    void(*)(const char *mainVehicleId, SimOne_Data_Obstacle *pObstacle) cb
) 

此函数用于注册获取仿真场景中感知物体真值信息的回调函数 This function is used to register a callback function for getting objects' ground truth data.

Parameters:

  • cb 获取仿真场景中物体真值的更新回调,函数签名为: void callback(const char* mainVehicleId, SimOne_Data_Obstacle *pObstacle)

  • mainVehicleId: 主车的ID / Id of the main vehicle

  • pObstacle: 物体真值消息 / Obstacle data

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetJudgeEventCB

场景判定事件回调 Callback for scenario judgment events.

bool SimOneAPI::SetJudgeEventCB (
    void(*)(const char *mainVehicleId, SimOne_Data_JudgeEvent *judgeEventDetailInfo) cb
) 

此函数用于注册场景判定事件的回调函数,用于获取场景中的判定事件详细信息。 This function is used to register a callback function for scenario judgment events, which provides detailed information about judgment events in the scenario.

Parameters:

  • cb 回调函数指针,函数签名为: void callback(const char* mainVehicleId, SimOne_Data_JudgeEvent* judgeEventDetailInfo)

  • mainVehicleId: 主车的ID / ID of the main vehicle

  • judgeEventDetailInfo: 场景判定事件的详细信息 / Detailed information of the judgment event

Returns:

成功注册返回true,否则返回false Returns true if the registration is successful, false otherwise.


function SetLogOut

日志设置接口 Logging configuration interface.

bool SimOneAPI::SetLogOut (
    ESimOne_LogLevel_Type level,
    const char * format,
    ...
) 

用于配置日志级别和输出格式,支持printf风格的格式化字符串 Used to configure the log level and output format, supporting printf-style format strings.

Parameters:

  • level 日志级别(警告、错误、信息) Log level (warning, error, info).
  • format 日志输出格式字符串,支持printf风格的格式化 The output format string for the log, supporting printf-style formatting.
  • ... 可变参数,对应format中的格式说明符 Variable arguments corresponding to format specifiers in the format string.

Returns:

成功设置返回true,否则返回false Returns true if the configuration is successful, false otherwise.


function SetMainVehicleStatusUpdateCB

获取主车状态信息回调的函数 Get main vehicle status callback function.

bool SimOneAPI::SetMainVehicleStatusUpdateCB (
    void(*)(const char *mainVehicleId, SimOne_Data_MainVehicle_Status *pMainVehicleStatus) cb
) 

此函数用于注册主车状态信息的回调函数 This function is used to register a callback function for the main vehicle status information.

Parameters:

  • cb 回调函数,用于获取主车状态信息,函数签名为: void callback(const char* mainVehicleId, SimOne_Data_MainVehicle_Status *pMainVehicleStatus)

  • mainVehicleId: 主车的ID / ID of the main vehicle

  • pMainVehicleStatus: 主车状态信息的指针 / Pointer to the main vehicle status information

Returns:

成功注册返回true,否则返回false Returns true if the registration is successful, false otherwise.


function SetPose

设置主车位置 Set the main vehicle's pose.

bool SimOneAPI::SetPose (
    const char * mainVehicleId,
    SimOne_Data_Pose_Control * pPose
) 

此函数用于设置主车的位置和方向 This function is used to set the position and orientation (pose) of the main vehicle.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pPose 要设置的位置(输入) The pose to set (input).

Returns:

如果设置成功,则返回true,否则返回false Returns true if the pose is successfully set, false otherwise.


function SetPubVehicleStatusConfigFile

设置车辆状态DDS配置文件 Set DDS config file with full path.

void SimOneAPI::SetPubVehicleStatusConfigFile (
    const char * configFile
) 

此函数用于设置车辆状态DDS通信参数的配置文件路径 This function is used to set the configuration file path for DDS communication parameters of vehicle status.

Parameters:

  • configFile DDS通信参数配置文件的完整路径 Config file of DDS communication parameters with full path.

function SetPubWheelContactPointConfigFile

设置车轮接触点DDS发布配置文件 Set DDS config file with full path for wheel contact point publishing.

void SimOneAPI::SetPubWheelContactPointConfigFile (
    const char * configFile
) 

此函数用于设置车轮接触点DDS发布通信参数的配置文件路径 This function is used to set the configuration file path for DDS communication parameters of wheel contact point publishing.

Parameters:

  • configFile DDS通信参数配置文件的完整路径 Config file of DDS communication parameters with full path.

function SetRadarDetectionsUpdateCB

毫米波雷达目标信息回调 Register Millimeter-Wave Radar Target Information Callback

bool SimOneAPI::SetRadarDetectionsUpdateCB (
    void(*)(const char *mainVehicleId, const char *sensorId, SimOne_Data_RadarDetection *pDetections) cb
) 

此函数用于注册获取仿真场景中毫米波雷达目标信息的回调函数 This function is used to register a callback function for getting objects data detected by millimeter-wave radar.

Parameters:

  • cb 获取仿真场景中毫米波雷达检测数据的回调函数,函数签名为: void callback(const char* mainVehicleId, const char* sensorId, SimOne_Data_RadarDetection *pDetections)

  • mainVehicleId: 主车的ID / Id of the main vehicle

  • sensorId: 毫米波雷达传感器ID / Sensor Index

  • pDetections: 毫米波雷达感知消息 / Radar detections

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetScenarioEventCB

场景事件回调 Register the callback for scenario events.

bool SimOneAPI::SetScenarioEventCB (
    void(*)(const char *source, const char *target, const char *type, const char *content) cb
) 

此函数用于注册场景事件的回调函数,允许处理如命令或事件类型的消息 This function is used to register a callback function for scenario events, allowing for handling messages such as commands or events.

Parameters:

  • cb 场景事件回调函数,函数签名为: void callback(const char* source, const char* target, const char* type, const char* content)

  • source: 发送消息的车辆ID / ID of the vehicle sending the message

  • target: 接收消息的车辆ID / ID of the vehicle receiving the message

  • type: 消息类型,如"Command"或"Event" / The type of message, such as "Command" or "Event"

  • content: 消息内容 / The content of the message

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetSensorDetectionsUpdateCB

传感器真值信息更新回调,支持的传感器包括目标级相机、目标级激光雷达、完美传感器 Registering Callback for Sensor Ground Truth Information Updates, supporting sensors such as Object-Based Cameras, Object-Based LiDAR, and Perfect Sensors.

bool SimOneAPI::SetSensorDetectionsUpdateCB (
    void(*)(const char *mainVehicleId, const char *sensorId, SimOne_Data_SensorDetections *pGroundtruth) cb
) 

此函数用于注册获取仿真场景中目标级传感器目标信息的回调函数. This function is used to register a callback function for getting objects data detected by object based sensor.

Parameters:

  • cb 获取仿真场景中目标级传感器真值的更新回调,函数签名为: void callback(const char* mainVehicleId, const char* sensorId, SimOne_Data_SensorDetections *pGroundtruth)

  • mainVehicleId: 主车的ID / Id of the main vehicle

  • sensorId: 目标级传感器ID / Sensor Index

  • pGroundtruth: 目标级传感器感知消息 / Object based sensor detections

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetSensorLaneInfoCB

获取传感器检测到车道与车道线数据回调 Callback to Retrieve Lane and Lane Line Data Detected by Sensors, Supported Only by Object-Based Cameras and Fusion Sensors

bool SimOneAPI::SetSensorLaneInfoCB (
    void(*)(const char *mainVehicleId, const char *sensorId, SimOne_Data_LaneInfo *pLaneInfo) cb
) 

此函数用于注册通过目标级摄像头或目标级融合传感器获取感知车道消息的回调函数. This function is used to register a callback function for getting lane information which detected by object based camera or fusion sensor.

Parameters:

  • cb 获取仿真场景中感知车道线的更新回调,函数签名为: void callback(const char* mainVehicleId, const char* sensorId, SimOne_Data_LaneInfo *pLaneInfo)

  • mainVehicleId: 主车的ID / Id of the main vehicle

  • sensorId: 目标级传感器ID / Sensor Index

  • pLaneInfo: 感知车道信息 / Lane information

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetSensorRoadMarkInfoCB

获取传感器检测到地面喷漆信息包括车道停止线、地面箭头、人行横道线数据回调 Callback to Retrieve Sensor-Detected Ground Paint Information, including Lane Stop Lines, Ground Arrows, and Pedestrian Crosswalk Line Data, Supported Only by Object-Based Cameras

bool SimOneAPI::SetSensorRoadMarkInfoCB (
    void(*)(const char *mainVehicleId, const char *sensorId, SimOne_Data_RoadMarkInfo *pRoadMarkInfo) cb
) 

此函数用于注册通过目标级摄像头获取感知地面喷漆信息的回调函数. This function is used to register a callback function for getting road mark information which detected by object based camera or fusion sensor.

Parameters:

  • cb 获取仿真场景中感知地面喷漆信息的更新回调,函数签名为: void callback(const char* mainVehicleId, const char* sensorId, SimOne_Data_RoadMarkInfo *pRoadMarkInfo)

  • mainVehicleId: 主车的ID / Id of the main vehicle

  • sensorId: 目标级传感器ID / Sensor Index

  • pRoadMarkInfo: 感知地面喷漆信息 / Road mark data

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetSignalLights

设置车辆信号灯状态 Set signal lights for the vehicle.

bool SimOneAPI::SetSignalLights (
    const char * mainVehicleId,
    SimOne_Data_Signal_Lights * pSignalLights
) 

此函数用于设置主车的信号灯状态,如转向灯 This function is used to set the signal light status of the main vehicle, such as turn signals.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pSignalLights 车辆信号灯数据 Vehicle signal light data.

Returns:

如果信号灯状态设置成功,则返回true,否则返回false Returns true if the signal light status is successfully set, false otherwise.


function SetSimOneVehicleStatus

设置车辆驾驶控制状态 Set vehicle drive control.

bool SimOneAPI::SetSimOneVehicleStatus (
    const char * mainVehicleId,
    SimOne_Data_Vehicle_Status * pStatusData
) 

此函数用于设置主车的驾驶控制状态数据 This function is used to set the driving control status data of the main vehicle.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pStatusData 车辆状态数据 Vehicle status data.

Returns:

设置成功返回true,否则返回false Returns true if successful, false otherwise.


function SetStreamingImageUpdateCB

获得物理级摄像头图像数据更新回调. Callback for Updates on image data from streaming based camera.

SIMONE_NET_API bool SimOneAPI::SetStreamingImageUpdateCB (
    const char * ip,
    unsigned short port,
    void(*)( SimOne_Streaming_Image *pImage) cb
) 

此函数用于注册获取物理级摄像头仿真图像数据的回调函数. This function is used to register a callback function for getting image data from streaming based camera.

Parameters:

  • ip 物理级摄像头UDP输出IP地址 UDP IP which the streaming image send to
  • port 物理级摄像头UDP输出端口号 UDP Port which the streaming image send to
  • cb 获取物理级摄像头仿真图像数据的回调,函数签名为: void callback(SimOne_Streaming_Image *pImage)

  • pImage: 仿真图像数据 / Image data

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetStreamingPointCloudUpdateCB

获得物理级激光雷达点云数据更新回调. Callback for Updates on point cloud data from streaming based lidar.

SIMONE_NET_API bool SimOneAPI::SetStreamingPointCloudUpdateCB (
    const char * ip,
    unsigned short port,
    unsigned short infoPort,
    void(*)( SimOne_Streaming_Point_Cloud *pPointCloud) cb
) 

此函数用于注册获取物理级激光雷达仿真点云数据的回调函数. This function is used to register a callback function for getting point cloud data from streaming based lidar.

Parameters:

  • ip 物理级激光雷达UDP输出IP地址 UDP IP which the streaming point cloud send to
  • port 物理级激光雷达UDP输出端口号 UDP Port which the streaming point cloud send to
  • infoPort 物理级激光雷达UDP输出设备信息端口号 UDP Port which the device information send to
  • cb 获取物理级激光雷达仿真点云数据的回调,函数签名为: void callback(SimOne_Streaming_Point_Cloud *pPointCloud)

  • pPointCloud: 仿真点云数据 / Point cloud data

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetStreamingRadar4DPointCloudUpdateCB

毫米波雷达4D点云数据更新回调 Streaming Radar 4D PointCloud Data update callback.

SIMONE_NET_API bool SimOneAPI::SetStreamingRadar4DPointCloudUpdateCB (
    const char * ip,
    unsigned short port,
    void(*)( SimOne_Streaming_Point_Cloud *pPointCloud) cb
) 

此函数用于注册获取毫米波雷达4D点云数据的回调函数 This function is used to register a callback function for getting 4D point cloud data from streaming based radar.

Parameters:

  • ip 毫米波雷达UDP输出IP地址 UDP IP which the streaming point cloud send to.
  • port 毫米波雷达UDP输出端口号 UDP Port which the streaming point cloud send to.
  • cb 获取毫米波雷达4D点云数据的回调函数,函数签名为: void callback(SimOne_Streaming_Point_Cloud *pPointCloud)

  • pPointCloud: 仿真点云数据,pointCloudData结构由SimOne_Streaming_Radar4D_Point组成 / PointCloud data, pointCloudData struct by SimOne_Streaming_Radar4D_Point

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetSubVehicleStatusConfigFile

设置车辆状态DDS订阅配置文件 Set DDS config file with full path for vehicle status subscribing.

void SimOneAPI::SetSubVehicleStatusConfigFile (
    const char * configFile
) 

此函数用于设置车辆状态DDS订阅通信参数的配置文件路径 This function is used to set the configuration file path for DDS communication parameters of vehicle status subscribing.

Parameters:

  • configFile DDS通信参数配置文件的完整路径 Config file of DDS communication parameters with full path.

function SetSubWheelContactPointConfigFile

设置车轮接触点DDS订阅配置文件 Set DDS config file with full path for wheel contact point subscribing.

void SimOneAPI::SetSubWheelContactPointConfigFile (
    const char * configFile
) 

此函数用于设置车轮接触点DDS订阅通信参数的配置文件路径 This function is used to set the configuration file path for DDS communication parameters of wheel contact point subscribing.

Parameters:

  • configFile DDS通信参数配置文件的完整路径 Config file of DDS communication parameters with full path.

function SetTrajectory

预测轨迹设置 Set vehicle waypoints.

bool SimOneAPI::SetTrajectory (
    const char * mainVehicleId,
    SimOne_Data_Trajectory * Trajectory
) 

此函数用于设置车辆的预测轨迹,包括车辆在未来的路径点 This function is used to set the vehicle's predicted trajectory, including waypoints for the vehicle's future path.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • Trajectory 车辆轨迹数据 Vehicle trajectory data.

Returns:

如果轨迹设置成功,则返回true,否则返回false Returns true if the trajectory is successfully set, false otherwise.


function SetUltrasonicRadarsCB

超声波雷达真值信息更新回调 Register the callback func applying for ultrasonics radar detections

bool SimOneAPI::SetUltrasonicRadarsCB (
    void(*)(const char *mainVehicleId, SimOne_Data_UltrasonicRadars *pUltrasonics) cb
) 

此函数用于注册获取仿真场景中超声波雷达目标信息的回调函数 This function is used to register a callback function for getting objects data detected by ultrasonic radar.

Parameters:

  • cb 获取仿真场景中超声波雷达真值的更新回调,函数签名为: void callback(const char* mainVehicleId, SimOne_Data_UltrasonicRadars *pUltrasonics)

  • mainVehicleId: 主车的ID / Id of the main vehicle

  • pUltrasonics: 所有超声波雷达感知消息 / All Radars' detections

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetUserDefinedValueCondition

设置OpenScenario中UserDefinedValueCondition的名称和值对 Set the pair of name and value which used in UserDefinedValueCondition in OpenScenario.

bool SimOneAPI::SetUserDefinedValueCondition (
    char * name,
    char * value
) 

此函数用于设置OpenScenario中UserDefinedValueCondition使用的名称和值对 This function is used to set the name-value pair used in UserDefinedValueCondition in OpenScenario.

Parameters:

  • name UserDefinedValueCondition中的名称 Name in UserDefinedValueCondition.
  • value UserDefinedValueCondition中的值 Value in UserDefinedValueCondition.

Returns:

设置成功返回true,否则返回false Returns true if successful, false otherwise.


function SetV2XInfoUpdateCB

获得对应车辆编号V2X中的UPER编码之后的V2X消息更新回调 Callback for Updates on V2X Messages After UPER Encoding for the Corresponding Vehicle Identifier in V2X.

bool SimOneAPI::SetV2XInfoUpdateCB (
    void(*)(const char *mainVehicleId, const char *sensorId, SimOne_Data_V2XNFS *pDetections) cb
) 

此函数用于注册通过V2X中对应车辆编号获取V2X中的UPER编码之后的V2X消息的回调函数. This function is used to register a callback function for getting the UPER ASN message by the corresponding traffic-vehicle identifier in V2X.

Parameters:

  • cb 通过V2X中对应车辆编号获取V2X中的UPER编码之后的V2X消息的回调,函数签名为: void callback(const char* mainVehicleId, const char* sensorId, SimOne_Data_V2XNFS *pDetections)

  • mainVehicleId: 主车的ID / Id of the main vehicle

  • sensorId: OBU传感器ID / OBU sensor Id

  • pDetections: V2XASN信息 / V2XASN data

Returns:

如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise.


function SetVehicleEvent

设置主车预警消息 Set vehicle event information.

bool SimOneAPI::SetVehicleEvent (
    const char * mainVehicleId,
    SimOne_Data_Vehicle_EventInfo * pEvent
) 

此函数用于设置主车的事件信息,如预警或其他重要通知 This function is used to set event information for the main vehicle, such as warnings or other important notifications.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • pEvent 车辆事件信息数据 Vehicle event information data.

Returns:

如果事件信息设置成功,则返回true,否则返回false Returns true if the event information is successfully set, false otherwise.


function SetVehicleInitState

设置主车初始状态 Set the main vehicle initial state.

bool SimOneAPI::SetVehicleInitState (
    const char * mainVehicleId,
    SimOne_Vehicle_Init_State initState
) 

此函数用于将更改主车的初始状态 This function is used to set initial state of the main vehicle.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.
  • initState 主车的初始状态 Initial state of the main vehicle.

Returns:

如果主车初始状态设置成功,则返回true,否则返回false Returns true if the main vehicle's initial state is successfully set, false otherwise.


function SetVehicleStatus_Array

设置车辆状态数组 Set vehicle status array.

bool SimOneAPI::SetVehicleStatus_Array (
    double * pStatusData,
    unsigned int size
) 

此函数用于设置车辆状态数据数组 This function is used to set an array of vehicle status data.

Parameters:

  • pStatusData 车辆状态数据数组 Vehicle status data array.
  • size 状态数据数组的大小 Size of status data array.

Returns:

设置成功返回true,否则返回false Returns true if successful, false otherwise.


function SetVehicleToInitState

重置主车到初始状态 Reset the main vehicle state to the initial state.

bool SimOneAPI::SetVehicleToInitState (
    const char * mainVehicleId
) 

此函数用于将主车的状态重置为初始状态 This function is used to reset the state of the main vehicle to its initial state.

Parameters:

  • mainVehicleId 主车的ID Id of the main vehicle.

Returns:

如果主车状态成功重置,则返回true,否则返回false Returns true if the main vehicle's state is successfully reset, false otherwise.


function SetWheelContactPoint_Array

设置车轮接触点数据数组 Set vehicle wheel contact point array.

bool SimOneAPI::SetWheelContactPoint_Array (
    double * pWheelContactPointData,
    unsigned int size
) 

此函数用于设置车辆轮胎与地面接触点的数据数组 This function is used to set an array of data about the contact points between vehicle wheels and the ground.

Parameters:

  • pWheelContactPointData 车轮接触点数据数组 Vehicle wheel contact point data array.
  • size 车轮接触点数据数组的大小 Size of wheel contact point data array.

Returns:

设置成功返回true,否则返回false Returns true if successful, false otherwise.


function TerminateSimOneAPI

退出API节点 Exit the API node.

bool SimOneAPI::TerminateSimOneAPI () 

此函数用于停止并退出SimOne API节点 This function is used to stop and exit the SimOne API node.

Returns:

成功停止返回true,否则返回false Returns true if successfully stopped, false otherwise.


function Wait

等待并获取当前帧值 Wait and get the current frame value.

int SimOneAPI::Wait () 

此函数用于等待,并返回当前模拟的帧值 This function is used to wait and return the current frame value of the simulation.

Returns:

返回当前的帧值 Returns the current frame value.


function setHdmapLoad

直接设置高精地图已经初始化完成 Directly set that the high-definition map has been initialized successfully.

void SimOneAPI::setHdmapLoad () 

此函数用于直接标记高精度地图已成功初始化 This function is used to directly mark that the high-precision map has been successfully initialized.



The documentation for this class was generated from the following file docs/api/cpp/SimOneControlTransAPI.h