kuavo-humanoid-sdk 1.1.2a921__py3-none-any.whl → 1.1.2a922__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 (82) hide show
  1. kuavo_humanoid_sdk/msg/__init__.py +4 -0
  2. kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
  3. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  4. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +26 -0
  5. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  6. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +151 -0
  7. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  8. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  9. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  10. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +122 -0
  11. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +203 -0
  12. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  13. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  14. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  15. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  16. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  17. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  18. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  19. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  20. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  21. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_questJoySticks.py +191 -0
  22. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  23. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  24. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  25. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +495 -0
  26. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  27. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  28. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  29. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  30. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +15 -0
  31. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  32. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  33. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  34. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  35. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +321 -0
  36. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  37. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  38. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  39. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  40. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  41. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  42. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  43. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  44. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  45. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +356 -0
  46. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  47. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/__init__.py +9 -0
  48. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_armHandPose.py +160 -0
  49. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_handPose.py +136 -0
  50. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_headBodyPose.py +145 -0
  51. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_ikSolveError.py +171 -0
  52. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_ikSolveParam.py +140 -0
  53. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_robotArmQVVD.py +177 -0
  54. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_robotHandPosition.py +225 -0
  55. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_twoArmHandPose.py +272 -0
  56. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_twoArmHandPoseCmd.py +311 -0
  57. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/__init__.py +4 -0
  58. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_changeArmCtrlMode.py +275 -0
  59. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_changeArmCtrlModeKuavo.py +236 -0
  60. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_fkSrv.py +394 -0
  61. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_twoArmHandPoseCmdSrv.py +661 -0
  62. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  63. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  64. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  65. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  66. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  67. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  68. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  69. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  70. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  71. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  72. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  73. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  74. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  75. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  76. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  77. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  78. {kuavo_humanoid_sdk-1.1.2a921.dist-info → kuavo_humanoid_sdk-1.1.2a922.dist-info}/METADATA +1 -1
  79. kuavo_humanoid_sdk-1.1.2a922.dist-info/RECORD +104 -0
  80. kuavo_humanoid_sdk-1.1.2a921.dist-info/RECORD +0 -27
  81. {kuavo_humanoid_sdk-1.1.2a921.dist-info → kuavo_humanoid_sdk-1.1.2a922.dist-info}/WHEEL +0 -0
  82. {kuavo_humanoid_sdk-1.1.2a921.dist-info → kuavo_humanoid_sdk-1.1.2a922.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,321 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/footPoseTargetTrajectoriesSrvRequest.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 footPoseTargetTrajectoriesSrvRequest(genpy.Message):
12
+ _md5sum = "17f130f2bf33453ad92f340f67992d0e"
13
+ _type = "kuavo_msgs/footPoseTargetTrajectoriesSrvRequest"
14
+ _has_header = False # flag to mark the presence of a Header object
15
+ _full_text = """footPoseTargetTrajectories foot_pose_target_trajectories
16
+
17
+ ================================================================================
18
+ MSG: kuavo_msgs/footPoseTargetTrajectories
19
+ float64[] timeTrajectory
20
+ int32[] footIndexTrajectory
21
+ footPose[] footPoseTrajectory
22
+ ================================================================================
23
+ MSG: kuavo_msgs/footPose
24
+ float64[4] footPose # x, y, z, yaw
25
+ float64[4] torsoPose # x, y, z, yaw"""
26
+ __slots__ = ['foot_pose_target_trajectories']
27
+ _slot_types = ['kuavo_msgs/footPoseTargetTrajectories']
28
+
29
+ def __init__(self, *args, **kwds):
30
+ """
31
+ Constructor. Any message fields that are implicitly/explicitly
32
+ set to None will be assigned a default value. The recommend
33
+ use is keyword arguments as this is more robust to future message
34
+ changes. You cannot mix in-order arguments and keyword arguments.
35
+
36
+ The available fields are:
37
+ foot_pose_target_trajectories
38
+
39
+ :param args: complete set of field values, in .msg order
40
+ :param kwds: use keyword arguments corresponding to message field names
41
+ to set specific fields.
42
+ """
43
+ if args or kwds:
44
+ super(footPoseTargetTrajectoriesSrvRequest, self).__init__(*args, **kwds)
45
+ # message fields cannot be None, assign default values for those that are
46
+ if self.foot_pose_target_trajectories is None:
47
+ self.foot_pose_target_trajectories = kuavo_msgs.msg.footPoseTargetTrajectories()
48
+ else:
49
+ self.foot_pose_target_trajectories = kuavo_msgs.msg.footPoseTargetTrajectories()
50
+
51
+ def _get_types(self):
52
+ """
53
+ internal API method
54
+ """
55
+ return self._slot_types
56
+
57
+ def serialize(self, buff):
58
+ """
59
+ serialize message into buffer
60
+ :param buff: buffer, ``StringIO``
61
+ """
62
+ try:
63
+ length = len(self.foot_pose_target_trajectories.timeTrajectory)
64
+ buff.write(_struct_I.pack(length))
65
+ pattern = '<%sd'%length
66
+ buff.write(struct.Struct(pattern).pack(*self.foot_pose_target_trajectories.timeTrajectory))
67
+ length = len(self.foot_pose_target_trajectories.footIndexTrajectory)
68
+ buff.write(_struct_I.pack(length))
69
+ pattern = '<%si'%length
70
+ buff.write(struct.Struct(pattern).pack(*self.foot_pose_target_trajectories.footIndexTrajectory))
71
+ length = len(self.foot_pose_target_trajectories.footPoseTrajectory)
72
+ buff.write(_struct_I.pack(length))
73
+ for val1 in self.foot_pose_target_trajectories.footPoseTrajectory:
74
+ buff.write(_get_struct_4d().pack(*val1.footPose))
75
+ buff.write(_get_struct_4d().pack(*val1.torsoPose))
76
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
77
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
78
+
79
+ def deserialize(self, str):
80
+ """
81
+ unpack serialized message in str into this message instance
82
+ :param str: byte array of serialized message, ``str``
83
+ """
84
+ if python3:
85
+ codecs.lookup_error("rosmsg").msg_type = self._type
86
+ try:
87
+ if self.foot_pose_target_trajectories is None:
88
+ self.foot_pose_target_trajectories = kuavo_msgs.msg.footPoseTargetTrajectories()
89
+ end = 0
90
+ start = end
91
+ end += 4
92
+ (length,) = _struct_I.unpack(str[start:end])
93
+ pattern = '<%sd'%length
94
+ start = end
95
+ s = struct.Struct(pattern)
96
+ end += s.size
97
+ self.foot_pose_target_trajectories.timeTrajectory = s.unpack(str[start:end])
98
+ start = end
99
+ end += 4
100
+ (length,) = _struct_I.unpack(str[start:end])
101
+ pattern = '<%si'%length
102
+ start = end
103
+ s = struct.Struct(pattern)
104
+ end += s.size
105
+ self.foot_pose_target_trajectories.footIndexTrajectory = s.unpack(str[start:end])
106
+ start = end
107
+ end += 4
108
+ (length,) = _struct_I.unpack(str[start:end])
109
+ self.foot_pose_target_trajectories.footPoseTrajectory = []
110
+ for i in range(0, length):
111
+ val1 = kuavo_msgs.msg.footPose()
112
+ start = end
113
+ end += 32
114
+ val1.footPose = _get_struct_4d().unpack(str[start:end])
115
+ start = end
116
+ end += 32
117
+ val1.torsoPose = _get_struct_4d().unpack(str[start:end])
118
+ self.foot_pose_target_trajectories.footPoseTrajectory.append(val1)
119
+ return self
120
+ except struct.error as e:
121
+ raise genpy.DeserializationError(e) # most likely buffer underfill
122
+
123
+
124
+ def serialize_numpy(self, buff, numpy):
125
+ """
126
+ serialize message with numpy array types into buffer
127
+ :param buff: buffer, ``StringIO``
128
+ :param numpy: numpy python module
129
+ """
130
+ try:
131
+ length = len(self.foot_pose_target_trajectories.timeTrajectory)
132
+ buff.write(_struct_I.pack(length))
133
+ pattern = '<%sd'%length
134
+ buff.write(self.foot_pose_target_trajectories.timeTrajectory.tostring())
135
+ length = len(self.foot_pose_target_trajectories.footIndexTrajectory)
136
+ buff.write(_struct_I.pack(length))
137
+ pattern = '<%si'%length
138
+ buff.write(self.foot_pose_target_trajectories.footIndexTrajectory.tostring())
139
+ length = len(self.foot_pose_target_trajectories.footPoseTrajectory)
140
+ buff.write(_struct_I.pack(length))
141
+ for val1 in self.foot_pose_target_trajectories.footPoseTrajectory:
142
+ buff.write(val1.footPose.tostring())
143
+ buff.write(val1.torsoPose.tostring())
144
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
145
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
146
+
147
+ def deserialize_numpy(self, str, numpy):
148
+ """
149
+ unpack serialized message in str into this message instance using numpy for array types
150
+ :param str: byte array of serialized message, ``str``
151
+ :param numpy: numpy python module
152
+ """
153
+ if python3:
154
+ codecs.lookup_error("rosmsg").msg_type = self._type
155
+ try:
156
+ if self.foot_pose_target_trajectories is None:
157
+ self.foot_pose_target_trajectories = kuavo_msgs.msg.footPoseTargetTrajectories()
158
+ end = 0
159
+ start = end
160
+ end += 4
161
+ (length,) = _struct_I.unpack(str[start:end])
162
+ pattern = '<%sd'%length
163
+ start = end
164
+ s = struct.Struct(pattern)
165
+ end += s.size
166
+ self.foot_pose_target_trajectories.timeTrajectory = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
167
+ start = end
168
+ end += 4
169
+ (length,) = _struct_I.unpack(str[start:end])
170
+ pattern = '<%si'%length
171
+ start = end
172
+ s = struct.Struct(pattern)
173
+ end += s.size
174
+ self.foot_pose_target_trajectories.footIndexTrajectory = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
175
+ start = end
176
+ end += 4
177
+ (length,) = _struct_I.unpack(str[start:end])
178
+ self.foot_pose_target_trajectories.footPoseTrajectory = []
179
+ for i in range(0, length):
180
+ val1 = kuavo_msgs.msg.footPose()
181
+ start = end
182
+ end += 32
183
+ val1.footPose = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
184
+ start = end
185
+ end += 32
186
+ val1.torsoPose = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
187
+ self.foot_pose_target_trajectories.footPoseTrajectory.append(val1)
188
+ return self
189
+ except struct.error as e:
190
+ raise genpy.DeserializationError(e) # most likely buffer underfill
191
+
192
+ _struct_I = genpy.struct_I
193
+ def _get_struct_I():
194
+ global _struct_I
195
+ return _struct_I
196
+ _struct_4d = None
197
+ def _get_struct_4d():
198
+ global _struct_4d
199
+ if _struct_4d is None:
200
+ _struct_4d = struct.Struct("<4d")
201
+ return _struct_4d
202
+ # This Python file uses the following encoding: utf-8
203
+ """autogenerated by genpy from kuavo_msgs/footPoseTargetTrajectoriesSrvResponse.msg. Do not edit."""
204
+ import codecs
205
+ import sys
206
+ python3 = True if sys.hexversion > 0x03000000 else False
207
+ import genpy
208
+ import struct
209
+
210
+
211
+ class footPoseTargetTrajectoriesSrvResponse(genpy.Message):
212
+ _md5sum = "358e233cde0c8a8bcfea4ce193f8fc15"
213
+ _type = "kuavo_msgs/footPoseTargetTrajectoriesSrvResponse"
214
+ _has_header = False # flag to mark the presence of a Header object
215
+ _full_text = """bool success
216
+ """
217
+ __slots__ = ['success']
218
+ _slot_types = ['bool']
219
+
220
+ def __init__(self, *args, **kwds):
221
+ """
222
+ Constructor. Any message fields that are implicitly/explicitly
223
+ set to None will be assigned a default value. The recommend
224
+ use is keyword arguments as this is more robust to future message
225
+ changes. You cannot mix in-order arguments and keyword arguments.
226
+
227
+ The available fields are:
228
+ success
229
+
230
+ :param args: complete set of field values, in .msg order
231
+ :param kwds: use keyword arguments corresponding to message field names
232
+ to set specific fields.
233
+ """
234
+ if args or kwds:
235
+ super(footPoseTargetTrajectoriesSrvResponse, self).__init__(*args, **kwds)
236
+ # message fields cannot be None, assign default values for those that are
237
+ if self.success is None:
238
+ self.success = False
239
+ else:
240
+ self.success = False
241
+
242
+ def _get_types(self):
243
+ """
244
+ internal API method
245
+ """
246
+ return self._slot_types
247
+
248
+ def serialize(self, buff):
249
+ """
250
+ serialize message into buffer
251
+ :param buff: buffer, ``StringIO``
252
+ """
253
+ try:
254
+ _x = self.success
255
+ buff.write(_get_struct_B().pack(_x))
256
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
257
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
258
+
259
+ def deserialize(self, str):
260
+ """
261
+ unpack serialized message in str into this message instance
262
+ :param str: byte array of serialized message, ``str``
263
+ """
264
+ if python3:
265
+ codecs.lookup_error("rosmsg").msg_type = self._type
266
+ try:
267
+ end = 0
268
+ start = end
269
+ end += 1
270
+ (self.success,) = _get_struct_B().unpack(str[start:end])
271
+ self.success = bool(self.success)
272
+ return self
273
+ except struct.error as e:
274
+ raise genpy.DeserializationError(e) # most likely buffer underfill
275
+
276
+
277
+ def serialize_numpy(self, buff, numpy):
278
+ """
279
+ serialize message with numpy array types into buffer
280
+ :param buff: buffer, ``StringIO``
281
+ :param numpy: numpy python module
282
+ """
283
+ try:
284
+ _x = self.success
285
+ buff.write(_get_struct_B().pack(_x))
286
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
287
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
288
+
289
+ def deserialize_numpy(self, str, numpy):
290
+ """
291
+ unpack serialized message in str into this message instance using numpy for array types
292
+ :param str: byte array of serialized message, ``str``
293
+ :param numpy: numpy python module
294
+ """
295
+ if python3:
296
+ codecs.lookup_error("rosmsg").msg_type = self._type
297
+ try:
298
+ end = 0
299
+ start = end
300
+ end += 1
301
+ (self.success,) = _get_struct_B().unpack(str[start:end])
302
+ self.success = bool(self.success)
303
+ return self
304
+ except struct.error as e:
305
+ raise genpy.DeserializationError(e) # most likely buffer underfill
306
+
307
+ _struct_I = genpy.struct_I
308
+ def _get_struct_I():
309
+ global _struct_I
310
+ return _struct_I
311
+ _struct_B = None
312
+ def _get_struct_B():
313
+ global _struct_B
314
+ if _struct_B is None:
315
+ _struct_B = struct.Struct("<B")
316
+ return _struct_B
317
+ class footPoseTargetTrajectoriesSrv(object):
318
+ _type = 'kuavo_msgs/footPoseTargetTrajectoriesSrv'
319
+ _md5sum = 'bc0c14793d24668f68a3b8473f6545ec'
320
+ _request_class = footPoseTargetTrajectoriesSrvRequest
321
+ _response_class = footPoseTargetTrajectoriesSrvResponse
@@ -0,0 +1,339 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/gestureExecuteRequest.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 gestureExecuteRequest(genpy.Message):
12
+ _md5sum = "686baa778a78aa01b0a6cc9824ebcd9f"
13
+ _type = "kuavo_msgs/gestureExecuteRequest"
14
+ _has_header = False # flag to mark the presence of a Header object
15
+ _full_text = """# This service executes a specified gesture.
16
+ # It is used to trigger a gesture by providing its name and the side of the hand(s) to use.
17
+ #
18
+ # Request:
19
+ # kuavo_msgs/gestureTask[] gestures # An array of gestures to execute, each with a name and hand side
20
+ #
21
+ # Response:
22
+ # bool success # Indicates whether the gesture execution was successful.
23
+ # string message # A message providing additional information (e.g., error details if the gesture failed).
24
+
25
+ kuavo_msgs/gestureTask[] gestures
26
+
27
+ ================================================================================
28
+ MSG: kuavo_msgs/gestureTask
29
+ # This message is used to specify a gesture to execute.
30
+ # The gesture is triggered by providing its name and the side of the hand(s) to use.
31
+
32
+ string gesture_name # Name of the gesture to execute
33
+ int8 hand_side # Side of the hand to use (e.g., 0 for left, 1 for right, 2 for both)"""
34
+ __slots__ = ['gestures']
35
+ _slot_types = ['kuavo_msgs/gestureTask[]']
36
+
37
+ def __init__(self, *args, **kwds):
38
+ """
39
+ Constructor. Any message fields that are implicitly/explicitly
40
+ set to None will be assigned a default value. The recommend
41
+ use is keyword arguments as this is more robust to future message
42
+ changes. You cannot mix in-order arguments and keyword arguments.
43
+
44
+ The available fields are:
45
+ gestures
46
+
47
+ :param args: complete set of field values, in .msg order
48
+ :param kwds: use keyword arguments corresponding to message field names
49
+ to set specific fields.
50
+ """
51
+ if args or kwds:
52
+ super(gestureExecuteRequest, self).__init__(*args, **kwds)
53
+ # message fields cannot be None, assign default values for those that are
54
+ if self.gestures is None:
55
+ self.gestures = []
56
+ else:
57
+ self.gestures = []
58
+
59
+ def _get_types(self):
60
+ """
61
+ internal API method
62
+ """
63
+ return self._slot_types
64
+
65
+ def serialize(self, buff):
66
+ """
67
+ serialize message into buffer
68
+ :param buff: buffer, ``StringIO``
69
+ """
70
+ try:
71
+ length = len(self.gestures)
72
+ buff.write(_struct_I.pack(length))
73
+ for val1 in self.gestures:
74
+ _x = val1.gesture_name
75
+ length = len(_x)
76
+ if python3 or type(_x) == unicode:
77
+ _x = _x.encode('utf-8')
78
+ length = len(_x)
79
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
80
+ _x = val1.hand_side
81
+ buff.write(_get_struct_b().pack(_x))
82
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
83
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
84
+
85
+ def deserialize(self, str):
86
+ """
87
+ unpack serialized message in str into this message instance
88
+ :param str: byte array of serialized message, ``str``
89
+ """
90
+ if python3:
91
+ codecs.lookup_error("rosmsg").msg_type = self._type
92
+ try:
93
+ if self.gestures is None:
94
+ self.gestures = None
95
+ end = 0
96
+ start = end
97
+ end += 4
98
+ (length,) = _struct_I.unpack(str[start:end])
99
+ self.gestures = []
100
+ for i in range(0, length):
101
+ val1 = kuavo_msgs.msg.gestureTask()
102
+ start = end
103
+ end += 4
104
+ (length,) = _struct_I.unpack(str[start:end])
105
+ start = end
106
+ end += length
107
+ if python3:
108
+ val1.gesture_name = str[start:end].decode('utf-8', 'rosmsg')
109
+ else:
110
+ val1.gesture_name = str[start:end]
111
+ start = end
112
+ end += 1
113
+ (val1.hand_side,) = _get_struct_b().unpack(str[start:end])
114
+ self.gestures.append(val1)
115
+ return self
116
+ except struct.error as e:
117
+ raise genpy.DeserializationError(e) # most likely buffer underfill
118
+
119
+
120
+ def serialize_numpy(self, buff, numpy):
121
+ """
122
+ serialize message with numpy array types into buffer
123
+ :param buff: buffer, ``StringIO``
124
+ :param numpy: numpy python module
125
+ """
126
+ try:
127
+ length = len(self.gestures)
128
+ buff.write(_struct_I.pack(length))
129
+ for val1 in self.gestures:
130
+ _x = val1.gesture_name
131
+ length = len(_x)
132
+ if python3 or type(_x) == unicode:
133
+ _x = _x.encode('utf-8')
134
+ length = len(_x)
135
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
136
+ _x = val1.hand_side
137
+ buff.write(_get_struct_b().pack(_x))
138
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
139
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
140
+
141
+ def deserialize_numpy(self, str, numpy):
142
+ """
143
+ unpack serialized message in str into this message instance using numpy for array types
144
+ :param str: byte array of serialized message, ``str``
145
+ :param numpy: numpy python module
146
+ """
147
+ if python3:
148
+ codecs.lookup_error("rosmsg").msg_type = self._type
149
+ try:
150
+ if self.gestures is None:
151
+ self.gestures = None
152
+ end = 0
153
+ start = end
154
+ end += 4
155
+ (length,) = _struct_I.unpack(str[start:end])
156
+ self.gestures = []
157
+ for i in range(0, length):
158
+ val1 = kuavo_msgs.msg.gestureTask()
159
+ start = end
160
+ end += 4
161
+ (length,) = _struct_I.unpack(str[start:end])
162
+ start = end
163
+ end += length
164
+ if python3:
165
+ val1.gesture_name = str[start:end].decode('utf-8', 'rosmsg')
166
+ else:
167
+ val1.gesture_name = str[start:end]
168
+ start = end
169
+ end += 1
170
+ (val1.hand_side,) = _get_struct_b().unpack(str[start:end])
171
+ self.gestures.append(val1)
172
+ return self
173
+ except struct.error as e:
174
+ raise genpy.DeserializationError(e) # most likely buffer underfill
175
+
176
+ _struct_I = genpy.struct_I
177
+ def _get_struct_I():
178
+ global _struct_I
179
+ return _struct_I
180
+ _struct_b = None
181
+ def _get_struct_b():
182
+ global _struct_b
183
+ if _struct_b is None:
184
+ _struct_b = struct.Struct("<b")
185
+ return _struct_b
186
+ # This Python file uses the following encoding: utf-8
187
+ """autogenerated by genpy from kuavo_msgs/gestureExecuteResponse.msg. Do not edit."""
188
+ import codecs
189
+ import sys
190
+ python3 = True if sys.hexversion > 0x03000000 else False
191
+ import genpy
192
+ import struct
193
+
194
+
195
+ class gestureExecuteResponse(genpy.Message):
196
+ _md5sum = "937c9679a518e3a18d831e57125ea522"
197
+ _type = "kuavo_msgs/gestureExecuteResponse"
198
+ _has_header = False # flag to mark the presence of a Header object
199
+ _full_text = """bool success
200
+ string message
201
+ """
202
+ __slots__ = ['success','message']
203
+ _slot_types = ['bool','string']
204
+
205
+ def __init__(self, *args, **kwds):
206
+ """
207
+ Constructor. Any message fields that are implicitly/explicitly
208
+ set to None will be assigned a default value. The recommend
209
+ use is keyword arguments as this is more robust to future message
210
+ changes. You cannot mix in-order arguments and keyword arguments.
211
+
212
+ The available fields are:
213
+ success,message
214
+
215
+ :param args: complete set of field values, in .msg order
216
+ :param kwds: use keyword arguments corresponding to message field names
217
+ to set specific fields.
218
+ """
219
+ if args or kwds:
220
+ super(gestureExecuteResponse, self).__init__(*args, **kwds)
221
+ # message fields cannot be None, assign default values for those that are
222
+ if self.success is None:
223
+ self.success = False
224
+ if self.message is None:
225
+ self.message = ''
226
+ else:
227
+ self.success = False
228
+ self.message = ''
229
+
230
+ def _get_types(self):
231
+ """
232
+ internal API method
233
+ """
234
+ return self._slot_types
235
+
236
+ def serialize(self, buff):
237
+ """
238
+ serialize message into buffer
239
+ :param buff: buffer, ``StringIO``
240
+ """
241
+ try:
242
+ _x = self.success
243
+ buff.write(_get_struct_B().pack(_x))
244
+ _x = self.message
245
+ length = len(_x)
246
+ if python3 or type(_x) == unicode:
247
+ _x = _x.encode('utf-8')
248
+ length = len(_x)
249
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
250
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
251
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
252
+
253
+ def deserialize(self, str):
254
+ """
255
+ unpack serialized message in str into this message instance
256
+ :param str: byte array of serialized message, ``str``
257
+ """
258
+ if python3:
259
+ codecs.lookup_error("rosmsg").msg_type = self._type
260
+ try:
261
+ end = 0
262
+ start = end
263
+ end += 1
264
+ (self.success,) = _get_struct_B().unpack(str[start:end])
265
+ self.success = bool(self.success)
266
+ start = end
267
+ end += 4
268
+ (length,) = _struct_I.unpack(str[start:end])
269
+ start = end
270
+ end += length
271
+ if python3:
272
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
273
+ else:
274
+ self.message = str[start:end]
275
+ return self
276
+ except struct.error as e:
277
+ raise genpy.DeserializationError(e) # most likely buffer underfill
278
+
279
+
280
+ def serialize_numpy(self, buff, numpy):
281
+ """
282
+ serialize message with numpy array types into buffer
283
+ :param buff: buffer, ``StringIO``
284
+ :param numpy: numpy python module
285
+ """
286
+ try:
287
+ _x = self.success
288
+ buff.write(_get_struct_B().pack(_x))
289
+ _x = self.message
290
+ length = len(_x)
291
+ if python3 or type(_x) == unicode:
292
+ _x = _x.encode('utf-8')
293
+ length = len(_x)
294
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
295
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
296
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
297
+
298
+ def deserialize_numpy(self, str, numpy):
299
+ """
300
+ unpack serialized message in str into this message instance using numpy for array types
301
+ :param str: byte array of serialized message, ``str``
302
+ :param numpy: numpy python module
303
+ """
304
+ if python3:
305
+ codecs.lookup_error("rosmsg").msg_type = self._type
306
+ try:
307
+ end = 0
308
+ start = end
309
+ end += 1
310
+ (self.success,) = _get_struct_B().unpack(str[start:end])
311
+ self.success = bool(self.success)
312
+ start = end
313
+ end += 4
314
+ (length,) = _struct_I.unpack(str[start:end])
315
+ start = end
316
+ end += length
317
+ if python3:
318
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
319
+ else:
320
+ self.message = str[start:end]
321
+ return self
322
+ except struct.error as e:
323
+ raise genpy.DeserializationError(e) # most likely buffer underfill
324
+
325
+ _struct_I = genpy.struct_I
326
+ def _get_struct_I():
327
+ global _struct_I
328
+ return _struct_I
329
+ _struct_B = None
330
+ def _get_struct_B():
331
+ global _struct_B
332
+ if _struct_B is None:
333
+ _struct_B = struct.Struct("<B")
334
+ return _struct_B
335
+ class gestureExecute(object):
336
+ _type = 'kuavo_msgs/gestureExecute'
337
+ _md5sum = 'b599da36839d439975fbac8d4bfbeb7e'
338
+ _request_class = gestureExecuteRequest
339
+ _response_class = gestureExecuteResponse