[add]添加新接口 工控机发送感知红绿灯

This commit is contained in:
xinfengkun
2022-03-30 15:13:35 +08:00
parent b0aa0d6556
commit b86df0a49f
12 changed files with 161 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
# 工控机PB文件 用于生成Java Bean
## 1. studio中*.proto文件中如果出现“Cannot resolve symbol 'xxxx'”提示
**不影响正常编译只影响美观以及无法在proto文件中跳转**
~~~
1. setting> Languages & Frameworks>Protocol Buffers 取消选中Configure automatically
2. 点击加号选择proto文件所在路径例如\MoGoEagleEye\libraries\mogo-adas-data\src\main\proto 点击OK
~~~
## 2. 遇到例如 MessagePad.Header 提示找不到的情况
**不影响正常编译,只影响美观以及无法点击跳转**
~~~
1. 选中mogo-adas-data
2. 点击Build> Make Moudle 'MoGoEagleEye.libraries.mogo-adas-data'
~~~

View File

@@ -16,6 +16,7 @@ enum MessageType
MsgTypeVehicleState = 0x10003; //底盘信息, 透传底盘状态pb参考底盘
MsgTypeAutopilotState = 0x10004; //自动驾驶状态
MsgTypeReportMessage = 0x10005; //监控事件报告
MsgTypePerceptionTrafficLight = 0x10006; //感知红绿灯
MsgTypeBasicInfoReq = 0x10100; //自动驾驶设备基础信息请求
MsgTypeBasicInfoResp = 0x10101; //自动驾驶设备基础信息应答
@@ -120,6 +121,9 @@ message AutopilotState
// message definition for MessageType: MsgTypeReportMessage
// refer to mogo_report_msg.proto
// message definition for MessageType: MsgTypePerceptionTrafficLight
// refer to traffic_light.proto
// message definition for MessageType: MsgTypeBasicInfoReq
message BasicInfoReq
{

View File

@@ -0,0 +1,36 @@
syntax = "proto2";
package perception;
import "header.proto";
enum LightType {
TYPE_DEFAULT = 0;
TYPE_VEHICLE = 1;
TYPE_BICYLE = 2;
TYPE_PEDSTRIAN = 3;
TYPE_LANE = 5;
}
enum LightState {
STATE_OFF = 0;
STATE_RED = 1;
STATE_YELLOW = 2;
STATE_GREEN = 3;
STATE_FLASH = 4;
}
message TrafficLight {
optional int64 id = 1;
optional LightType type = 2 [default = TYPE_DEFAULT];
optional LightState state = 3 [default = STATE_OFF];
optional float duration = 4; // seconds since the last state changed
}
message TrafficLights {
optional common.Header header = 1;
optional TrafficLight straight = 2;
optional TrafficLight left = 3;
optional TrafficLight right = 4;
optional TrafficLight u_turn = 5;
}