kuavo-humanoid-sdk 1.2.1b1625__20250804112347-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 (156) 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/_JoySticks.py +191 -0
  48. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  49. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_MmDetectionMsg.py +264 -0
  50. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
  51. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
  52. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +58 -0
  53. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armCollisionCheckInfo.py +160 -0
  54. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +160 -0
  55. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
  56. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  57. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +151 -0
  58. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
  59. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  60. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  61. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  62. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
  63. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6D.py +123 -0
  64. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6DTargetTrajectories.py +301 -0
  65. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
  66. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVision.py +136 -0
  67. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVisionArray.py +231 -0
  68. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
  69. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses6D.py +149 -0
  70. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
  71. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  72. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  73. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  74. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
  75. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  76. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
  77. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
  78. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  79. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
  80. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  81. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  82. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  83. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  84. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
  85. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfo.py +143 -0
  86. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfoList.py +220 -0
  87. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
  88. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
  89. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
  90. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotBodyMatrices.py +332 -0
  91. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  92. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  93. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  94. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +495 -0
  95. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  96. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_tagDataArray.py +216 -0
  97. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  98. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +272 -0
  99. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +315 -0
  100. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
  101. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
  102. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  103. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  104. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
  105. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetTargetPartPoseInCamera.py +298 -0
  106. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
  107. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
  108. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
  109. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +31 -0
  110. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  111. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
  112. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
  113. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  114. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  115. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  116. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +394 -0
  117. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPose6DTargetTrajectoriesSrv.py +410 -0
  118. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
  119. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  120. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  121. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  122. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  123. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
  124. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  125. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  126. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +421 -0
  127. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
  128. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
  129. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  130. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
  131. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  132. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  133. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
  134. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
  135. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +662 -0
  136. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  137. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  138. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  139. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  140. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  141. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  142. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  143. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  144. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  145. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  146. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  147. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  148. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  149. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  150. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  151. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  152. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  153. kuavo_humanoid_sdk-1.2.1b1625.dist-info/METADATA +291 -0
  154. kuavo_humanoid_sdk-1.2.1b1625.dist-info/RECORD +156 -0
  155. kuavo_humanoid_sdk-1.2.1b1625.dist-info/WHEEL +6 -0
  156. kuavo_humanoid_sdk-1.2.1b1625.dist-info/top_level.txt +1 -0
