From b0f40212bf403244114b7928adb2549d2ca9460d Mon Sep 17 00:00:00 2001 From: xinfengkun Date: Wed, 5 Feb 2025 15:10:26 +0800 Subject: [PATCH] =?UTF-8?q?[6100][adas]=E6=95=B0=E6=8D=AE=E4=B8=8A?= =?UTF-8?q?=E8=BD=A6L4=E5=9C=BA=E6=99=AFNDE=E8=BD=A6=E9=BE=99=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=9C=89=E8=BD=A6=E9=BE=99=E5=88=A4=E6=96=AD=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IMoGoAutopilotIdentifyListener.kt | 16 ++++ .../main/proto/EagleEyeRecommend.proto.back | 82 +++++++++++++++++++ .../src/main/proto/message_pad.proto | 18 +++- 3 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 libraries/mogo-adas-data/src/main/proto/EagleEyeRecommend.proto.back diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotIdentifyListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotIdentifyListener.kt index 40c67dccdb..e1e4b54f9a 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotIdentifyListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotIdentifyListener.kt @@ -11,6 +11,22 @@ import perception.FusionTrafficLightOuterClass */ interface IMoGoAutopilotIdentifyListener { + /** + * 判断是否有车龙 + */ + fun isLongVehicleQueue( + type: Int, + polygon: List? + ): Boolean { + // 检查 type 是否为 707 表示NED陈数据 + val isRoadCongested = type == 707 + // 检查 polygon 是否不为空且个数大于 1 + val hasEnoughPolygonPoints = (polygon?.size ?: 0) > 1 + // 同时满足两个条件 + return isRoadCongested && hasEnoughPolygonPoints + } + + /** * 识别交通元素数据发生更新 * diff --git a/libraries/mogo-adas-data/src/main/proto/EagleEyeRecommend.proto.back b/libraries/mogo-adas-data/src/main/proto/EagleEyeRecommend.proto.back new file mode 100644 index 0000000000..571d736032 --- /dev/null +++ b/libraries/mogo-adas-data/src/main/proto/EagleEyeRecommend.proto.back @@ -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; +} + diff --git a/libraries/mogo-adas-data/src/main/proto/message_pad.proto b/libraries/mogo-adas-data/src/main/proto/message_pad.proto index b64521c2b8..04b716d7df 100644 --- a/libraries/mogo-adas-data/src/main/proto/message_pad.proto +++ b/libraries/mogo-adas-data/src/main/proto/message_pad.proto @@ -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 }