[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
}
/**
* 识别交通元素数据发生更新
*

View File

@@ -0,0 +1,82 @@
syntax = "proto3";
package mogo.nde.service.dto.protocol;
option java_package = "mogo.nde.service.dto.protocol";
//TODO 仅做备份使用
// 鹰眼推荐车道
message AutoSteerInfo {
/**
* 道路Id
*/
string roadId = 1;
/**
* 生成时间
*/
int64 systemTime = 2;
/**
* 具体内容
*/
repeated RecommendInfo recommendInfo = 3;
}
message RecommendInfo{
/**
* 车龙id,如果有车龙的话,没有不传
*/
string uuid = 1;
/**
* 车道号
*/
int32 laneNum = 2;
/**
* 车龙车辆id集合若无车龙则为空集合
*/
repeated string uuids = 3;
/**
* 车辆轨迹,有车龙有值
*/
repeated Point2D points = 4;
/**
* 车道线轨迹,车道中心线与停止线交点
*/
repeated Point2D lanePoints = 5;
/**
* 车龙长度
*/
double length = 6;
/**
* 是否是建议车道
*/
bool suggestedLanes = 7;
/**
车道类型
直行 201
直行或左转 202
直行或右转 203
直行或掉头 204
左转 205
左转或掉头 206
左弯或向左合流 207
右转 208
右转或向右合流209
左右转弯 210
掉头211
禁止左转212
禁止右转213
禁止掉头214
直行或左转或右转215
直行或掉头或左转216
右转或掉头217
禁止右转或向右合流218
*/
int32 arrowType = 8;
}
//2维点
message Point2D {
// 经度
double lon = 1;
// 维度
double lat = 2;
}

View File

@@ -317,7 +317,9 @@ message TrackedObject
uint32 drawLevel = 12; //危险等级 1 绿,2 黄,3 红
double driverTime = 13; //驱动感知时间, abandoned
repeated TrackedSource tracked_source = 14;
repeated Location polygon = 15;
repeated Location polygon = 15;//当 type == 707 时
//车龙轨迹对应NED原始PB EagleEyeRecommend.proto中的lanePoints字段原始PB中那个points和lanePoints区别points字段里面是车龙上的车辆中心点练起来的线可能歪歪扭扭的。lanePoints字段里面是车龙所在车道的车道中心线连续更平滑
//此字段 size > 1 时表示有车龙轨迹,有车龙时仅longitude和latitude赋值 size == 1 时表示无车龙
geometry.Point center = 16;
AdditionalAttribute add_attribute = 17; //事件类型
double angle = 18; //相对于自车x轴的角度左正右负
@@ -326,7 +328,19 @@ message TrackedObject
string camera_ip = 21; //来源IP
uint64 detect_start_time = 22; //V2N事件生成UTC时间单位毫秒
string v2x_uuid = 23; //V2X目标uuid
reserved 24 to 100;
//对应NED原始PB EagleEyeRecommend.proto中的uuid字段
//与NED原始数据稍有不同。NED原石数据无车龙时不传参数域控融合后的的数据有车龙是id样式2b9564b8-1b7f-4533-9c66-b472780c986a 无车龙id样式是数字1、2、3、4、……
string roadId = 24; //V2N车龙道路ID 对应NED原始PB EagleEyeRecommend.proto中的roadId字段
int32 laneNum = 25; //V2N车龙彻车道号 对应NED原始PB EagleEyeRecommend.proto中的laneNum字段
bool suggestedLanes = 26; //V2N车龙是否是建议车道 对应NED原始PB EagleEyeRecommend.proto中的suggestedLanes字段
int32 arrowType = 27; //V2N车龙车道类型
//对应NED原始PB EagleEyeRecommend.proto中的arrowType字段
//目前除以下注释里面的值,其他的数字都没有意义
//直行 201直行或左转 202直行或右转 203直行或掉头 204
//左转 205左转或掉头 206左弯或向左合流 207右转 208右转或向右合流 209
//左右转弯 210掉头 211禁止左转 212禁止右转 213禁止掉头 214直行或左转或右转 215
//直行或掉头或左转 216右转或掉头 217禁止右转或向右合流 218
reserved 28 to 100;
string strUuid = 101;//String类型车辆ID
}