kuavo-humanoid-sdk 1.2.1b3290__20250912184757-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 (186) 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 +16 -0
  9. kuavo_humanoid_sdk/kuavo/core/audio.py +32 -0
  10. kuavo_humanoid_sdk/kuavo/core/core.py +666 -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/llm_doubao.py +608 -0
  14. kuavo_humanoid_sdk/kuavo/core/microphone.py +192 -0
  15. kuavo_humanoid_sdk/kuavo/core/navigation.py +70 -0
  16. kuavo_humanoid_sdk/kuavo/core/ros/audio.py +110 -0
  17. kuavo_humanoid_sdk/kuavo/core/ros/camera.py +105 -0
  18. kuavo_humanoid_sdk/kuavo/core/ros/control.py +1524 -0
  19. kuavo_humanoid_sdk/kuavo/core/ros/microphone.py +38 -0
  20. kuavo_humanoid_sdk/kuavo/core/ros/navigation.py +217 -0
  21. kuavo_humanoid_sdk/kuavo/core/ros/observation.py +94 -0
  22. kuavo_humanoid_sdk/kuavo/core/ros/param.py +201 -0
  23. kuavo_humanoid_sdk/kuavo/core/ros/sat_utils.py +103 -0
  24. kuavo_humanoid_sdk/kuavo/core/ros/state.py +652 -0
  25. kuavo_humanoid_sdk/kuavo/core/ros/tools.py +220 -0
  26. kuavo_humanoid_sdk/kuavo/core/ros/vision.py +234 -0
  27. kuavo_humanoid_sdk/kuavo/core/ros_env.py +238 -0
  28. kuavo_humanoid_sdk/kuavo/core/sdk_deprecated.py +41 -0
  29. kuavo_humanoid_sdk/kuavo/demo_climbstair.py +249 -0
  30. kuavo_humanoid_sdk/kuavo/dexterous_hand.py +238 -0
  31. kuavo_humanoid_sdk/kuavo/leju_claw.py +235 -0
  32. kuavo_humanoid_sdk/kuavo/logger_client.py +80 -0
  33. kuavo_humanoid_sdk/kuavo/robot.py +561 -0
  34. kuavo_humanoid_sdk/kuavo/robot_arm.py +411 -0
  35. kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
  36. kuavo_humanoid_sdk/kuavo/robot_blockly.py +1154 -0
  37. kuavo_humanoid_sdk/kuavo/robot_climbstair.py +1607 -0
  38. kuavo_humanoid_sdk/kuavo/robot_head.py +95 -0
  39. kuavo_humanoid_sdk/kuavo/robot_info.py +134 -0
  40. kuavo_humanoid_sdk/kuavo/robot_microphone.py +19 -0
  41. kuavo_humanoid_sdk/kuavo/robot_navigation.py +135 -0
  42. kuavo_humanoid_sdk/kuavo/robot_observation.py +64 -0
  43. kuavo_humanoid_sdk/kuavo/robot_speech.py +24 -0
  44. kuavo_humanoid_sdk/kuavo/robot_state.py +310 -0
  45. kuavo_humanoid_sdk/kuavo/robot_tool.py +109 -0
  46. kuavo_humanoid_sdk/kuavo/robot_vision.py +81 -0
  47. kuavo_humanoid_sdk/kuavo_strategy/__init__.py +2 -0
  48. kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +1325 -0
  49. kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +106 -0
  50. kuavo_humanoid_sdk/kuavo_strategy_v2/common/data_type.py +340 -0
  51. kuavo_humanoid_sdk/kuavo_strategy_v2/common/events/base_event.py +215 -0
  52. kuavo_humanoid_sdk/kuavo_strategy_v2/common/robot_sdk.py +25 -0
  53. kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/case.py +331 -0
  54. kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/strategy.py +504 -0
  55. kuavo_humanoid_sdk/kuavo_strategy_v2/utils/logger_setup.py +40 -0
  56. kuavo_humanoid_sdk/kuavo_strategy_v2/utils/utils.py +88 -0
  57. kuavo_humanoid_sdk/msg/__init__.py +4 -0
  58. kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
  59. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetection.py +306 -0
  60. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetectionArray.py +437 -0
  61. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AudioReceiverData.py +122 -0
  62. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_FTsensorData.py +260 -0
  63. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_JoySticks.py +191 -0
  64. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  65. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_MmDetectionMsg.py +264 -0
  66. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
  67. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
  68. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TaskPoint.py +175 -0
  69. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +62 -0
  70. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armCollisionCheckInfo.py +160 -0
  71. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +161 -0
  72. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
  73. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  74. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +171 -0
  75. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
  76. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  77. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  78. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  79. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
  80. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6D.py +123 -0
  81. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6DTargetTrajectories.py +320 -0
  82. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
  83. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVision.py +136 -0
  84. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVisionArray.py +231 -0
  85. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
  86. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses6D.py +149 -0
  87. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
  88. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  89. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  90. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  91. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
  92. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  93. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
  94. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
  95. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  96. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
  97. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  98. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  99. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_kuavoModeSchedule.py +224 -0
  100. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  101. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  102. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
  103. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfo.py +143 -0
  104. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfoList.py +220 -0
  105. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
  106. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
  107. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
  108. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotBodyMatrices.py +332 -0
  109. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  110. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  111. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  112. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +655 -0
  113. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  114. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_tagDataArray.py +216 -0
  115. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  116. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +273 -0
  117. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +316 -0
  118. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
  119. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
  120. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  121. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  122. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_CreatePath.py +581 -0
  123. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
  124. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetAllMaps.py +241 -0
  125. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetCurrentMap.py +225 -0
  126. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetTargetPartPoseInCamera.py +298 -0
  127. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_InitialPoseWithTaskPoint.py +281 -0
  128. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_LoadMap.py +281 -0
  129. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_NavigateToTaskPoint.py +281 -0
  130. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
  131. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetInitialPose.py +394 -0
  132. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
  133. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode.py +468 -0
  134. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode_free.py +289 -0
  135. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
  136. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_TaskPointOperation.py +536 -0
  137. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +43 -0
  138. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_adjustZeroPoint.py +277 -0
  139. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  140. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
  141. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
  142. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  143. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  144. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  145. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +395 -0
  146. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPose6DTargetTrajectoriesSrv.py +426 -0
  147. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
  148. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  149. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  150. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  151. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  152. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
  153. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorZeroPoints.py +286 -0
  154. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  155. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  156. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +422 -0
  157. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
  158. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
  159. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  160. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
  161. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  162. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  163. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
  164. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
  165. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +664 -0
  166. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  167. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  168. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  169. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  170. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  171. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  172. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  173. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  174. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  175. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  176. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  177. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  178. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  179. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  180. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  181. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  182. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  183. kuavo_humanoid_sdk-1.2.1b3290.dist-info/METADATA +296 -0
  184. kuavo_humanoid_sdk-1.2.1b3290.dist-info/RECORD +186 -0
  185. kuavo_humanoid_sdk-1.2.1b3290.dist-info/WHEEL +6 -0
  186. kuavo_humanoid_sdk-1.2.1b3290.dist-info/top_level.txt +1 -0
