message.proto 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. syntax = "proto3";
  2. package NavMessage;
  3. message LidarOdomStatu {
  4. float x=1;
  5. float y=2;
  6. float theta=3;
  7. float v=4;
  8. float vth=5;
  9. }
  10. message AgvStatu{
  11. float v=1;
  12. float w=2;
  13. int32 clamp=3; //夹持状态 0,中间状态,1夹紧到位,2,打开到位,
  14. int32 clamp_other=4; //另外一节
  15. int32 lifter=5; //提升机构 0中间状态,1上升到位, 2下降到位
  16. int32 lifter_other = 6; //另外一节
  17. repeated int32 zcb = 7; //载车板
  18. int32 door = 8; // 门控
  19. }
  20. message ToAgvCmd {
  21. int32 H1 = 1; //心跳
  22. int32 M1 = 2; //模式:2整车模式,1:单车
  23. int32 T1 = 3; // 1:原地旋转, 2:横移, 3:MPC巡线/前进, 5:夹持, 6:松夹持, 7:提升机构抬升, 8:抬升机构下降, 其他/未接收到:停止
  24. float V1 = 4; //线速度
  25. float W1 = 5; //角速度
  26. float V2 = 6; //线速度
  27. float W2 = 7; //角速度
  28. float V3 = 8; //线速度
  29. float W3 = 9; //角速度
  30. float L1 = 10; //轴距
  31. int32 P1 = 11; //车位编号
  32. float D1 = 12; //距目标点距离
  33. float Y1=13; //前车小w
  34. float Y2=14; //后车小w
  35. int32 CL =15;
  36. int32 end = 16;
  37. }
  38. message Pose2d
  39. {
  40. float x=1;
  41. float y=2;
  42. float theta=3;
  43. }
  44. message PathNode //导航路径点及精度
  45. {
  46. float x=1; //目标点坐标
  47. float y=2;
  48. float l=3; //目标点旋转矩形方程,代表精度范围
  49. float w=4;
  50. float theta=5;
  51. optional string id=6;
  52. }
  53. message Trajectory
  54. {
  55. repeated Pose2d poses=1;
  56. }
  57. //----------------------------
  58. message NewAction //进库,出库,轨迹导航,夹持,松夹持
  59. {
  60. int32 type =1; //1,进库,2,出库,3,自动选择动作导航,4,保证agv朝前导航,5,汽车模型导航,6:夹持,7:松夹持,8:切换模式, 9:提升机构提升, 10: 提升机构下降
  61. PathNode spaceNode = 2; //进出库起点
  62. PathNode passNode=3; //进出库途径点
  63. PathNode streetNode = 4; //进出库终点
  64. repeated PathNode pathNodes=5;//导航路径点
  65. float wheelbase=6; //切换模式,轴距信息
  66. int32 changedMode=7; //1:切换单车模式,2:切换双车模式
  67. }
  68. //-----------------------------
  69. message NavCmd
  70. {
  71. int32 action=1; // 0 开始任务,1 pause, 2 continue ,3 cancel,4:切换到双车模式,5:切换到单车模式,
  72. string key=2;
  73. repeated NewAction newActions=5;
  74. }
  75. message NavResponse{
  76. int32 ret=1;
  77. string info=2;
  78. }
  79. message ManualCmd {
  80. string key = 1;
  81. int32 operation_type = 2; // 1:旋转, 2:前后平移(X方向), 3:左右平移(Y方向):
  82. float velocity = 3; // 正数为正方向,负数为负方向
  83. }
  84. service NavExcutor {
  85. rpc Start (NavCmd) returns (NavResponse) {}
  86. rpc Cancel (NavCmd) returns (NavResponse) {}
  87. rpc ManualOperation (ManualCmd) returns (NavResponse) {}
  88. }
  89. message NavStatu
  90. {
  91. int32 statu = 1; //0:ready 1:原地旋转,2:Horizon,3:vrtical,4:MPC,5:夹持开,6:夹持关,7:提升机构提升,8:提升机构下降
  92. bool main_agv=2; //是否是两节控制plc
  93. int32 move_mode=3; //运动模式,0:single,1:双车
  94. LidarOdomStatu odom=4;
  95. string key = 5; // 任务唯一码
  96. Trajectory selected_traj = 6;
  97. Trajectory predict_traj = 7;
  98. bool in_space=8; //是否在车位/正在进入车位
  99. string space_id=9;
  100. }
  101. message RobotStatu
  102. {
  103. float x=1;
  104. float y=2;
  105. float theta=3;
  106. AgvStatu agvStatu=4;
  107. }
  108. enum Range_status {
  109. Range_correct = 0x0000; // 未超界
  110. Range_front = 0x0001; //前超界
  111. Range_back = 0x0002; //后超界
  112. Range_left = 0x0004; // 左超界
  113. Range_right = 0x0008; // 右超界
  114. Range_bottom = 0x0010; //底盘超界
  115. Range_top = 0x0020; // 车顶超界
  116. Range_car_width = 0x0040; // 车宽超界
  117. Range_car_wheelbase = 0x0080; // 轴距超界
  118. Range_angle_anti_clock = 0x0100; // 左(逆时针)旋转超界
  119. Range_angle_clock = 0x0200; // 右(顺时针)旋转超界
  120. Range_steering_wheel_nozero = 0x0400; // 方向盘未回正
  121. Range_car_moving = 0x0800; // 车辆移动为1,静止为0
  122. }
  123. enum MeasureStatu {
  124. Measure_OK = 0; // 测量完成
  125. Measure_Empty_Clouds = 1; // 测量结果:测量区域数据为空
  126. Measure_Failture = 2; // 测量结果:测量区域数据无法检测出车辆
  127. Measure_Border = 3; // 测量结果:对于PLC, 车辆存在超界,具体超界状态对比Range_status
  128. Measure_Terminal_Border = 4; // 测量结果:对于终端, 车辆存在超界,具体超界状态对比Range_status
  129. Lidar_Disconnect = 5; // 测量雷达:失去连接
  130. Measure_Statu_Max = 6;
  131. }
  132. /*测量信息*/
  133. message measure_info {
  134. float cx=1; // 车辆中心坐标x
  135. float cy=2; // 车辆中心坐标y
  136. float theta=3; // 车身偏转角度(相对于y轴,左正右负)
  137. float length=4; // 车身长度(厦门四个雷达,含有该值,楚天两个雷达,该值为0)
  138. float width=5; // 车身宽度(左右两侧轮子最大宽度)
  139. float height=6; // 车身高度
  140. float wheelbase=7; // 车辆前后轴距
  141. float front_theta=8; // 车辆前轮偏转角度
  142. int32 border_statu=9; // 超界状态, 位运算
  143. MeasureStatu ground_status=10; // 测量状态,0=正常, 1=空, 2=测量失败, 3=超界, 4=终端超界, 5=雷达断连
  144. int32 is_stop=11; // <是否可停> 1为可停,0为不可停
  145. int32 motion_statu=12; // 运动状态,0=运动, 1=静止(只有三秒内都是静止才会写1,只要瞬间触发运动就会写0)
  146. float move_distance=13; // 汽车需要往前移动的距离。
  147. }
  148. /*分配的车位信息*/
  149. message parkspace_info{
  150. int32 id=1;
  151. int32 serial_id=2; //排序id
  152. int32 table_id=3; //标签id
  153. int32 unit_id=4; //单元号
  154. int32 floor=5; //楼层号
  155. int32 room_id=6; //同层编号
  156. float height=7; //车高档位
  157. }
  158. //任务表单状态
  159. enum STATU{
  160. eNormal=0; // 正常
  161. eWarning=1; // 警告
  162. eError=2; // 错误
  163. eCritical=3; // 严重错误
  164. }
  165. //表单流程模式
  166. enum Table_process_mode
  167. {
  168. PROCESS_NORMAL = 0; // 0:正常模式, 检查节点会向收费系统发送请求,收费系统的答复 通过后,再向调度发送请求
  169. PROCESS_ONLY_TO_DISPATCH = 1; // 1:强制存取车,检查节点会向收费系统发送请求,忽略收费系统的答复,直接向调度发送请求。
  170. PROCESS_ONLY_TO_PAY = 2; // 2:虚拟存取车, 检查节点会向收费系统发送请求,忽略收费系统的答复。
  171. }
  172. /*
  173. 表单执行状态
  174. */
  175. message table_statu{
  176. STATU execute_statu=1; // 执行状态
  177. string statu_description=2; // 状态描述
  178. Table_process_mode table_process_mod=3; // 表单流程模式
  179. }
  180. /*
  181. 号牌信息
  182. */
  183. message plate_number_info
  184. {
  185. string plate_number = 1; // 号牌
  186. string plate_color = 2; // 号牌颜色
  187. string plate_type = 3; // 号牌类型, 车辆类型
  188. int32 plate_confidence = 4; // 号牌可信度, 1-100 值越高可信度越高
  189. string recognition_time = 5; // 识别时间点, yyyyMMddHHmmss
  190. string plate_full_image = 6; // 号牌全景图, base64编码
  191. string plate_clip_image = 7; // 号牌特写图, base64编码
  192. }
  193. /*
  194. 停车表单
  195. */
  196. message park_table{
  197. table_statu statu=1; //表单状态
  198. int32 queue_id=2; //指令排队编号
  199. string car_number=3;
  200. int32 unit_id=4;
  201. int32 terminal_id=5;
  202. string primary_key=6;
  203. measure_buffer entrance_measure_info=7; // 入口测量信息
  204. parkspace_info allocated_space_info=8; // 分配的车位信息
  205. measure_buffer actually_measure_info=9; // 实际测量信息或者叫二次测量信息
  206. parkspace_info actually_space_info=10; // 实际停放的车位
  207. int32 import_id =11; // 入口id, 1~2
  208. plate_number_info car_number_info = 12; // 车牌号信息
  209. }
  210. /*
  211. 取车表单
  212. */
  213. message pick_table{
  214. table_statu statu=1; // 表单状态
  215. int32 queue_id=2; // 指令排队编号
  216. string car_number=3;
  217. int32 unit_id=4;
  218. int32 terminal_id=5;
  219. string primary_key=6;
  220. parkspace_info actually_space_info=7; // 实际停放的车位信息
  221. measure_buffer actually_measure_info=8; // 存车时的实际测量信息(轴距)
  222. int32 export_id=9; // 出口id, 3~4
  223. bool is_leaved=10; // 是否离开
  224. plate_number_info car_number_info = 11; // 车牌号信息
  225. }
  226. /*
  227. 以下是状态消息
  228. */
  229. /*
  230. 单片机节点状态
  231. */
  232. message out_mcpu_statu{ //数值+1后
  233. int32 door_statu=1; //外门状态 0无效, 1无效, 2开到位, 3 关到位, 4开关中, 5 故障
  234. int32 outside_safety=2; //是否有车 0无效, 1无车, 2有车
  235. }
  236. message in_mcpu_statu{ //数值+1后
  237. int32 door_statu=1; //外门状态 0无效, 1无效, 2开到位, 3 关到位, 4开关中, 5 故障
  238. int32 back_io=2; //后超界 0无效, 1后超界, 2正常
  239. int32 is_occupy=3; //是否有车 0无效, 1无车, 2有车
  240. int32 heighth=4; //车高状态 0无效, 1无效, 2小车, 3中车, 4大车, 5故障, 6故障
  241. }
  242. /*
  243. 测量节点状态
  244. */
  245. message measure_buffer{
  246. measure_info measure_info_to_plc_forward=1; //雷达数据给plc,正向
  247. measure_info measure_info_to_plc_reverse=2; //雷达数据给plc,反向
  248. measure_info measure_info_to_terminal=3; //雷达数据给终端,边界较小
  249. }
  250. //搬运器状态枚举
  251. enum CarrierStatu{
  252. eIdle=0;
  253. eBusy=1;
  254. eFault=2;
  255. }
  256. /*
  257. //楚天调度入口汽车范围的修正信息
  258. message dispatch_region_info
  259. {
  260. int32 terminal_id=1; //入口终端编号, 1~6
  261. float turnplate_angle_min=2; //转盘角度最小值, 负值, 例如 -5度
  262. float turnplate_angle_max=3; //转盘角度最大值, 正值, 例如 +5度
  263. }
  264. //楚天搬运器状态消息
  265. message dispatch_node_statu{
  266. CarrierStatu statu=1;
  267. int32 idle_stop_floor=2; //空闲时停留位置
  268. park_table running_pack_info=3; //正在执行的停车表单
  269. pick_table running_pick_info=4; //正在执行的取车表单
  270. int32 unit_id = 5; //单元号, 1~3
  271. int32 plc_heartbeat = 6; //plc心跳信息
  272. int32 plc_status_info = 7; //plc状态的集合
  273. //0 bit, 手动模式
  274. //1 bit, 自动模式
  275. //2 bit, 自动运行中
  276. //3 bit, 复位
  277. //4 bit, 1号口可以进车
  278. //5 bit, 2号口可以进车
  279. //6 bit, 预留
  280. //7 bit, 预留
  281. repeated dispatch_region_info dispatch_region_info_vector = 8; //调度入口汽车范围的修正信息
  282. }
  283. */
  284. //plc出入口状态结构体
  285. message dispatch_plc_passway_status
  286. {
  287. int32 car_height = 1; //车高 0=无车 1=小车 2=中车 3=大车 4=超高车
  288. int32 outside_door_status = 2; //外门状态 0=无状态 1=开到位 2=关到位
  289. int32 inside_door_status = 3; //内门状态 0=无状态 1=开到位 2=关到位
  290. int32 comb_body_status = 4; //梳体状态 0=无状态 1=上到位 2=下到位, AB特有
  291. float turnplate_angle_min = 5; //转盘角度最小值, C特有, 负值, 例如 -5度
  292. float turnplate_angle_max = 6; //转盘角度最大值, C特有, 正值, 例如 +5度
  293. int32 sensor_1 = 7; //传感器状态的集合1
  294. //0 bit, 地感 0=无车 1=有车
  295. //1 bit, 移动检测 0=运动 1=静止
  296. //2 bit, 动态超限 0=遮挡 1=正常
  297. //3 bit, 后超界 0=遮挡 1=正常
  298. //4 bit, 前超界 0=遮挡 1=正常
  299. //5 bit, 左超界 0=遮挡 1=正常
  300. //6 bit, 右超界 0=遮挡 1=正常
  301. //7 bit, 车高小车, 0=遮挡 1=正常,AB单元为1480, C单元为1780,
  302. int32 sensor_2 = 8; //传感器状态的集合1
  303. //0 bit, 车高中车, 0=遮挡 1=正常,AB单元为1500, C单元为1800,
  304. //1 bit, 车高大车, 0=遮挡 1=正常,AB单元为2050, C单元为2050,
  305. //2 bit, 有车检测 0=无车 1=有车
  306. //3 bit, 车轮1检测 0=无车 1=有车, AB特有
  307. //4 bit, 车轮2检测 0=无车 1=有车, AB特有
  308. //5 bit, 预留
  309. //6 bit, 预留
  310. //7 bit, 预留
  311. int32 plc_passway_enable=9; //出入口 0=不可进车, 1=可进车, 2=维护不可进车, 3=维护可进车
  312. }
  313. //厦门搬运器状态消息
  314. message dispatch_node_statu{
  315. CarrierStatu statu=1;
  316. int32 idle_stop_floor=2; //空闲时停留位置
  317. park_table running_pack_info=3; //正在执行的停车表单
  318. pick_table running_pick_info=4; //正在执行的取车表单
  319. int32 unit_id = 5; //单元号, 1~3
  320. int32 plc_heartbeat = 6; //plc心跳信息
  321. int32 plc_mode_status = 7; //plc状态的集合
  322. //0 bit, 手动模式, 维修模式
  323. //1 bit, 自动模式
  324. //2 bit, 自动运行中
  325. //3 bit, 复位
  326. //4 bit, 预留
  327. //5 bit, 预留
  328. //6 bit, 预留
  329. //7 bit, 预留
  330. int32 plc_passway_status = 8; //plc 出入口状态
  331. //0 bit, 入口1 可进车
  332. //1 bit, 入口1 维护
  333. //2 bit, 入口2 可进车
  334. //3 bit, 入口2 维护
  335. //4 bit, 出口1 可出车
  336. //5 bit, 出口1 维护
  337. //6 bit, 出口2 可出车
  338. //7 bit, 出口2 维护
  339. int32 plc_carrier_status = 9; //搬运器状态 0=故障 1=存车 2=取车 3=空闲 4=维护 5=小故障 6=大故障 7=月度保养
  340. int32 plc_inlet_1_status = 10; //入口1 0=不可进车, 1=可进车, 2=维护不可进车, 3=维护可进车
  341. int32 plc_inlet_2_status = 11; //入口2 0=不可进车, 1=可进车, 2=维护不可进车, 3=维护可进车
  342. int32 plc_outlet_3_status = 12; //出口3 0=不可进车, 1=可进车, 2=维护不可进车, 3=维护可进车
  343. int32 plc_outlet_4_status = 13; //出口4 0=不可进车, 1=可进车, 2=维护不可进车, 3=维护可进车
  344. repeated dispatch_plc_passway_status dispatch_plc_passway_status_vector = 14; //plc出入口状态结构体, 数组下标0~1是入口, 数组下标2~3是出口
  345. }
  346. message terminal_node_statu{
  347. int32 terminal_id = 1;
  348. int32 import_id = 2;
  349. string car_number = 3;
  350. }
  351. //厦门C单元夹车杆
  352. //夹车杆数据
  353. message Clamp_lidar_info
  354. {
  355. int32 has_wheel_flag=1; //是否检测到车轮
  356. float distance_y=2; //轮子中心和夹车杆中心的距离y,修正小Y,对比前后轴距
  357. float distance_x=3; //轮子中心和夹车杆中心的距离x,修正轿厢x,对比2个大Y的左右偏差
  358. int32 has_clamp_flag=4; //夹车杆是否夹到位
  359. }
  360. //plc给夹车杆雷达, plc把大小Y伸出后,在夹车之前,会把9070复制到9071,从而保存一份数据
  361. message Clamp_lidar_buffer
  362. {
  363. repeated Clamp_lidar_info clamp_lidar_info_vector=1;
  364. }