You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

57 line
1.2 KiB

  1. syntax = "proto3";
  2. // compile method:
  3. // 1. cpp:
  4. // protoc --grpc_out=./ --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` *.proto
  5. // protoc --cpp_out=. *.proto
  6. // 2. python:
  7. // protoc --python_out=. *.proto
  8. //import "google/protobuf/empty.proto";
  9. // build for web
  10. // protoc -I=./ *.proto --js_out=import_style=commonjs:./ --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./
  11. package osserver;
  12. service OsServer {
  13. rpc getRingData(Req) returns (stream RingData);
  14. }
  15. message Req {
  16. int32 req = 1;
  17. }
  18. message PR {
  19. double x = 1;
  20. double y = 2;
  21. double z = 3;
  22. double rr = 4;
  23. double rp = 5;
  24. double ry = 6;
  25. }
  26. message Joint {
  27. double targetPose = 1;
  28. double targetV = 2;
  29. double targetA = 3;
  30. double targetTorque = 4;
  31. double actualPose = 5;
  32. double actualV = 6;
  33. double actualA = 7;
  34. double actualTorque = 8;
  35. double temperature = 9;
  36. }
  37. message RingData {
  38. repeated Joint joints = 1;
  39. int32 num = 2;
  40. PR targetPose = 3;
  41. PR actualPose = 4;
  42. CurrentVoltage voltage = 5;
  43. }
  44. message CurrentVoltage {
  45. double power = 1; // 电源电压V/电流mA
  46. double flan = 2; // 法兰电压/电流
  47. repeated double joint = 3; // 关节电压/电流
  48. double io_power = 4; // IO板
  49. }