kuavo-humanoid-sdk 1.2.1b1675__20250812203328-py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of kuavo-humanoid-sdk might be problematic. Click here for more details.

Files changed (158) hide show
  1. kuavo_humanoid_sdk/__init__.py +6 -0
  2. kuavo_humanoid_sdk/common/logger.py +45 -0
  3. kuavo_humanoid_sdk/interfaces/__init__.py +4 -0
  4. kuavo_humanoid_sdk/interfaces/data_types.py +288 -0
  5. kuavo_humanoid_sdk/interfaces/end_effector.py +62 -0
  6. kuavo_humanoid_sdk/interfaces/robot.py +22 -0
  7. kuavo_humanoid_sdk/interfaces/robot_info.py +56 -0
  8. kuavo_humanoid_sdk/kuavo/__init__.py +11 -0
  9. kuavo_humanoid_sdk/kuavo/core/audio.py +32 -0
  10. kuavo_humanoid_sdk/kuavo/core/core.py +634 -0
  11. kuavo_humanoid_sdk/kuavo/core/dex_hand_control.py +114 -0
  12. kuavo_humanoid_sdk/kuavo/core/leju_claw_control.py +67 -0
  13. kuavo_humanoid_sdk/kuavo/core/ros/audio.py +92 -0
  14. kuavo_humanoid_sdk/kuavo/core/ros/control.py +1453 -0
  15. kuavo_humanoid_sdk/kuavo/core/ros/observation.py +94 -0
  16. kuavo_humanoid_sdk/kuavo/core/ros/param.py +183 -0
  17. kuavo_humanoid_sdk/kuavo/core/ros/sat_utils.py +103 -0
  18. kuavo_humanoid_sdk/kuavo/core/ros/state.py +634 -0
  19. kuavo_humanoid_sdk/kuavo/core/ros/tools.py +220 -0
  20. kuavo_humanoid_sdk/kuavo/core/ros/vision.py +234 -0
  21. kuavo_humanoid_sdk/kuavo/core/ros_env.py +238 -0
  22. kuavo_humanoid_sdk/kuavo/dexterous_hand.py +201 -0
  23. kuavo_humanoid_sdk/kuavo/leju_claw.py +235 -0
  24. kuavo_humanoid_sdk/kuavo/robot.py +514 -0
  25. kuavo_humanoid_sdk/kuavo/robot_arm.py +248 -0
  26. kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
  27. kuavo_humanoid_sdk/kuavo/robot_head.py +50 -0
  28. kuavo_humanoid_sdk/kuavo/robot_info.py +113 -0
  29. kuavo_humanoid_sdk/kuavo/robot_observation.py +64 -0
  30. kuavo_humanoid_sdk/kuavo/robot_state.py +307 -0
  31. kuavo_humanoid_sdk/kuavo/robot_tool.py +109 -0
  32. kuavo_humanoid_sdk/kuavo/robot_vision.py +81 -0
  33. kuavo_humanoid_sdk/kuavo_strategy/__init__.py +2 -0
  34. kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +1325 -0
  35. kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +106 -0
  36. kuavo_humanoid_sdk/kuavo_strategy_v2/common/data_type.py +340 -0
  37. kuavo_humanoid_sdk/kuavo_strategy_v2/common/events/base_event.py +215 -0
  38. kuavo_humanoid_sdk/kuavo_strategy_v2/common/robot_sdk.py +25 -0
  39. kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/case.py +331 -0
  40. kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/strategy.py +504 -0
  41. kuavo_humanoid_sdk/kuavo_strategy_v2/utils/logger_setup.py +40 -0
  42. kuavo_humanoid_sdk/kuavo_strategy_v2/utils/utils.py +88 -0
  43. kuavo_humanoid_sdk/msg/__init__.py +4 -0
  44. kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
  45. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetection.py +306 -0
  46. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetectionArray.py +437 -0
  47. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AudioReceiverData.py +122 -0
  48. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_JoySticks.py +191 -0
  49. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  50. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_MmDetectionMsg.py +264 -0
  51. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
  52. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
  53. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +59 -0
  54. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armCollisionCheckInfo.py +160 -0
  55. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +160 -0
  56. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
  57. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  58. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +151 -0
  59. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
  60. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  61. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  62. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  63. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
  64. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6D.py +123 -0
  65. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6DTargetTrajectories.py +301 -0
  66. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
  67. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVision.py +136 -0
  68. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVisionArray.py +231 -0
  69. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
  70. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses6D.py +149 -0
  71. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
  72. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  73. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  74. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  75. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
  76. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  77. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
  78. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
  79. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  80. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
  81. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  82. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  83. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  84. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  85. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
  86. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfo.py +143 -0
  87. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfoList.py +220 -0
  88. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
  89. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
  90. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
  91. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotBodyMatrices.py +332 -0
  92. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  93. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  94. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  95. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +495 -0
  96. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  97. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_tagDataArray.py +216 -0
  98. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  99. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +272 -0
  100. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +315 -0
  101. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
  102. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
  103. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  104. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  105. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
  106. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetTargetPartPoseInCamera.py +298 -0
  107. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
  108. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
  109. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode.py +468 -0
  110. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
  111. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +32 -0
  112. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  113. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
  114. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
  115. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  116. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  117. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  118. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +394 -0
  119. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPose6DTargetTrajectoriesSrv.py +410 -0
  120. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
  121. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  122. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  123. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  124. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  125. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
  126. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  127. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  128. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +421 -0
  129. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
  130. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
  131. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  132. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
  133. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  134. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  135. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
  136. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
  137. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +662 -0
  138. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  139. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  140. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  141. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  142. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  143. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  144. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  145. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  146. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  147. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  148. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  149. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  150. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  151. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  152. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  153. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  154. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  155. kuavo_humanoid_sdk-1.2.1b1675.dist-info/METADATA +291 -0
  156. kuavo_humanoid_sdk-1.2.1b1675.dist-info/RECORD +158 -0
  157. kuavo_humanoid_sdk-1.2.1b1675.dist-info/WHEEL +6 -0
  158. kuavo_humanoid_sdk-1.2.1b1675.dist-info/top_level.txt +1 -0
