车道查询 Lane Query¶
GetNearMostLane¶
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.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
pos |
const SSD::SimPoint3D & |
输入的3D位置 Input 3D location. |
id |
SSD::SimString & |
找到的车道ID,格式为roadId_sectionIndex_laneId Lane ID of the found lane, formatted as roadId_sectionIndex_laneId. |
s |
double & |
在s-t坐标系统中相对于找到的车道的输入点的值对 The input point's value pair in the s-t coordinate system, relative to the found lane. |
t |
double & |
在s-t坐标系统中相对于找到的车道的输入点的值对 The input point's value pair in the s-t coordinate system, relative to the found lane. |
s_toCenterLine |
double & |
相对于找到的车道所属道路中心线的s-t坐标系统中的输入点的值对。准确度较低,如需高精度值请使用API GetRoadST The input point's value pair in the s-t coordinate system, relative to the center line of the road to which the found lane belongs. Values are approximately accurate; for higher accuracy, use the API GetRoadST. |
t_toCenterLine |
double & |
相对于找到的车道所属道路中心线的s-t坐标系统中的输入点的值对。准确度较低,如需高精度值请使用API GetRoadST The input point's value pair in the s-t coordinate system, relative to the center line of the road to which the found lane belongs. Values are approximately accurate; for higher accuracy, use the API GetRoadST. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
找到任何车道时返回true,否则返回false Returns true when any lane is found, else returns false. |
GetNearLanes¶
bool GetNearLanes(const SSD::SimPoint3D &pos, const double &distance, SSD::SimStringVector &nearLanes)
获取临近车道列表
Get the list of nearby lanes.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
pos |
const SSD::SimPoint3D & |
输入的3D位置 Input 3D location. |
distance |
const double & |
指定范围的距离 Input range distance. |
nearLanes |
SSD::SimStringVector & |
找到的车道ID列表,每个ID格式为roadId_sectionIndex_laneId Lane IDs of the found lanes, each ID formatted as roadId_sectionIndex_laneId. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
当找到一个或多个车道时返回true,否则返回false Returns true when one or more lanes are found, else returns false. |
GetNearLanesWithAngle¶
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.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
pos |
const SSD::SimPoint3D & |
输入的3D位置 Input 3D location. |
distance |
const double & |
搜索的距离范围 Input distance range to search. |
headingAngle |
const double & |
相对于2D惯性系统X轴的指定前进方向角度,以弧度定义 A specified heading direction's angle relative to the x-axis in the 2D-inertial system, defined in radians. |
angleShift |
const double & |
用于定义角度范围为[headingAngle - angleShift, headingAngle + angleShift],以弧度定义 To define the range of angle as [headingAngle - angleShift, headingAngle + angleShift], defined in radians. |
nearLanes |
SSD::SimStringVector & |
找到的车道ID列表,每个ID格式为roadId_sectionIndex_laneId Lane IDs of the found lanes, each ID formatted as roadId_sectionIndex_laneId. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
当找到一个或多个车道时返回true,否则返回false Returns true when one or more lanes are found, else returns false. |
GetDistanceToLaneBoundary¶
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.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
pos |
const SSD::SimPoint3D & |
输入的3D位置 Input 3D location. |
id |
SSD::SimString & |
找到的车道ID,格式为roadId_sectionIndex_laneId Lane ID of the found lane, formatted as roadId_sectionIndex_laneId. |
distToLeft |
double & |
3D空间中到边界的距离 The distance to boundaries in 3D space. |
distToRight |
double & |
3D空间中到边界的距离 The distance to boundaries in 3D space. |
distToLeft2D |
double & |
2D空间中到边界的距离(忽略高度) The distance to boundaries in 2D space (ignoring height). |
distToRight2D |
double & |
2D空间中到边界的距离(忽略高度) The distance to boundaries in 2D space (ignoring height). |
返回值:
| 类型 | 说明 |
|---|---|
bool |
当找到最近的车道时返回true,否则返回false Returns true if the nearest lane is found, else returns false. |
GetLaneSample¶
bool GetLaneSample(const SSD::SimString &id, HDMapStandalone::MLaneInfo &info)
获取车道信息(包含车道ID,左右边缘线,虚拟中心线)
Get lane information (including lane ID, left and right boundary lines, virtual centerline).
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
id |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
info |
HDMapStandalone::MLaneInfo & |
指定车道的信息(HDMapStandalone::MLaneInfo) Lane information (HDMapStandalone::MLaneInfo) of the specified lane. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false. |
GetLaneLink¶
bool GetLaneLink(const SSD::SimString &id, HDMapStandalone::MLaneLink &laneLink)
获取车道连接信息
Get lane connection information.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
id |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
laneLink |
HDMapStandalone::MLaneLink & |
指定车道的连接信息(HDMapStandalone::MLaneLink) Lane link information (HDMapStandalone::MLaneLink) of the specified lane. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false. |
GetLaneType¶
bool GetLaneType(const SSD::SimString &id, HDMapStandalone::MLaneType &laneType)
获取车道类型
Get lane type.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
id |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
laneType |
HDMapStandalone::MLaneType & |
指定车道的类型 Lane type of the specified lane. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false. |
GetLaneWidth¶
bool GetLaneWidth(const SSD::SimString &id, const SSD::SimPoint3D &pos, double &width)
获取车道宽度
Get lane width.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
id |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
pos |
const SSD::SimPoint3D & |
输入的3D位置 Input 3D location. |
width |
double & |
指定车道的宽度 Lane width of the specified lane. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false. |
GetLaneST¶
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.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
id |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
pos |
const SSD::SimPoint3D & |
输入的3D位置 Input 3D location. |
s |
double & |
输入点在s-t坐标系统中相对于指定车道的值对 The input point's value pair in the s-t coordinate system, relative to the specified lane. |
t |
double & |
输入点在s-t坐标系统中相对于指定车道的值对 The input point's value pair in the s-t coordinate system, relative to the specified lane. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false. |
GetRoadST¶
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.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
id |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
pos |
const SSD::SimPoint3D & |
输入的3D位置 Input 3D location. |
s |
double & |
[s, t]表示输入点在s-t坐标系统中的值对,z表示输入点在局部ENU坐标系中的高度值 [s, t] represents the input point's value pair in the s-t coordinate system, and z represents the input point's height value in the local ENU coordinate system. |
t |
double & |
[s, t]表示输入点在s-t坐标系统中的值对,z表示输入点在局部ENU坐标系中的高度值 [s, t] represents the input point's value pair in the s-t coordinate system, and z represents the input point's height value in the local ENU coordinate system. |
z |
double & |
[s, t]表示输入点在s-t坐标系统中的值对,z表示输入点在局部ENU坐标系中的高度值 [s, t] represents the input point's value pair in the s-t coordinate system, and z represents the input point's height value in the local ENU coordinate system. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false. |
GetInertialFromLaneST¶
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.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
id |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
s |
const double & |
[s, t]表示在s-t坐标系统中的输入点值对 [s, t] represents the input point's value pair in the s-t coordinate system. |
t |
const double & |
[s, t]表示在s-t坐标系统中的输入点值对 [s, t] represents the input point's value pair in the s-t coordinate system. |
inertial |
SSD::SimPoint3D & |
局部ENU坐标系中的[x, y, z]位置 The [x, y, z] position in local ENU. |
dir |
SSD::SimPoint3D & |
车道中线上的局部ENU方向 The direction in local ENU on the lane's middle line. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果地图中存在指定的车道则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false. |
ContainsLane¶
bool ContainsLane(const SSD::SimString &id)
查询指定车道是否存在于地图中
Check if the specified lane exists in the map.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
id |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果存在则返回true,否则返回false Returns true if it exists, else returns false. |
GetLaneMiddlePoint¶
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.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
inputPt |
const SSD::SimPoint3D & |
输入的3D位置 Input 3D location. |
id |
const SSD::SimString & |
找到的车道ID,格式为roadId_sectionIndex_laneId Lane ID of the found lane, formatted as roadId_sectionIndex_laneId. |
targetPoint |
SSD::SimPoint3D & |
指定车道中心线上的目标点 The target point that is on the specified lane's middle line. |
dir |
SSD::SimPoint3D & |
车道中心线上目标点的切线方向 The tangent direction at the target point on the lane's middle line. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
当找到任何车道时返回true,否则返回false Returns true when any lane is found, else returns false. |
GetHeights¶
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.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
inputPt |
const SSD::SimPoint3D & |
输入的3D位置 Input 3D location. |
radius |
const double & |
检测范围的半径 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 |
SSD::SimVector< double > & |
返回的高程/一个高程 Returns heights/one height. |
roadIds |
SSD::SimVector< long > & |
返回高程所依据的道路ID Returns the road IDs that the target height is based on. |
insideRoadStates |
SSD::SimVector< bool > & |
返回输入点是否在目标道路内 Returns whether the input point is inside the target roads or not. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果找到任何高程则返回true,否则返回false Returns true if any height is found, else returns false. |
GetLaneData¶
void GetLaneData(SSD::SimVector< HDMapStandalone::MLaneInfo > &data)
获取所有车道线信息列表
Get a list of all lane line information.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
data |
SSD::SimVector< HDMapStandalone::MLaneInfo > & |
地图中所有车道的MLaneInfo对象列表 List of all MLaneInfo objects for lanes in the map. |
GetRoadLength¶
double GetRoadLength(const long &roadId)
获取道路长度
Get the length of the road.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
roadId |
const long & |
— |
返回值:
| 类型 | 说明 |
|---|---|
double |
返回指定道路的长度 Returns the length of the road. |
GetSectionLaneList¶
bool GetSectionLaneList(const SSD::SimString &laneId, SSD::SimStringVector §ionLaneList)
获取指定车道线所在Section的所有车道线ID列表
Get the list of lane line IDs for the specified lane line in the section.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
laneId |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
sectionLaneList |
SSD::SimStringVector & |
指定车道所在Section的所有车道线ID列表 List of lane IDs in the same section as the specified lane. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
当找到一个或多个车道时返回true,否则返回false Returns true when one or more lanes are found, else returns false. |
IsTwoSideRoad¶
bool IsTwoSideRoad(const long &roadId)
判断指定道路是否是双向道路
Determine if the specified road is a two-way road.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
roadId |
const long & |
输入的道路ID Input road ID. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果是双向道路则返回true,否则返回false Returns true if it is a two-way road, else returns false. |
GetLaneLength¶
double GetLaneLength(const SSD::SimString &id)
获取车道长度
Get the length of the lane.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
id |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
返回值:
| 类型 | 说明 |
|---|---|
double |
返回指定车道的长度 Returns the length of the lane. |
IsDriving¶
bool IsDriving(const SSD::SimString &id)
判断车道是否为机动车道
Determine if the lane is a motor vehicle lane.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
id |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果指定车道是机动车道,则返回true,否则返回false Returns true if the specified lane is a driving type, else returns false. |
IsInJunction¶
bool IsInJunction(const SSD::SimString &id, SSD::SimString &juncId)
判断车道是否在交叉路口内
Determine if the lane is within an intersection.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
id |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
juncId |
SSD::SimString & |
所属交叉路口的ID Owner junction ID. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果指定车道在交叉路口内,则返回true,否则返回false Returns true if the specified lane is in a junction, else returns false. |
IsInsideLane¶
bool IsInsideLane(const SSD::SimPoint3D &inputPt, const SSD::SimString &laneName, HDMapStandalone::MSideState &sideState)
判断坐标点是否在车道内
Determine if the coordinate point is within the lane.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
inputPt |
const SSD::SimPoint3D & |
输入的3D位置 Input 3D location. |
laneName |
const SSD::SimString & |
输入的车道ID,格式为roadId_sectionIndex_laneId Input lane ID, formatted as roadId_sectionIndex_laneId. |
sideState |
HDMapStandalone::MSideState & |
指定点相对于车道的位置状态,如左侧、右侧或内部 sideState that specifies the relative position of the point as either outside left side, right side, or inside. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果指定点在指定车道内,则返回true,否则返回false Returns true if the specified point is inside the specified lane, else returns false. |
GetLaneSampleByLocation¶
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.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
pos |
const SSD::SimPoint3D & |
输入的3D位置 Input 3D location. |
info |
HDMapStandalone::MLaneInfo & |
指定位置所在车道的信息(HDMapStandalone::MLaneInfo) Lane information (HDMapStandalone::MLaneInfo) of the lane at the specified location. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果在地图中找到指定位置的车道,则返回true,否则返回false Returns true if the lane at the specified location exists in the map, else returns false. |
GetLaneLineInfo¶
void GetLaneLineInfo(SSD::SimVector< HDMapStandalone::MLaneLineInfo > &data)
获取所有车道线信息列表
Get a list of all lane line information.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
data |
SSD::SimVector< HDMapStandalone::MLaneLineInfo > & |
地图中所有车道线的MLaneLineInfo对象列表 List of all MLaneLineInfo objects for lane lines in the map. |
GetForwardLaneSample¶
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.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
inputPt |
const SSD::SimPoint3D & |
当前的3D位置 Input current 3D position, pos is a 3D point. |
id |
const SSD::SimString & |
找到的车道ID,格式为roadId_sectionIndex_laneId Lane ID of the found lane, formatted as roadId_sectionIndex_laneId. |
forward |
const double & |
输入点前方的距离 The forward distance from the input point. |
laneInfoList |
SSD::SimVector< HDMapStandalone::MLaneInfo > & |
指定前向范围内的车道信息(HDMapStandalone::MLaneInfo) Lane information (HDMapStandalone::MLaneInfo) for the specified forward range. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果地图中存在指定的车道,则返回true,否则返回false Returns true if the specified lane exists in the map, else returns false. |
GetForwardLaneInfo¶
LaneInfo GetForwardLaneInfo(const SSD::SimPoint3D &pos, const TyrePosInfo &tyrePosInfo, const double &forward)
获取前方车道信息
Get forward lane information.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
pos |
const SSD::SimPoint3D & |
指定位置的坐标 The coordinates of the specified position. |
tyrePosInfo |
const TyrePosInfo & |
轮胎位置信息 Tyre position information. |
forward |
const double & |
检索前方车道信息的距离 The distance for retrieving forward lane information. |
返回值:
| 类型 | 说明 |
|---|---|
LaneInfo |
指定位置前方的车道信息 Lane information for the forward direction from the specified position. |
GetLaneList¶
void GetLaneList(const long &roadId, SSD::SimStringVector &laneList)
获取指定道路ID内所有的车道名称
Get the names of all lanes within the specified road ID.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
roadId |
const long & |
输入的道路ID Input road ID. |
laneList |
SSD::SimStringVector & |
指定道路ID内的车道名称列表 List of lane names within the specified road ID. |
GetSectionList¶
void GetSectionList(const long &roadId, SSD::SimStringVector &rightList, SSD::SimStringVector &leftList)
获取section列表
Get the section list.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
roadId |
const long & |
指定道路的ID The ID of the specified road. |
rightList |
SSD::SimStringVector & |
用于存储右侧section列表的向量 The vector to store the list of right sections. |
leftList |
SSD::SimStringVector & |
用于存储左侧section列表的向量 The vector to store the list of left sections. |
IsOverlapLaneLine¶
bool IsOverlapLaneLine(const SSD::SimPoint3D &pos, const double &radius, SSD::SimString &id)
判断给定位置是否与车道线重叠
Check if the specified position overlaps with a lane line.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
pos |
const SSD::SimPoint3D & |
指定位置的坐标 The coordinates of the specified position. |
radius |
const double & |
用于重叠检查的半径 The radius used for overlap checking. |
id |
SSD::SimString & |
重叠的车道线ID The ID of the overlapping lane line. |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果给定位置与车道线重叠,则返回true,否则返回false Returns true if there is an overlap with a lane line at the given position, false otherwise. |