GoodTekken

20220528_Pallet_Struct.h

May 31st, 2022 (edited)
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. //#ifndef PALLET_STRUCT_H
  2. //#define PALLET_STRUCT_H
  3.  
  4. //#endif // PALLET_STRUCT_H
  5.  
  6. #pragma once
  7. #include <cstdint>
  8.  
  9. typedef struct
  10. {
  11. uint32_t ElapsedTime;
  12. uint32_t PalletX;
  13. uint32_t PalletY;
  14. uint32_t PalletZ;
  15.  
  16. uint32_t LeftPocketX;
  17. uint32_t LeftPocketY;
  18. uint32_t LeftPocketZ;
  19. uint32_t RightPocketX;
  20. uint32_t RightPocketY;
  21. uint32_t RightPocketZ;
  22. uint32_t Roll;
  23. uint32_t Pitch;
  24. uint32_t Yaw;
  25. }pallet_pose;
  26.  
  27.  
  28. typedef struct
  29. {
  30. char head[4]; //4字节 ("s" "t" "a" "r")
  31. uint32_t CommandID; //4字节 1:getPalletRequest
  32. uint32_t ArgsLen; //4字节 7
  33. uint16_t PalletType; //2字节
  34. char DepthHint[4]; //4字节
  35. char FilterMask; //1字节
  36. char tail[6]; //6字节 ("s" "t" "o" "p" "\r" "\n")
  37. }getPalletRequest;
  38.  
  39.  
  40. typedef struct
  41. {
  42. char head[4]; //4字节 ("s" "t" "a" "r")
  43. uint32_t CommandID; //4字节 1:getPalletRequest
  44. uint32_t ErrorCode; //4字节 7
  45. uint32_t Len; //4字节
  46. float ElapsedTime; //4字节
  47. float Confidence; //4字节 //24
  48.  
  49. uint32_t pallet_center_hole_x; //4字节
  50. uint32_t pallet_center_hole_y; //4字节
  51. uint32_t pallet_center_hole_z; //4字节
  52.  
  53. uint32_t pallet_left_hole_x; //4字节
  54. uint32_t pallet_left_hole_y; //4字节
  55. uint32_t pallet_left_hole_z; //4字节
  56.  
  57. uint32_t pallet_right_hole_x; //4字节
  58. uint32_t pallet_right_hole_y; //4字节
  59. uint32_t pallet_right_hole_z; //4字节 //36
  60.  
  61. float Roll; //4字节 Rotation of pallet about the x-axis
  62. float Pitch; //4字节 Rotation of pallet about the y-axis
  63. float Yaw; //4字节 Rotation of pallet about the z-axis
  64.  
  65. char tail[6]; //6字节 ("s" "t" "o" "p" "\r" "\n")
  66. }getPalletResponse_success; //共78字节
  67.  
  68. typedef struct
  69. {
  70. char head[4]; //4字节 ("s" "t" "a" "r")
  71. uint32_t CommandID; //4字节 1:getPalletRequest
  72. uint32_t ErrorCode; //4字节 7
  73. uint32_t Len; //4字节
  74. char tail[6]; //6字节 ("s" "t" "o" "p" "\r" "\n")
  75. }getPalletResponse_failure; //共22字节
  76.  
Add Comment
Please, Sign In to add comment