[6100][adas]数据上车L4场景NDE车龙数据接口,增加是否有车龙判断方法

This commit is contained in:
xinfengkun
2025-02-05 15:10:26 +08:00
parent 0fbcbe7632
commit b0f40212bf
3 changed files with 114 additions and 2 deletions

View File

@@ -11,6 +11,22 @@ import perception.FusionTrafficLightOuterClass
*/
interface IMoGoAutopilotIdentifyListener {
/**
* 判断是否有车龙
*/
fun isLongVehicleQueue(
type: Int,
polygon: List<MessagePad.Location>?
): Boolean {
// 检查 type 是否为 707 表示NED陈数据
val isRoadCongested = type == 707
// 检查 polygon 是否不为空且个数大于 1
val hasEnoughPolygonPoints = (polygon?.size ?: 0) > 1
// 同时满足两个条件
return isRoadCongested && hasEnoughPolygonPoints
}
/**
* 识别交通元素数据发生更新
*