@@ -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
@@ -0,0 +1,304 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/enableHandTouchSensorRequest.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 enableHandTouchSensorRequest(genpy.Message):
11
+ _md5sum = "0543438552cc194d7406fa44a80edec7"
12
+ _type = "kuavo_msgs/enableHandTouchSensorRequest"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """# Bit masks for enabling individual touch sensors on the robotic hand
15
+ # Each sensor can be enabled by setting the corresponding bit in the mask
16
+
17
+ # Examples: 0b00000011 enables thumb and index sensors, 0b00000000 disables all sensors
18
+ # ```
19
+ # mask_value = THUMB_SENSOR | INDEX_SENSOR
20
+ # req = enableHandTouchSensorRequest()
21
+ # req.mask = mask_value
22
+ # ```
23
+
24
+ # Thumb finger touch sensor (bit 0)
25
+ uint8 THUMB_SENSOR = 1
26
+
27
+ # Index finger touch sensor (bit 1)
28
+ uint8 INDEX_SENSOR = 2
29
+
30
+ # Middle finger touch sensor (bit 2)
31
+ uint8 MIDDLE_SENSOR = 4
32
+
33
+ # Ring finger touch sensor (bit 3)
34
+ uint8 RING_SENSOR = 8
35
+
36
+ # Pinky finger touch sensor (bit 4)
37
+ uint8 PINKY_SENSOR = 16
38
+
39
+ # Bitmask indicating which sensors to enable
40
+ # Multiple sensors can be enabled by combining masks with bitwise OR
41
+ uint8 mask
42
+ """
43
+ # Pseudo-constants
44
+ THUMB_SENSOR = 1
45
+ INDEX_SENSOR = 2
46
+ MIDDLE_SENSOR = 4
47
+ RING_SENSOR = 8
48
+ PINKY_SENSOR = 16
49
+
50
+ __slots__ = ['mask']
51
+ _slot_types = ['uint8']
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
+ mask
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(enableHandTouchSensorRequest, self).__init__(*args, **kwds)
69
+ # message fields cannot be None, assign default values for those that are
70
+ if self.mask is None:
71
+ self.mask = 0
72
+ else:
73
+ self.mask = 0
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
+ _x = self.mask
88
+ buff.write(_get_struct_B().pack(_x))
89
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
90
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
91
+
92
+ def deserialize(self, str):
93
+ """
94
+ unpack serialized message in str into this message instance
95
+ :param str: byte array of serialized message, ``str``
96
+ """
97
+ if python3:
98
+ codecs.lookup_error("rosmsg").msg_type = self._type
99
+ try:
100
+ end = 0
101
+ start = end
102
+ end += 1
103
+ (self.mask,) = _get_struct_B().unpack(str[start:end])
104
+ return self
105
+ except struct.error as e:
106
+ raise genpy.DeserializationError(e) # most likely buffer underfill
107
+
108
+
109
+ def serialize_numpy(self, buff, numpy):
110
+ """
111
+ serialize message with numpy array types into buffer
112
+ :param buff: buffer, ``StringIO``
113
+ :param numpy: numpy python module
114
+ """
115
+ try:
116
+ _x = self.mask
117
+ buff.write(_get_struct_B().pack(_x))
118
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
119
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
120
+
121
+ def deserialize_numpy(self, str, numpy):
122
+ """
123
+ unpack serialized message in str into this message instance using numpy for array types
124
+ :param str: byte array of serialized message, ``str``
125
+ :param numpy: numpy python module
126
+ """
127
+ if python3:
128
+ codecs.lookup_error("rosmsg").msg_type = self._type
129
+ try:
130
+ end = 0
131
+ start = end
132
+ end += 1
133
+ (self.mask,) = _get_struct_B().unpack(str[start:end])
134
+ return self
135
+ except struct.error as e:
136
+ raise genpy.DeserializationError(e) # most likely buffer underfill
137
+
138
+ _struct_I = genpy.struct_I
139
+ def _get_struct_I():
140
+ global _struct_I
141
+ return _struct_I
142
+ _struct_B = None
143
+ def _get_struct_B():
144
+ global _struct_B
145
+ if _struct_B is None:
146
+ _struct_B = struct.Struct("<B")
147
+ return _struct_B
148
+ # This Python file uses the following encoding: utf-8
149
+ """autogenerated by genpy from kuavo_msgs/enableHandTouchSensorResponse.msg. Do not edit."""
150
+ import codecs
151
+ import sys
152
+ python3 = True if sys.hexversion > 0x03000000 else False
153
+ import genpy
154
+ import struct
155
+
156
+
157
+ class enableHandTouchSensorResponse(genpy.Message):
158
+ _md5sum = "937c9679a518e3a18d831e57125ea522"
159
+ _type = "kuavo_msgs/enableHandTouchSensorResponse"
160
+ _has_header = False # flag to mark the presence of a Header object
161
+ _full_text = """# Whether the operation was successful
162
+ bool success
163
+
164
+ # Additional status or error message
165
+ string message
166
+ """
167
+ __slots__ = ['success','message']
168
+ _slot_types = ['bool','string']
169
+
170
+ def __init__(self, *args, **kwds):
171
+ """
172
+ Constructor. Any message fields that are implicitly/explicitly
173
+ set to None will be assigned a default value. The recommend
174
+ use is keyword arguments as this is more robust to future message
175
+ changes. You cannot mix in-order arguments and keyword arguments.
176
+
177
+ The available fields are:
178
+ success,message
179
+
180
+ :param args: complete set of field values, in .msg order
181
+ :param kwds: use keyword arguments corresponding to message field names
182
+ to set specific fields.
183
+ """
184
+ if args or kwds:
185
+ super(enableHandTouchSensorResponse, self).__init__(*args, **kwds)
186
+ # message fields cannot be None, assign default values for those that are
187
+ if self.success is None:
188
+ self.success = False
189
+ if self.message is None:
190
+ self.message = ''
191
+ else:
192
+ self.success = False
193
+ self.message = ''
194
+
195
+ def _get_types(self):
196
+ """
197
+ internal API method
198
+ """
199
+ return self._slot_types
200
+
201
+ def serialize(self, buff):
202
+ """
203
+ serialize message into buffer
204
+ :param buff: buffer, ``StringIO``
205
+ """
206
+ try:
207
+ _x = self.success
208
+ buff.write(_get_struct_B().pack(_x))
209
+ _x = self.message
210
+ length = len(_x)
211
+ if python3 or type(_x) == unicode:
212
+ _x = _x.encode('utf-8')
213
+ length = len(_x)
214
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
215
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
216
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
217
+
218
+ def deserialize(self, str):
219
+ """
220
+ unpack serialized message in str into this message instance
221
+ :param str: byte array of serialized message, ``str``
222
+ """
223
+ if python3:
224
+ codecs.lookup_error("rosmsg").msg_type = self._type
225
+ try:
226
+ end = 0
227
+ start = end
228
+ end += 1
229
+ (self.success,) = _get_struct_B().unpack(str[start:end])
230
+ self.success = bool(self.success)
231
+ start = end
232
+ end += 4
233
+ (length,) = _struct_I.unpack(str[start:end])
234
+ start = end
235
+ end += length
236
+ if python3:
237
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
238
+ else:
239
+ self.message = str[start:end]
240
+ return self
241
+ except struct.error as e:
242
+ raise genpy.DeserializationError(e) # most likely buffer underfill
243
+
244
+
245
+ def serialize_numpy(self, buff, numpy):
246
+ """
247
+ serialize message with numpy array types into buffer
248
+ :param buff: buffer, ``StringIO``
249
+ :param numpy: numpy python module
250
+ """
251
+ try:
252
+ _x = self.success
253
+ buff.write(_get_struct_B().pack(_x))
254
+ _x = self.message
255
+ length = len(_x)
256
+ if python3 or type(_x) == unicode:
257
+ _x = _x.encode('utf-8')
258
+ length = len(_x)
259
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
260
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
261
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
262
+
263
+ def deserialize_numpy(self, str, numpy):
264
+ """
265
+ unpack serialized message in str into this message instance using numpy for array types
266
+ :param str: byte array of serialized message, ``str``
267
+ :param numpy: numpy python module
268
+ """
269
+ if python3:
270
+ codecs.lookup_error("rosmsg").msg_type = self._type
271
+ try:
272
+ end = 0
273
+ start = end
274
+ end += 1
275
+ (self.success,) = _get_struct_B().unpack(str[start:end])
276
+ self.success = bool(self.success)
277
+ start = end
278
+ end += 4
279
+ (length,) = _struct_I.unpack(str[start:end])
280
+ start = end
281
+ end += length
282
+ if python3:
283
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
284
+ else:
285
+ self.message = str[start:end]
286
+ return self
287
+ except struct.error as e:
288
+ raise genpy.DeserializationError(e) # most likely buffer underfill
289
+
290
+ _struct_I = genpy.struct_I
291
+ def _get_struct_I():
292
+ global _struct_I
293
+ return _struct_I
294
+ _struct_B = None
295
+ def _get_struct_B():
296
+ global _struct_B
297
+ if _struct_B is None:
298
+ _struct_B = struct.Struct("<B")
299
+ return _struct_B
300
+ class enableHandTouchSensor(object):
301
+ _type = 'kuavo_msgs/enableHandTouchSensor'
302
+ _md5sum = '710f3d70d245856e41b01f7ffef21580'
303
+ _request_class = enableHandTouchSensorRequest
304
+ _response_class = enableHandTouchSensorResponse