message.proto 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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,半打开到位,3. 全打开到位
  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; // 门控(1门+状态+2门+状态)
  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:抬升机构下降, 9:松夹持全开位,其他/未接收到:停止
  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; //主车相对前车的dy
  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; //运动模式,1:single,2:双车
  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. }