@@ -0,0 +1,274 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/changeTorsoCtrlModeRequest.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 changeTorsoCtrlModeRequest(genpy.Message):
11
+ _md5sum = "1f5907fdb226711da233100c712cc0eb"
12
+ _type = "kuavo_msgs/changeTorsoCtrlModeRequest"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """int32 control_mode # 0: control 6dof, 1: control height+yaw+pitch, 2: control control height+pitch
15
+ """
16
+ __slots__ = ['control_mode']
17
+ _slot_types = ['int32']
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
+ control_mode
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(changeTorsoCtrlModeRequest, self).__init__(*args, **kwds)
35
+ # message fields cannot be None, assign default values for those that are
36
+ if self.control_mode is None:
37
+ self.control_mode = 0
38
+ else:
39
+ self.control_mode = 0
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.control_mode
54
+ buff.write(_get_struct_i().pack(_x))
55
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
56
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
57
+
58
+ def deserialize(self, str):
59
+ """
60
+ unpack serialized message in str into this message instance
61
+ :param str: byte array of serialized message, ``str``
62
+ """
63
+ if python3:
64
+ codecs.lookup_error("rosmsg").msg_type = self._type
65
+ try:
66
+ end = 0
67
+ start = end
68
+ end += 4
69
+ (self.control_mode,) = _get_struct_i().unpack(str[start:end])
70
+ return self
71
+ except struct.error as e:
72
+ raise genpy.DeserializationError(e) # most likely buffer underfill
73
+
74
+
75
+ def serialize_numpy(self, buff, numpy):
76
+ """
77
+ serialize message with numpy array types into buffer
78
+ :param buff: buffer, ``StringIO``
79
+ :param numpy: numpy python module
80
+ """
81
+ try:
82
+ _x = self.control_mode
83
+ buff.write(_get_struct_i().pack(_x))
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_numpy(self, str, numpy):
88
+ """
89
+ unpack serialized message in str into this message instance using numpy for array types
90
+ :param str: byte array of serialized message, ``str``
91
+ :param numpy: numpy python module
92
+ """
93
+ if python3:
94
+ codecs.lookup_error("rosmsg").msg_type = self._type
95
+ try:
96
+ end = 0
97
+ start = end
98
+ end += 4
99
+ (self.control_mode,) = _get_struct_i().unpack(str[start:end])
100
+ return self
101
+ except struct.error as e:
102
+ raise genpy.DeserializationError(e) # most likely buffer underfill
103
+
104
+ _struct_I = genpy.struct_I
105
+ def _get_struct_I():
106
+ global _struct_I
107
+ return _struct_I
108
+ _struct_i = None
109
+ def _get_struct_i():
110
+ global _struct_i
111
+ if _struct_i is None:
112
+ _struct_i = struct.Struct("<i")
113
+ return _struct_i
114
+ # This Python file uses the following encoding: utf-8
115
+ """autogenerated by genpy from kuavo_msgs/changeTorsoCtrlModeResponse.msg. Do not edit."""
116
+ import codecs
117
+ import sys
118
+ python3 = True if sys.hexversion > 0x03000000 else False
119
+ import genpy
120
+ import struct
121
+
122
+
123
+ class changeTorsoCtrlModeResponse(genpy.Message):
124
+ _md5sum = "2f115bf9b7d68ace12ac850b142c1536"
125
+ _type = "kuavo_msgs/changeTorsoCtrlModeResponse"
126
+ _has_header = False # flag to mark the presence of a Header object
127
+ _full_text = """bool result
128
+ int32 mode
129
+ string message
130
+
131
+ """
132
+ __slots__ = ['result','mode','message']
133
+ _slot_types = ['bool','int32','string']
134
+
135
+ def __init__(self, *args, **kwds):
136
+ """
137
+ Constructor. Any message fields that are implicitly/explicitly
138
+ set to None will be assigned a default value. The recommend
139
+ use is keyword arguments as this is more robust to future message
140
+ changes. You cannot mix in-order arguments and keyword arguments.
141
+
142
+ The available fields are:
143
+ result,mode,message
144
+
145
+ :param args: complete set of field values, in .msg order
146
+ :param kwds: use keyword arguments corresponding to message field names
147
+ to set specific fields.
148
+ """
149
+ if args or kwds:
150
+ super(changeTorsoCtrlModeResponse, self).__init__(*args, **kwds)
151
+ # message fields cannot be None, assign default values for those that are
152
+ if self.result is None:
153
+ self.result = False
154
+ if self.mode is None:
155
+ self.mode = 0
156
+ if self.message is None:
157
+ self.message = ''
158
+ else:
159
+ self.result = False
160
+ self.mode = 0
161
+ self.message = ''
162
+
163
+ def _get_types(self):
164
+ """
165
+ internal API method
166
+ """
167
+ return self._slot_types
168
+
169
+ def serialize(self, buff):
170
+ """
171
+ serialize message into buffer
172
+ :param buff: buffer, ``StringIO``
173
+ """
174
+ try:
175
+ _x = self
176
+ buff.write(_get_struct_Bi().pack(_x.result, _x.mode))
177
+ _x = self.message
178
+ length = len(_x)
179
+ if python3 or type(_x) == unicode:
180
+ _x = _x.encode('utf-8')
181
+ length = len(_x)
182
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
183
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
184
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
185
+
186
+ def deserialize(self, str):
187
+ """
188
+ unpack serialized message in str into this message instance
189
+ :param str: byte array of serialized message, ``str``
190
+ """
191
+ if python3:
192
+ codecs.lookup_error("rosmsg").msg_type = self._type
193
+ try:
194
+ end = 0
195
+ _x = self
196
+ start = end
197
+ end += 5
198
+ (_x.result, _x.mode,) = _get_struct_Bi().unpack(str[start:end])
199
+ self.result = bool(self.result)
200
+ start = end
201
+ end += 4
202
+ (length,) = _struct_I.unpack(str[start:end])
203
+ start = end
204
+ end += length
205
+ if python3:
206
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
207
+ else:
208
+ self.message = str[start:end]
209
+ return self
210
+ except struct.error as e:
211
+ raise genpy.DeserializationError(e) # most likely buffer underfill
212
+
213
+
214
+ def serialize_numpy(self, buff, numpy):
215
+ """
216
+ serialize message with numpy array types into buffer
217
+ :param buff: buffer, ``StringIO``
218
+ :param numpy: numpy python module
219
+ """
220
+ try:
221
+ _x = self
222
+ buff.write(_get_struct_Bi().pack(_x.result, _x.mode))
223
+ _x = self.message
224
+ length = len(_x)
225
+ if python3 or type(_x) == unicode:
226
+ _x = _x.encode('utf-8')
227
+ length = len(_x)
228
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
229
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
230
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
231
+
232
+ def deserialize_numpy(self, str, numpy):
233
+ """
234
+ unpack serialized message in str into this message instance using numpy for array types
235
+ :param str: byte array of serialized message, ``str``
236
+ :param numpy: numpy python module
237
+ """
238
+ if python3:
239
+ codecs.lookup_error("rosmsg").msg_type = self._type
240
+ try:
241
+ end = 0
242
+ _x = self
243
+ start = end
244
+ end += 5
245
+ (_x.result, _x.mode,) = _get_struct_Bi().unpack(str[start:end])
246
+ self.result = bool(self.result)
247
+ start = end
248
+ end += 4
249
+ (length,) = _struct_I.unpack(str[start:end])
250
+ start = end
251
+ end += length
252
+ if python3:
253
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
254
+ else:
255
+ self.message = str[start:end]
256
+ return self
257
+ except struct.error as e:
258
+ raise genpy.DeserializationError(e) # most likely buffer underfill
259
+
260
+ _struct_I = genpy.struct_I
261
+ def _get_struct_I():
262
+ global _struct_I
263
+ return _struct_I
264
+ _struct_Bi = None
265
+ def _get_struct_Bi():
266
+ global _struct_Bi
267
+ if _struct_Bi is None:
268
+ _struct_Bi = struct.Struct("<Bi")
269
+ return _struct_Bi
270
+ class changeTorsoCtrlMode(object):
271
+ _type = 'kuavo_msgs/changeTorsoCtrlMode'
272
+ _md5sum = '8a8d154c05ee16e8f5d2b72d9bb51026'
273
+ _request_class = changeTorsoCtrlModeRequest
274
+ _response_class = changeTorsoCtrlModeResponse
@@ -0,0 +1,408 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/controlLejuClawRequest.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
+ import kuavo_msgs.msg
10
+
11
+ class controlLejuClawRequest(genpy.Message):
12
+ _md5sum = "4255ea8183b49bda4b8fed5d1dd8d5b9"
13
+ _type = "kuavo_msgs/controlLejuClawRequest"
14
+ _has_header = False # flag to mark the presence of a Header object
15
+ _full_text = """
16
+ # kuavo_msgs/endEffectorData:
17
+ # string[] name
18
+ # float64[] position
19
+ # float64[] velocity
20
+ # float64[] effort
21
+ #
22
+ # ** For the Service Notes **
23
+ #
24
+ # name : 'left_claw' , 'right_claw'
25
+ # position : 0 ~ 100, the percentage of the claw's opening angle
26
+ # 0: closed, 100: open
27
+ # velocity : 0 ~ 100, if size is 0, will use default `50.0`.
28
+ # effort : torque/current, better 1A ~ 2A, if size is 0, will use default `1.0`.
29
+ #
30
+ # ** Example **
31
+ # Request:
32
+ # data:
33
+ # - name: ['left_claw', 'right_claw']
34
+ # position: [20.0, 20.0]
35
+ # velocity: [50.0, 50.0]
36
+ # effort: [1.0, 1.0]
37
+ #
38
+ # Response:
39
+ # success: True/False, call service success or not.
40
+ # message: 'success'
41
+ kuavo_msgs/endEffectorData data
42
+
43
+ ================================================================================
44
+ MSG: kuavo_msgs/endEffectorData
45
+ string[] name
46
+ float64[] position
47
+ float64[] velocity
48
+ float64[] effort
49
+ """
50
+ __slots__ = ['data']
51
+ _slot_types = ['kuavo_msgs/endEffectorData']
52
+
53
+ def __init__(self, *args, **kwds):
54
+ """
55
+ Constructor. Any message fields that are implicitly/explicitly
56
+ set to None will be assigned a default value. The recommend
57
+ use is keyword arguments as this is more robust to future message
58
+ changes. You cannot mix in-order arguments and keyword arguments.
59
+
60
+ The available fields are:
61
+ data
62
+
63
+ :param args: complete set of field values, in .msg order
64
+ :param kwds: use keyword arguments corresponding to message field names
65
+ to set specific fields.
66
+ """
67
+ if args or kwds:
68
+ super(controlLejuClawRequest, self).__init__(*args, **kwds)
69
+ # message fields cannot be None, assign default values for those that are
70
+ if self.data is None:
71
+ self.data = kuavo_msgs.msg.endEffectorData()
72
+ else:
73
+ self.data = kuavo_msgs.msg.endEffectorData()
74
+
75
+ def _get_types(self):
76
+ """
77
+ internal API method
78
+ """
79
+ return self._slot_types
80
+
81
+ def serialize(self, buff):
82
+ """
83
+ serialize message into buffer
84
+ :param buff: buffer, ``StringIO``
85
+ """
86
+ try:
87
+ length = len(self.data.name)
88
+ buff.write(_struct_I.pack(length))
89
+ for val1 in self.data.name:
90
+ length = len(val1)
91
+ if python3 or type(val1) == unicode:
92
+ val1 = val1.encode('utf-8')
93
+ length = len(val1)
94
+ buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
95
+ length = len(self.data.position)
96
+ buff.write(_struct_I.pack(length))
97
+ pattern = '<%sd'%length
98
+ buff.write(struct.Struct(pattern).pack(*self.data.position))
99
+ length = len(self.data.velocity)
100
+ buff.write(_struct_I.pack(length))
101
+ pattern = '<%sd'%length
102
+ buff.write(struct.Struct(pattern).pack(*self.data.velocity))
103
+ length = len(self.data.effort)
104
+ buff.write(_struct_I.pack(length))
105
+ pattern = '<%sd'%length
106
+ buff.write(struct.Struct(pattern).pack(*self.data.effort))
107
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
108
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
109
+
110
+ def deserialize(self, str):
111
+ """
112
+ unpack serialized message in str into this message instance
113
+ :param str: byte array of serialized message, ``str``
114
+ """
115
+ if python3:
116
+ codecs.lookup_error("rosmsg").msg_type = self._type
117
+ try:
118
+ if self.data is None:
119
+ self.data = kuavo_msgs.msg.endEffectorData()
120
+ end = 0
121
+ start = end
122
+ end += 4
123
+ (length,) = _struct_I.unpack(str[start:end])
124
+ self.data.name = []
125
+ for i in range(0, length):
126
+ start = end
127
+ end += 4
128
+ (length,) = _struct_I.unpack(str[start:end])
129
+ start = end
130
+ end += length
131
+ if python3:
132
+ val1 = str[start:end].decode('utf-8', 'rosmsg')
133
+ else:
134
+ val1 = str[start:end]
135
+ self.data.name.append(val1)
136
+ start = end
137
+ end += 4
138
+ (length,) = _struct_I.unpack(str[start:end])
139
+ pattern = '<%sd'%length
140
+ start = end
141
+ s = struct.Struct(pattern)
142
+ end += s.size
143
+ self.data.position = s.unpack(str[start:end])
144
+ start = end
145
+ end += 4
146
+ (length,) = _struct_I.unpack(str[start:end])
147
+ pattern = '<%sd'%length
148
+ start = end
149
+ s = struct.Struct(pattern)
150
+ end += s.size
151
+ self.data.velocity = s.unpack(str[start:end])
152
+ start = end
153
+ end += 4
154
+ (length,) = _struct_I.unpack(str[start:end])
155
+ pattern = '<%sd'%length
156
+ start = end
157
+ s = struct.Struct(pattern)
158
+ end += s.size
159
+ self.data.effort = s.unpack(str[start:end])
160
+ return self
161
+ except struct.error as e:
162
+ raise genpy.DeserializationError(e) # most likely buffer underfill
163
+
164
+
165
+ def serialize_numpy(self, buff, numpy):
166
+ """
167
+ serialize message with numpy array types into buffer
168
+ :param buff: buffer, ``StringIO``
169
+ :param numpy: numpy python module
170
+ """
171
+ try:
172
+ length = len(self.data.name)
173
+ buff.write(_struct_I.pack(length))
174
+ for val1 in self.data.name:
175
+ length = len(val1)
176
+ if python3 or type(val1) == unicode:
177
+ val1 = val1.encode('utf-8')
178
+ length = len(val1)
179
+ buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
180
+ length = len(self.data.position)
181
+ buff.write(_struct_I.pack(length))
182
+ pattern = '<%sd'%length
183
+ buff.write(self.data.position.tostring())
184
+ length = len(self.data.velocity)
185
+ buff.write(_struct_I.pack(length))
186
+ pattern = '<%sd'%length
187
+ buff.write(self.data.velocity.tostring())
188
+ length = len(self.data.effort)
189
+ buff.write(_struct_I.pack(length))
190
+ pattern = '<%sd'%length
191
+ buff.write(self.data.effort.tostring())
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_numpy(self, str, numpy):
196
+ """
197
+ unpack serialized message in str into this message instance using numpy for array types
198
+ :param str: byte array of serialized message, ``str``
199
+ :param numpy: numpy python module
200
+ """
201
+ if python3:
202
+ codecs.lookup_error("rosmsg").msg_type = self._type
203
+ try:
204
+ if self.data is None:
205
+ self.data = kuavo_msgs.msg.endEffectorData()
206
+ end = 0
207
+ start = end
208
+ end += 4
209
+ (length,) = _struct_I.unpack(str[start:end])
210
+ self.data.name = []
211
+ for i in range(0, length):
212
+ start = end
213
+ end += 4
214
+ (length,) = _struct_I.unpack(str[start:end])
215
+ start = end
216
+ end += length
217
+ if python3:
218
+ val1 = str[start:end].decode('utf-8', 'rosmsg')
219
+ else:
220
+ val1 = str[start:end]
221
+ self.data.name.append(val1)
222
+ start = end
223
+ end += 4
224
+ (length,) = _struct_I.unpack(str[start:end])
225
+ pattern = '<%sd'%length
226
+ start = end
227
+ s = struct.Struct(pattern)
228
+ end += s.size
229
+ self.data.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
230
+ start = end
231
+ end += 4
232
+ (length,) = _struct_I.unpack(str[start:end])
233
+ pattern = '<%sd'%length
234
+ start = end
235
+ s = struct.Struct(pattern)
236
+ end += s.size
237
+ self.data.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
238
+ start = end
239
+ end += 4
240
+ (length,) = _struct_I.unpack(str[start:end])
241
+ pattern = '<%sd'%length
242
+ start = end
243
+ s = struct.Struct(pattern)
244
+ end += s.size
245
+ self.data.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
246
+ return self
247
+ except struct.error as e:
248
+ raise genpy.DeserializationError(e) # most likely buffer underfill
249
+
250
+ _struct_I = genpy.struct_I
251
+ def _get_struct_I():
252
+ global _struct_I
253
+ return _struct_I
254
+ # This Python file uses the following encoding: utf-8
255
+ """autogenerated by genpy from kuavo_msgs/controlLejuClawResponse.msg. Do not edit."""
256
+ import codecs
257
+ import sys
258
+ python3 = True if sys.hexversion > 0x03000000 else False
259
+ import genpy
260
+ import struct
261
+
262
+
263
+ class controlLejuClawResponse(genpy.Message):
264
+ _md5sum = "937c9679a518e3a18d831e57125ea522"
265
+ _type = "kuavo_msgs/controlLejuClawResponse"
266
+ _has_header = False # flag to mark the presence of a Header object
267
+ _full_text = """bool success
268
+ string message
269
+
270
+ """
271
+ __slots__ = ['success','message']
272
+ _slot_types = ['bool','string']
273
+
274
+ def __init__(self, *args, **kwds):
275
+ """
276
+ Constructor. Any message fields that are implicitly/explicitly
277
+ set to None will be assigned a default value. The recommend
278
+ use is keyword arguments as this is more robust to future message
279
+ changes. You cannot mix in-order arguments and keyword arguments.
280
+
281
+ The available fields are:
282
+ success,message
283
+
284
+ :param args: complete set of field values, in .msg order
285
+ :param kwds: use keyword arguments corresponding to message field names
286
+ to set specific fields.
287
+ """
288
+ if args or kwds:
289
+ super(controlLejuClawResponse, self).__init__(*args, **kwds)
290
+ # message fields cannot be None, assign default values for those that are
291
+ if self.success is None:
292
+ self.success = False
293
+ if self.message is None:
294
+ self.message = ''
295
+ else:
296
+ self.success = False
297
+ self.message = ''
298
+
299
+ def _get_types(self):
300
+ """
301
+ internal API method
302
+ """
303
+ return self._slot_types
304
+
305
+ def serialize(self, buff):
306
+ """
307
+ serialize message into buffer
308
+ :param buff: buffer, ``StringIO``
309
+ """
310
+ try:
311
+ _x = self.success
312
+ buff.write(_get_struct_B().pack(_x))
313
+ _x = self.message
314
+ length = len(_x)
315
+ if python3 or type(_x) == unicode:
316
+ _x = _x.encode('utf-8')
317
+ length = len(_x)
318
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
319
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
320
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
321
+
322
+ def deserialize(self, str):
323
+ """
324
+ unpack serialized message in str into this message instance
325
+ :param str: byte array of serialized message, ``str``
326
+ """
327
+ if python3:
328
+ codecs.lookup_error("rosmsg").msg_type = self._type
329
+ try:
330
+ end = 0
331
+ start = end
332
+ end += 1
333
+ (self.success,) = _get_struct_B().unpack(str[start:end])
334
+ self.success = bool(self.success)
335
+ start = end
336
+ end += 4
337
+ (length,) = _struct_I.unpack(str[start:end])
338
+ start = end
339
+ end += length
340
+ if python3:
341
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
342
+ else:
343
+ self.message = str[start:end]
344
+ return self
345
+ except struct.error as e:
346
+ raise genpy.DeserializationError(e) # most likely buffer underfill
347
+
348
+
349
+ def serialize_numpy(self, buff, numpy):
350
+ """
351
+ serialize message with numpy array types into buffer
352
+ :param buff: buffer, ``StringIO``
353
+ :param numpy: numpy python module
354
+ """
355
+ try:
356
+ _x = self.success
357
+ buff.write(_get_struct_B().pack(_x))
358
+ _x = self.message
359
+ length = len(_x)
360
+ if python3 or type(_x) == unicode:
361
+ _x = _x.encode('utf-8')
362
+ length = len(_x)
363
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
364
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
365
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
366
+
367
+ def deserialize_numpy(self, str, numpy):
368
+ """
369
+ unpack serialized message in str into this message instance using numpy for array types
370
+ :param str: byte array of serialized message, ``str``
371
+ :param numpy: numpy python module
372
+ """
373
+ if python3:
374
+ codecs.lookup_error("rosmsg").msg_type = self._type
375
+ try:
376
+ end = 0
377
+ start = end
378
+ end += 1
379
+ (self.success,) = _get_struct_B().unpack(str[start:end])
380
+ self.success = bool(self.success)
381
+ start = end
382
+ end += 4
383
+ (length,) = _struct_I.unpack(str[start:end])
384
+ start = end
385
+ end += length
386
+ if python3:
387
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
388
+ else:
389
+ self.message = str[start:end]
390
+ return self
391
+ except struct.error as e:
392
+ raise genpy.DeserializationError(e) # most likely buffer underfill
393
+
394
+ _struct_I = genpy.struct_I
395
+ def _get_struct_I():
396
+ global _struct_I
397
+ return _struct_I
398
+ _struct_B = None
399
+ def _get_struct_B():
400
+ global _struct_B
401
+ if _struct_B is None:
402
+ _struct_B = struct.Struct("<B")
403
+ return _struct_B
404
+ class controlLejuClaw(object):
405
+ _type = 'kuavo_msgs/controlLejuClaw'
406
+ _md5sum = '674277f611b34c602b5afcc4b45849d1'
407
+ _request_class = controlLejuClawRequest
408
+ _response_class = controlLejuClawResponse