message.proto 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. }
  16. message ToAgvCmd {
  17. int32 H = 1; //心跳
  18. int32 M = 2; //模式:2整车模式,1:单车
  19. int32 T = 3; // 1:原地旋转,2:横移,3:MPC巡线/前进, 5,夹持,6,松夹持,其他/未接收到:停止
  20. float V = 4; //角速度
  21. float W = 5; //线速度
  22. float L = 6; //轴距
  23. int32 end = 7;
  24. }
  25. message Pose2d
  26. {
  27. float x = 1;
  28. float y = 2;
  29. float theta = 3;
  30. }
  31. message PathNode //导航路径点及精度
  32. {
  33. float x = 1; //目标点坐标
  34. float y = 2;
  35. float l = 3; //目标点旋转矩形方程,代表精度范围
  36. float w = 4;
  37. float theta = 5;
  38. string id = 6;
  39. }
  40. message Trajectory
  41. {
  42. repeated Pose2d poses = 1;
  43. }
  44. //----------------------------
  45. message NewAction //进库,出库,轨迹导航,夹持,松夹持
  46. {
  47. int32 type = 1; //1,进库,2,出库,3,自动选择动作导航,4,保证agv朝前导航,5,汽车模型导航,6:夹持,7:松夹持,8:切换模式
  48. PathNode spaceNode = 2; //进出库起点
  49. PathNode passNode = 3; //进出库途径点
  50. PathNode streetNode = 4; //进出库终点
  51. repeated PathNode pathNodes = 5;//导航路径点
  52. float wheelbase = 6; //切换模式,轴距信息
  53. int32 changedMode = 7; //1:切换单车模式,2:切换双车模式
  54. }
  55. //-----------------------------
  56. message NavCmd
  57. {
  58. int32 action = 1; // 0 开始任务,1 pause, 2 continue ,3 cancel,4:切换到双车模式,5:切换到单车模式,
  59. string key = 2;
  60. repeated NewAction newActions = 5;
  61. }
  62. message NavResponse {
  63. int32 ret = 1;
  64. string info = 2;
  65. }
  66. message ManualCmd {
  67. string key = 1;
  68. int32 operation_type = 2; // 1:旋转, 2:前后平移(X方向), 3:左右平移(Y方向):
  69. float velocity = 3; // 正数为正方向,负数为负方向
  70. }
  71. service NavExcutor {
  72. rpc Start (NavCmd) returns (NavResponse) {}
  73. rpc Cancel (NavCmd) returns (NavResponse) {}
  74. rpc ManualOperation (ManualCmd) returns (NavResponse) {}
  75. }
  76. message NavStatu
  77. {
  78. int32 statu = 1; //0:ready 1:原地旋转,2:Horizon,3:vrtical,4:MPC,5:夹持开,6:夹持关
  79. bool main_agv = 2; //是否是两节控制plc
  80. int32 move_mode = 3; //运动模式,1:single,2:双车
  81. LidarOdomStatu odom = 4;
  82. string key = 5; // 任务唯一码
  83. Trajectory selected_traj = 6;
  84. Trajectory predict_traj = 7;
  85. bool in_space = 8; //是否在车位/正在进入车位
  86. string space_id = 9;
  87. }
  88. message RobotStatu
  89. {
  90. float x = 1;
  91. float y = 2;
  92. float theta = 3;
  93. AgvStatu agvStatu = 4;
  94. }