终端一体化运控平台
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

messages.proto 2.6 KiB

vor 2 Jahren
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. syntax = "proto3";
  2. package robotc;
  3. message Response {
  4. int32 ret = 1;
  5. }
  6. message Coordinate {
  7. double x = 1;
  8. double y = 2;
  9. double z = 3;
  10. }
  11. message Rotation {
  12. double r = 1;
  13. double p = 2;
  14. double y = 3;
  15. }
  16. message PR {
  17. Coordinate position = 1;
  18. Rotation rotation = 2;
  19. }
  20. message JPose {
  21. repeated double joints = 1;
  22. }
  23. message Payload { // 末端负载
  24. double mass = 1; // 质量, default: 0
  25. Coordinate cog = 2; // 质心,Center of gravity, default: 0
  26. }
  27. message PayloadMass {
  28. double mass = 1;
  29. }
  30. message PayloadCog {
  31. Coordinate cog = 1;
  32. }
  33. message IOPin { int32 pin = 1; }
  34. message DIO {
  35. int32 pin = 1;
  36. int32 value = 2;
  37. }
  38. message AIO {
  39. //提供给用户做操作的地址
  40. int32 pin = 1;
  41. //电流环或电压环
  42. int32 mode = 2;
  43. double value = 3;
  44. }
  45. message ModbusExternalIOState {
  46. //设备ID
  47. int32 id = 1;
  48. //0表示断开,1表示连接成功
  49. int32 state = 2;
  50. }
  51. //xxx
  52. message IO {
  53. // 所有数字量的输入值
  54. repeated DIO robotDIOIn = 1;
  55. // 所有数字量的输出值
  56. repeated DIO robotDIOOut = 2;
  57. // 所有模拟量输入值
  58. repeated AIO robotAIOIn = 3;
  59. // 所有模拟量输出值
  60. repeated AIO robotAIOOut = 4;
  61. // 所有tcp数字量的输入值
  62. repeated DIO tcpDIOIn = 5;
  63. // 所有tcp数字量的输出值
  64. repeated DIO tcpDIOOut = 6;
  65. //modbus的状态信息
  66. repeated ModbusExternalIOState extIODevices = 7;
  67. // 所有扩展数字量的输入值
  68. repeated DIO extra_robotDIOIn = 8;
  69. // 所有扩展数字量的输出值
  70. repeated DIO extra_robotDIOOut = 9;
  71. // 所有扩展模拟量输入值
  72. repeated AIO extra_robotAIOIn = 10;
  73. // 所有扩展模拟量输出值
  74. repeated AIO extra_robotAIOOut = 11;
  75. }
  76. message Hardware {
  77. string model = 1;
  78. string sn = 2;
  79. string driver_version = 3; // 作为传入参数时无意义
  80. }
  81. message RobotInfo {
  82. Hardware robot = 1; // 机器人型号在 robot.model 里
  83. Hardware flange = 2;
  84. Hardware led = 3;
  85. repeated Hardware joints = 4;
  86. string rcVersion = 5; // 作为传入时无意义
  87. string name = 6; // 机器人默认名称
  88. Hardware comboard = 7; // 主控板
  89. string mac = 8; // 机械臂整机ID号
  90. Hardware arm = 9; // 主机箱
  91. string appTag = 10; // release cfqmp simulate joint circuit
  92. string typeTag = 11; // debug release
  93. bool extra_io = 12;
  94. //xxx
  95. }
  96. message DeviceInfo {
  97. Hardware devInfo = 1; // 主控板
  98. //2表示通信板、3表示法兰、4表示灯板、5表示关节板
  99. int32 dev_type = 2;
  100. }
  101. enum LuaState {
  102. IDLE = 0;
  103. RUNNING = 1;
  104. PAUSED = 2;
  105. ABORTED = 3; // Error
  106. STOPPED = 4; // Stop
  107. BEGIN = 5;
  108. END = 6;
  109. };