def.proto 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. syntax = "proto3";
  2. package JetStream;
  3. message CoordinateTransformation3D {
  4. optional float x = 1;
  5. optional float y = 2 ;
  6. optional float z = 3 ;
  7. optional float roll = 4 ;
  8. optional float pitch = 5;
  9. optional float yaw = 6 ;
  10. }
  11. message RequestCmd
  12. {
  13. int32 Id=1; // 对于获取对应id的相机数据。1,2,3,4,其他表示所有
  14. optional CoordinateTransformation3D params = 2;
  15. }
  16. message Response{
  17. string info=2;
  18. }
  19. message Image{
  20. int32 width=1;
  21. int32 height=2;
  22. int32 channel=3;
  23. bool encode = 4;
  24. bytes data= 5;
  25. }
  26. message PointCloud{
  27. int32 size=1;
  28. bytes data=2;
  29. }
  30. message LabelImage{
  31. int32 label=1;
  32. Image ir=2;
  33. }
  34. message Line{
  35. int32 begin=1;
  36. int32 end=2;
  37. }
  38. message SegBox{
  39. int32 x = 1;
  40. int32 y = 2;
  41. int32 width = 3;
  42. int32 height = 4;
  43. float confidence = 5;
  44. repeated Line lines= 6;
  45. }
  46. message LabelYolo{
  47. int32 label=1;
  48. repeated SegBox boxes=2;
  49. }
  50. message ResImage{
  51. Image img1=1;
  52. Image img2=2;
  53. Image img3=3;
  54. Image img4=4;
  55. }
  56. message ResCloud{
  57. PointCloud cloud1=1;
  58. PointCloud cloud2=2;
  59. PointCloud cloud3=3;
  60. PointCloud cloud4=4;
  61. }
  62. message MeasureInfo {
  63. optional float x=1;
  64. optional float y=2;
  65. optional float trans_x=3;
  66. optional float trans_y=4;
  67. optional float theta=5;
  68. optional float width=6;
  69. optional float wheelbase=7;
  70. optional float ftheta=8;
  71. // 超界说明,此参数没有表示正常。
  72. // 1:超宽,2:轴距超长,
  73. // 3:前超界,4:后超界,5:左,6:右,7:左倾角过大,8:右倾角过大,9:前轮角过大
  74. optional int32 border_plc=9;
  75. optional int32 border_display=10;
  76. optional string error=11;
  77. }
  78. message ResFrame{
  79. ResImage images=1;
  80. ResCloud clouds=2;
  81. MeasureInfo measure_info=3;
  82. }
  83. service StreamServer{
  84. rpc OpenImageStream(RequestCmd) returns(stream ResImage){}
  85. rpc OpenMeasureDataStream(RequestCmd) returns(stream MeasureInfo){}
  86. rpc CloseImageStream(RequestCmd) returns(Response){}
  87. rpc CloseMeasureDataStream(RequestCmd) returns(Response){}
  88. rpc GetCloud(RequestCmd) returns(ResCloud){}
  89. rpc GetImage(RequestCmd) returns(ResImage){}
  90. rpc setTofTransformation(RequestCmd) returns(Response){}
  91. rpc saveTofTransformation(RequestCmd) returns(Response){}
  92. }
  93. message Boundary{
  94. float radius=1; //转台半径
  95. float left=2;
  96. float right=3;
  97. float buttom=4;
  98. float minAngle=5;
  99. float maxAngle=6;
  100. float fwheelAngle=7;
  101. }
  102. message Limit{
  103. Boundary plc_limit=1;
  104. Boundary display_limit=2;
  105. float maxWidth=3;
  106. float maxWheelBase=4;
  107. }