Merge branch 'release_robotaxi-d-app-module_2130_221116_2.13.0.1_temp' into dev_robotaxi-d-app-module_2132_221223_2.13.2

This commit is contained in:
lixiaopeng
2023-01-06 11:34:15 +08:00
20 changed files with 2008 additions and 15 deletions

View File

@@ -24,7 +24,8 @@ enum PilotMode {
MODE_STEER_ONLY = 2;
MODE_SPEED_ONLY = 3;
MODE_REMOTE_DRIVE = 6;
CHASSID_TELECONTROL_DRIVE = 7;
MODE_TELECONTROL_DRIVE = 7;
MODE_INVALID = 8;
}
enum LongitudeDrivingMode {
@@ -98,4 +99,4 @@ enum CleanSystemControlMode {
Clean_PureWash_Both_Side_Work = 12;
Clean_PureWash_Left_Work = 13;
Clean_PureWash_Right_Work = 14;
}
}

View File

@@ -1,5 +1,5 @@
syntax = "proto3";
package mogo.v2x.v2i;
package mogo.v2x;
import "header.proto";
import "mogo_v2x.proto";
@@ -91,10 +91,27 @@ message SpatWarningData{
repeated SpatLight lights = 3; /* 灯色信息集合 */
}
message ObuWarningData{
common.Header header = 1;
int32 MsgDataType = 2; /*1:rsiEvent; 2:RsmEvent; 3:SpatEvent*/
RsiWarningData rsiEvent = 3;
RsmWarningData RsmEvent = 4;
SpatWarningData SpatEvent = 5;
message NodeID{
int32 region = 1;/* 定义地图中划分区域的ID号 */
int32 id = 2; /* 定义地图节点ID */
}
message MapMatchData{
int32 status = 1;/* 状态信息0更新1添加2删除 */
int32 unitMask = 2;/* 描述所属字段有效性 */
NodeID currentNodeID = 3;/* 前方节点信息 */
NodeID upstreamNodeID = 4;/* 上游节点信息 */
int32 matchingLaneID = 5;/* 匹配车道ID0无效 */
int32 speedMaxLimit = 6;/* 建议最大车速,单位(0.02m/s) */
int32 speedMinLimit = 7;/* 建议最小车速,单位(0.02m/s) */
}
message ObuWarningData{
common.Header header = 1;
int32 msgDataType = 2; /*1:rsiEvent; 2:rsmEvent; 3:spatEvent; 4:mapMatchData*/
RsiWarningData rsiEvent = 3;
RsmWarningData rsmEvent = 4;
SpatWarningData spatEvent = 5;
MapMatchData mapMatchData = 6;
}

View File

@@ -30,7 +30,6 @@ message HealthInfo{
message TopicInfo{
optional string name = 1; //topic name
optional int32 hz = 2; //Topic发送的频率
// optional int32 max_delay = 3; //unit msec
}
message DropTopic{
@@ -38,10 +37,28 @@ message DropTopic{
repeated TopicInfo topic = 2;
}
message NodeInfo{
optional string node_name = 1; //node name
optional string launch_name = 2; //launch name
optional int32 state = 3; //0未知状态None1依赖未就绪Waiting2启动中Starting3运行running4停止stopping5无法启动状态6人为启动状态7人为关闭状态
}
message NodeFaultList{
required int32 sum = 1; //下述node总数
repeated NodeInfo node = 2;
}
message StatusInfo {
required SystemState sys_state=1; // 当前消息状态
required SystemState sys_state=1; // 当前系统状态
repeated HealthInfo health_info=2; // 健康检查状态信息
optional DropTopic topic_drop_info=3; // topic 掉频信息, 如有掉频添加没有不添加
optional string reserved = 4; // 预留可选字段,用于接口扩充或者,其他信息补充
optional string reserved = 4; // 用于表示idle模式'idle' 表示idle模式 'work' 表示正常工作
// add by liyl 20220907
optional int32 pilot_mode = 5; // 0: manaul 1: autopilot 2: RemotePilot
optional string map_version = 6; // MAP 版本信息
optional string master_version = 7; // system_master 版本信息
optional bool auto_pilot_ready = 8; // 自动驾驶状态就绪, 20221111增加
optional bool remote_pilot_ready = 9; // 平行驾驶状态就绪
optional NodeFaultList auto_pilot_unready_list = 10; //20221128 增加
optional NodeFaultList remote_pilot_unready_list = 11; //20221128 增加
}

View File

@@ -6,6 +6,7 @@ import com.zhidao.support.adas.high.common.ProtocolStatus;
import chassis.VehicleStateOuterClass;
import mogo.telematics.pad.MessagePad;
import mogo.v2x.ObuWarningEvent;
import mogo_msg.MogoReportMsg;
import perception.TrafficLightOuterClass;
import prediction.Prediction;
@@ -180,6 +181,13 @@ public interface OnAdasListener {
*/
void onPlanningActionMsg(MessagePad.Header header, MessagePad.PlanningActionMsg planningActionMsg);
/**
* OBU预警事件
*
* @param header 头
* @param obuWarningData 数据
*/
void onObuWarningData(MessagePad.Header header, ObuWarningEvent.ObuWarningData obuWarningData);
/**
* 是否有能力启动自动驾驶

View File

@@ -53,7 +53,8 @@ public enum MessageType {
TYPE_SEND_TRIP_INFO_REQ(MessagePad.MessageType.MsgTypeTripInfoEvent, "行程信息"),
TYPE_SEND_SPECIAL_VEHICLE_TASK_CMD(MessagePad.MessageType.MsgTypeSpecialVehicleTaskCmd, "特种车辆命令"),
//透传 原始pb文件中不存在以下type。由于Java中无法强转所以在mogo-adas-data message_pad.proto中放开注释
TYPE_RECEIVE_PLANNING_DECISION_STATE(MessagePad.MessageType.MsgTypePlanningDecisionState, "Planning决策状态");
TYPE_RECEIVE_PLANNING_DECISION_STATE(MessagePad.MessageType.MsgTypePlanningDecisionState, "Planning决策状态"),
TYPE_RECEIVE_OBU_WARNING_DATA(MessagePad.MessageType.MsgTypeObuWarningData, "OBU预警事件");
/**

View File

@@ -31,6 +31,7 @@ public class MyMessageFactory implements IMyMessageFactory {
private IMsg statusQueryRespMessage;//状态查询应答
private IMsg recordDataConfigRespMessage;//数据采集配置应答
private IMsg planningDecisionStateMessage;//planning决策状态
private IMsg obuWarningDataMessage;//工控机透传OBU V2I数据
private final AutopilotReview autopilotReview;
@@ -148,6 +149,12 @@ public class MyMessageFactory implements IMyMessageFactory {
planningDecisionStateMessage = new PlanningDecisionStateMessage();
}
return planningDecisionStateMessage;
} else if (messageType == MessageType.TYPE_RECEIVE_OBU_WARNING_DATA.typeCode) {
//OBU预警事件
if (obuWarningDataMessage == null) {
obuWarningDataMessage = new ObuWarningDataMessage();
}
return obuWarningDataMessage;
} else {
//MessageType.TYPE_DEFAULT.typeCode
return null;

View File

@@ -0,0 +1,31 @@
package com.zhidao.support.adas.high.msg;
import android.os.SystemClock;
import com.google.protobuf.InvalidProtocolBufferException;
import com.zhidao.support.adas.high.AdasChannel;
import com.zhidao.support.adas.high.OnAdasListener;
import com.zhidao.support.adas.high.common.CupidLogUtils;
import com.zhidao.support.adas.high.protocol.RawData;
import mogo.v2x.ObuWarningEvent;
/**
* OBU预警事件
*/
public class ObuWarningDataMessage extends MyAbstractMessageHandler {
@Override
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
ObuWarningEvent.ObuWarningData obuWarningData = ObuWarningEvent.ObuWarningData.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
AdasChannel.calculateTimeConsumingOnDispatchRaw("OBU预警事件", raw.receiveTime);
long nowTime = 0;
if (CupidLogUtils.isEnableLog())
nowTime = SystemClock.elapsedRealtime();
if (adasListener != null) {
adasListener.onObuWarningData(raw.getHeader(), obuWarningData);
}
AdasChannel.calculateTimeConsumingBusiness("OBU预警事件", nowTime);
}
}