@@ -0,0 +1,168 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/yoloOutputData.msg. Do not edit."""
3
+ import codecs
4
+ import sys
5
+ python3 = True if sys.hexversion > 0x03000000 else False
6
+ import genpy
7
+ import struct
8
+
9
+
10
+ class yoloOutputData(genpy.Message):
11
+ _md5sum = "137434f9d0388d58c5d9dc2d88f9e8f1"
12
+ _type = "kuavo_msgs/yoloOutputData"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """string class_name
15
+ int32 class_id
16
+ float32 confidence
17
+ float32 x_pos
18
+ float32 y_pos
19
+ float32 height
20
+ float32 width"""
21
+ __slots__ = ['class_name','class_id','confidence','x_pos','y_pos','height','width']
22
+ _slot_types = ['string','int32','float32','float32','float32','float32','float32']
23
+
24
+ def __init__(self, *args, **kwds):
25
+ """
26
+ Constructor. Any message fields that are implicitly/explicitly
27
+ set to None will be assigned a default value. The recommend
28
+ use is keyword arguments as this is more robust to future message
29
+ changes. You cannot mix in-order arguments and keyword arguments.
30
+
31
+ The available fields are:
32
+ class_name,class_id,confidence,x_pos,y_pos,height,width
33
+
34
+ :param args: complete set of field values, in .msg order
35
+ :param kwds: use keyword arguments corresponding to message field names
36
+ to set specific fields.
37
+ """
38
+ if args or kwds:
39
+ super(yoloOutputData, self).__init__(*args, **kwds)
40
+ # message fields cannot be None, assign default values for those that are
41
+ if self.class_name is None:
42
+ self.class_name = ''
43
+ if self.class_id is None:
44
+ self.class_id = 0
45
+ if self.confidence is None:
46
+ self.confidence = 0.
47
+ if self.x_pos is None:
48
+ self.x_pos = 0.
49
+ if self.y_pos is None:
50
+ self.y_pos = 0.
51
+ if self.height is None:
52
+ self.height = 0.
53
+ if self.width is None:
54
+ self.width = 0.
55
+ else:
56
+ self.class_name = ''
57
+ self.class_id = 0
58
+ self.confidence = 0.
59
+ self.x_pos = 0.
60
+ self.y_pos = 0.
61
+ self.height = 0.
62
+ self.width = 0.
63
+
64
+ def _get_types(self):
65
+ """
66
+ internal API method
67
+ """
68
+ return self._slot_types
69
+
70
+ def serialize(self, buff):
71
+ """
72
+ serialize message into buffer
73
+ :param buff: buffer, ``StringIO``
74
+ """
75
+ try:
76
+ _x = self.class_name
77
+ length = len(_x)
78
+ if python3 or type(_x) == unicode:
79
+ _x = _x.encode('utf-8')
80
+ length = len(_x)
81
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
82
+ _x = self
83
+ buff.write(_get_struct_i5f().pack(_x.class_id, _x.confidence, _x.x_pos, _x.y_pos, _x.height, _x.width))
84
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
85
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
86
+
87
+ def deserialize(self, str):
88
+ """
89
+ unpack serialized message in str into this message instance
90
+ :param str: byte array of serialized message, ``str``
91
+ """
92
+ if python3:
93
+ codecs.lookup_error("rosmsg").msg_type = self._type
94
+ try:
95
+ end = 0
96
+ start = end
97
+ end += 4
98
+ (length,) = _struct_I.unpack(str[start:end])
99
+ start = end
100
+ end += length
101
+ if python3:
102
+ self.class_name = str[start:end].decode('utf-8', 'rosmsg')
103
+ else:
104
+ self.class_name = str[start:end]
105
+ _x = self
106
+ start = end
107
+ end += 24
108
+ (_x.class_id, _x.confidence, _x.x_pos, _x.y_pos, _x.height, _x.width,) = _get_struct_i5f().unpack(str[start:end])
109
+ return self
110
+ except struct.error as e:
111
+ raise genpy.DeserializationError(e) # most likely buffer underfill
112
+
113
+
114
+ def serialize_numpy(self, buff, numpy):
115
+ """
116
+ serialize message with numpy array types into buffer
117
+ :param buff: buffer, ``StringIO``
118
+ :param numpy: numpy python module
119
+ """
120
+ try:
121
+ _x = self.class_name
122
+ length = len(_x)
123
+ if python3 or type(_x) == unicode:
124
+ _x = _x.encode('utf-8')
125
+ length = len(_x)
126
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
127
+ _x = self
128
+ buff.write(_get_struct_i5f().pack(_x.class_id, _x.confidence, _x.x_pos, _x.y_pos, _x.height, _x.width))
129
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
130
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
131
+
132
+ def deserialize_numpy(self, str, numpy):
133
+ """
134
+ unpack serialized message in str into this message instance using numpy for array types
135
+ :param str: byte array of serialized message, ``str``
136
+ :param numpy: numpy python module
137
+ """
138
+ if python3:
139
+ codecs.lookup_error("rosmsg").msg_type = self._type
140
+ try:
141
+ end = 0
142
+ start = end
143
+ end += 4
144
+ (length,) = _struct_I.unpack(str[start:end])
145
+ start = end
146
+ end += length
147
+ if python3:
148
+ self.class_name = str[start:end].decode('utf-8', 'rosmsg')
149
+ else:
150
+ self.class_name = str[start:end]
151
+ _x = self
152
+ start = end
153
+ end += 24
154
+ (_x.class_id, _x.confidence, _x.x_pos, _x.y_pos, _x.height, _x.width,) = _get_struct_i5f().unpack(str[start:end])
155
+ return self
156
+ except struct.error as e:
157
+ raise genpy.DeserializationError(e) # most likely buffer underfill
158
+
159
+ _struct_I = genpy.struct_I
160
+ def _get_struct_I():
161
+ global _struct_I
162
+ return _struct_I
163
+ _struct_i5f = None
164
+ def _get_struct_i5f():
165
+ global _struct_i5f
166
+ if _struct_i5f is None:
167
+ _struct_i5f = struct.Struct("<i5f")
168
+ return _struct_i5f
@@ -0,0 +1,281 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/ExecuteArmActionRequest.msg. Do not edit."""
3
+ import codecs
4
+ import sys
5
+ python3 = True if sys.hexversion > 0x03000000 else False
6
+ import genpy
7
+ import struct
8
+
9
+
10
+ class ExecuteArmActionRequest(genpy.Message):
11
+ _md5sum = "e4d9ec8eb1541d8a917c71ed6f9b1654"
12
+ _type = "kuavo_msgs/ExecuteArmActionRequest"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """string action_name # 要执行的动作名称,例如 "welcome"
15
+ """
16
+ __slots__ = ['action_name']
17
+ _slot_types = ['string']
18
+
19
+ def __init__(self, *args, **kwds):
20
+ """
21
+ Constructor. Any message fields that are implicitly/explicitly
22
+ set to None will be assigned a default value. The recommend
23
+ use is keyword arguments as this is more robust to future message
24
+ changes. You cannot mix in-order arguments and keyword arguments.
25
+
26
+ The available fields are:
27
+ action_name
28
+
29
+ :param args: complete set of field values, in .msg order
30
+ :param kwds: use keyword arguments corresponding to message field names
31
+ to set specific fields.
32
+ """
33
+ if args or kwds:
34
+ super(ExecuteArmActionRequest, self).__init__(*args, **kwds)
35
+ # message fields cannot be None, assign default values for those that are
36
+ if self.action_name is None:
37
+ self.action_name = ''
38
+ else:
39
+ self.action_name = ''
40
+
41
+ def _get_types(self):
42
+ """
43
+ internal API method
44
+ """
45
+ return self._slot_types
46
+
47
+ def serialize(self, buff):
48
+ """
49
+ serialize message into buffer
50
+ :param buff: buffer, ``StringIO``
51
+ """
52
+ try:
53
+ _x = self.action_name
54
+ length = len(_x)
55
+ if python3 or type(_x) == unicode:
56
+ _x = _x.encode('utf-8')
57
+ length = len(_x)
58
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
59
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
60
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
61
+
62
+ def deserialize(self, str):
63
+ """
64
+ unpack serialized message in str into this message instance
65
+ :param str: byte array of serialized message, ``str``
66
+ """
67
+ if python3:
68
+ codecs.lookup_error("rosmsg").msg_type = self._type
69
+ try:
70
+ end = 0
71
+ start = end
72
+ end += 4
73
+ (length,) = _struct_I.unpack(str[start:end])
74
+ start = end
75
+ end += length
76
+ if python3:
77
+ self.action_name = str[start:end].decode('utf-8', 'rosmsg')
78
+ else:
79
+ self.action_name = str[start:end]
80
+ return self
81
+ except struct.error as e:
82
+ raise genpy.DeserializationError(e) # most likely buffer underfill
83
+
84
+
85
+ def serialize_numpy(self, buff, numpy):
86
+ """
87
+ serialize message with numpy array types into buffer
88
+ :param buff: buffer, ``StringIO``
89
+ :param numpy: numpy python module
90
+ """
91
+ try:
92
+ _x = self.action_name
93
+ length = len(_x)
94
+ if python3 or type(_x) == unicode:
95
+ _x = _x.encode('utf-8')
96
+ length = len(_x)
97
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
98
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
99
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
100
+
101
+ def deserialize_numpy(self, str, numpy):
102
+ """
103
+ unpack serialized message in str into this message instance using numpy for array types
104
+ :param str: byte array of serialized message, ``str``
105
+ :param numpy: numpy python module
106
+ """
107
+ if python3:
108
+ codecs.lookup_error("rosmsg").msg_type = self._type
109
+ try:
110
+ end = 0
111
+ start = end
112
+ end += 4
113
+ (length,) = _struct_I.unpack(str[start:end])
114
+ start = end
115
+ end += length
116
+ if python3:
117
+ self.action_name = str[start:end].decode('utf-8', 'rosmsg')
118
+ else:
119
+ self.action_name = str[start:end]
120
+ return self
121
+ except struct.error as e:
122
+ raise genpy.DeserializationError(e) # most likely buffer underfill
123
+
124
+ _struct_I = genpy.struct_I
125
+ def _get_struct_I():
126
+ global _struct_I
127
+ return _struct_I
128
+ # This Python file uses the following encoding: utf-8
129
+ """autogenerated by genpy from kuavo_msgs/ExecuteArmActionResponse.msg. Do not edit."""
130
+ import codecs
131
+ import sys
132
+ python3 = True if sys.hexversion > 0x03000000 else False
133
+ import genpy
134
+ import struct
135
+
136
+
137
+ class ExecuteArmActionResponse(genpy.Message):
138
+ _md5sum = "937c9679a518e3a18d831e57125ea522"
139
+ _type = "kuavo_msgs/ExecuteArmActionResponse"
140
+ _has_header = False # flag to mark the presence of a Header object
141
+ _full_text = """bool success # 执行是否成功
142
+ string message # 返回的消息
143
+ """
144
+ __slots__ = ['success','message']
145
+ _slot_types = ['bool','string']
146
+
147
+ def __init__(self, *args, **kwds):
148
+ """
149
+ Constructor. Any message fields that are implicitly/explicitly
150
+ set to None will be assigned a default value. The recommend
151
+ use is keyword arguments as this is more robust to future message
152
+ changes. You cannot mix in-order arguments and keyword arguments.
153
+
154
+ The available fields are:
155
+ success,message
156
+
157
+ :param args: complete set of field values, in .msg order
158
+ :param kwds: use keyword arguments corresponding to message field names
159
+ to set specific fields.
160
+ """
161
+ if args or kwds:
162
+ super(ExecuteArmActionResponse, self).__init__(*args, **kwds)
163
+ # message fields cannot be None, assign default values for those that are
164
+ if self.success is None:
165
+ self.success = False
166
+ if self.message is None:
167
+ self.message = ''
168
+ else:
169
+ self.success = False
170
+ self.message = ''
171
+
172
+ def _get_types(self):
173
+ """
174
+ internal API method
175
+ """
176
+ return self._slot_types
177
+
178
+ def serialize(self, buff):
179
+ """
180
+ serialize message into buffer
181
+ :param buff: buffer, ``StringIO``
182
+ """
183
+ try:
184
+ _x = self.success
185
+ buff.write(_get_struct_B().pack(_x))
186
+ _x = self.message
187
+ length = len(_x)
188
+ if python3 or type(_x) == unicode:
189
+ _x = _x.encode('utf-8')
190
+ length = len(_x)
191
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
192
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
193
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
194
+
195
+ def deserialize(self, str):
196
+ """
197
+ unpack serialized message in str into this message instance
198
+ :param str: byte array of serialized message, ``str``
199
+ """
200
+ if python3:
201
+ codecs.lookup_error("rosmsg").msg_type = self._type
202
+ try:
203
+ end = 0
204
+ start = end
205
+ end += 1
206
+ (self.success,) = _get_struct_B().unpack(str[start:end])
207
+ self.success = bool(self.success)
208
+ start = end
209
+ end += 4
210
+ (length,) = _struct_I.unpack(str[start:end])
211
+ start = end
212
+ end += length
213
+ if python3:
214
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
215
+ else:
216
+ self.message = str[start:end]
217
+ return self
218
+ except struct.error as e:
219
+ raise genpy.DeserializationError(e) # most likely buffer underfill
220
+
221
+
222
+ def serialize_numpy(self, buff, numpy):
223
+ """
224
+ serialize message with numpy array types into buffer
225
+ :param buff: buffer, ``StringIO``
226
+ :param numpy: numpy python module
227
+ """
228
+ try:
229
+ _x = self.success
230
+ buff.write(_get_struct_B().pack(_x))
231
+ _x = self.message
232
+ length = len(_x)
233
+ if python3 or type(_x) == unicode:
234
+ _x = _x.encode('utf-8')
235
+ length = len(_x)
236
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
237
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
238
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
239
+
240
+ def deserialize_numpy(self, str, numpy):
241
+ """
242
+ unpack serialized message in str into this message instance using numpy for array types
243
+ :param str: byte array of serialized message, ``str``
244
+ :param numpy: numpy python module
245
+ """
246
+ if python3:
247
+ codecs.lookup_error("rosmsg").msg_type = self._type
248
+ try:
249
+ end = 0
250
+ start = end
251
+ end += 1
252
+ (self.success,) = _get_struct_B().unpack(str[start:end])
253
+ self.success = bool(self.success)
254
+ start = end
255
+ end += 4
256
+ (length,) = _struct_I.unpack(str[start:end])
257
+ start = end
258
+ end += length
259
+ if python3:
260
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
261
+ else:
262
+ self.message = str[start:end]
263
+ return self
264
+ except struct.error as e:
265
+ raise genpy.DeserializationError(e) # most likely buffer underfill
266
+
267
+ _struct_I = genpy.struct_I
268
+ def _get_struct_I():
269
+ global _struct_I
270
+ return _struct_I
271
+ _struct_B = None
272
+ def _get_struct_B():
273
+ global _struct_B
274
+ if _struct_B is None:
275
+ _struct_B = struct.Struct("<B")
276
+ return _struct_B
277
+ class ExecuteArmAction(object):
278
+ _type = 'kuavo_msgs/ExecuteArmAction'
279
+ _md5sum = 'a29ecc17b1498502f1af3d6bb5a90a24'
280
+ _request_class = ExecuteArmActionRequest
281
+ _response_class = ExecuteArmActionResponse