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,302 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/jointMoveToRequest.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 jointMoveToRequest(genpy.Message):
11
+ _md5sum = "45bdc9fd597f6d88b4ca552f6e6c0925"
12
+ _type = "kuavo_msgs/jointMoveToRequest"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """float64[] goal_position
15
+ float64 speed
16
+ float64 dt
17
+ """
18
+ __slots__ = ['goal_position','speed','dt']
19
+ _slot_types = ['float64[]','float64','float64']
20
+
21
+ def __init__(self, *args, **kwds):
22
+ """
23
+ Constructor. Any message fields that are implicitly/explicitly
24
+ set to None will be assigned a default value. The recommend
25
+ use is keyword arguments as this is more robust to future message
26
+ changes. You cannot mix in-order arguments and keyword arguments.
27
+
28
+ The available fields are:
29
+ goal_position,speed,dt
30
+
31
+ :param args: complete set of field values, in .msg order
32
+ :param kwds: use keyword arguments corresponding to message field names
33
+ to set specific fields.
34
+ """
35
+ if args or kwds:
36
+ super(jointMoveToRequest, self).__init__(*args, **kwds)
37
+ # message fields cannot be None, assign default values for those that are
38
+ if self.goal_position is None:
39
+ self.goal_position = []
40
+ if self.speed is None:
41
+ self.speed = 0.
42
+ if self.dt is None:
43
+ self.dt = 0.
44
+ else:
45
+ self.goal_position = []
46
+ self.speed = 0.
47
+ self.dt = 0.
48
+
49
+ def _get_types(self):
50
+ """
51
+ internal API method
52
+ """
53
+ return self._slot_types
54
+
55
+ def serialize(self, buff):
56
+ """
57
+ serialize message into buffer
58
+ :param buff: buffer, ``StringIO``
59
+ """
60
+ try:
61
+ length = len(self.goal_position)
62
+ buff.write(_struct_I.pack(length))
63
+ pattern = '<%sd'%length
64
+ buff.write(struct.Struct(pattern).pack(*self.goal_position))
65
+ _x = self
66
+ buff.write(_get_struct_2d().pack(_x.speed, _x.dt))
67
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
68
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
69
+
70
+ def deserialize(self, str):
71
+ """
72
+ unpack serialized message in str into this message instance
73
+ :param str: byte array of serialized message, ``str``
74
+ """
75
+ if python3:
76
+ codecs.lookup_error("rosmsg").msg_type = self._type
77
+ try:
78
+ end = 0
79
+ start = end
80
+ end += 4
81
+ (length,) = _struct_I.unpack(str[start:end])
82
+ pattern = '<%sd'%length
83
+ start = end
84
+ s = struct.Struct(pattern)
85
+ end += s.size
86
+ self.goal_position = s.unpack(str[start:end])
87
+ _x = self
88
+ start = end
89
+ end += 16
90
+ (_x.speed, _x.dt,) = _get_struct_2d().unpack(str[start:end])
91
+ return self
92
+ except struct.error as e:
93
+ raise genpy.DeserializationError(e) # most likely buffer underfill
94
+
95
+
96
+ def serialize_numpy(self, buff, numpy):
97
+ """
98
+ serialize message with numpy array types into buffer
99
+ :param buff: buffer, ``StringIO``
100
+ :param numpy: numpy python module
101
+ """
102
+ try:
103
+ length = len(self.goal_position)
104
+ buff.write(_struct_I.pack(length))
105
+ pattern = '<%sd'%length
106
+ buff.write(self.goal_position.tostring())
107
+ _x = self
108
+ buff.write(_get_struct_2d().pack(_x.speed, _x.dt))
109
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
110
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
111
+
112
+ def deserialize_numpy(self, str, numpy):
113
+ """
114
+ unpack serialized message in str into this message instance using numpy for array types
115
+ :param str: byte array of serialized message, ``str``
116
+ :param numpy: numpy python module
117
+ """
118
+ if python3:
119
+ codecs.lookup_error("rosmsg").msg_type = self._type
120
+ try:
121
+ end = 0
122
+ start = end
123
+ end += 4
124
+ (length,) = _struct_I.unpack(str[start:end])
125
+ pattern = '<%sd'%length
126
+ start = end
127
+ s = struct.Struct(pattern)
128
+ end += s.size
129
+ self.goal_position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
130
+ _x = self
131
+ start = end
132
+ end += 16
133
+ (_x.speed, _x.dt,) = _get_struct_2d().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_2d = None
143
+ def _get_struct_2d():
144
+ global _struct_2d
145
+ if _struct_2d is None:
146
+ _struct_2d = struct.Struct("<2d")
147
+ return _struct_2d
148
+ # This Python file uses the following encoding: utf-8
149
+ """autogenerated by genpy from kuavo_msgs/jointMoveToResponse.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 jointMoveToResponse(genpy.Message):
158
+ _md5sum = "937c9679a518e3a18d831e57125ea522"
159
+ _type = "kuavo_msgs/jointMoveToResponse"
160
+ _has_header = False # flag to mark the presence of a Header object
161
+ _full_text = """bool success
162
+ string message
163
+
164
+ """
165
+ __slots__ = ['success','message']
166
+ _slot_types = ['bool','string']
167
+
168
+ def __init__(self, *args, **kwds):
169
+ """
170
+ Constructor. Any message fields that are implicitly/explicitly
171
+ set to None will be assigned a default value. The recommend
172
+ use is keyword arguments as this is more robust to future message
173
+ changes. You cannot mix in-order arguments and keyword arguments.
174
+
175
+ The available fields are:
176
+ success,message
177
+
178
+ :param args: complete set of field values, in .msg order
179
+ :param kwds: use keyword arguments corresponding to message field names
180
+ to set specific fields.
181
+ """
182
+ if args or kwds:
183
+ super(jointMoveToResponse, self).__init__(*args, **kwds)
184
+ # message fields cannot be None, assign default values for those that are
185
+ if self.success is None:
186
+ self.success = False
187
+ if self.message is None:
188
+ self.message = ''
189
+ else:
190
+ self.success = False
191
+ self.message = ''
192
+
193
+ def _get_types(self):
194
+ """
195
+ internal API method
196
+ """
197
+ return self._slot_types
198
+
199
+ def serialize(self, buff):
200
+ """
201
+ serialize message into buffer
202
+ :param buff: buffer, ``StringIO``
203
+ """
204
+ try:
205
+ _x = self.success
206
+ buff.write(_get_struct_B().pack(_x))
207
+ _x = self.message
208
+ length = len(_x)
209
+ if python3 or type(_x) == unicode:
210
+ _x = _x.encode('utf-8')
211
+ length = len(_x)
212
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
213
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
214
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
215
+
216
+ def deserialize(self, str):
217
+ """
218
+ unpack serialized message in str into this message instance
219
+ :param str: byte array of serialized message, ``str``
220
+ """
221
+ if python3:
222
+ codecs.lookup_error("rosmsg").msg_type = self._type
223
+ try:
224
+ end = 0
225
+ start = end
226
+ end += 1
227
+ (self.success,) = _get_struct_B().unpack(str[start:end])
228
+ self.success = bool(self.success)
229
+ start = end
230
+ end += 4
231
+ (length,) = _struct_I.unpack(str[start:end])
232
+ start = end
233
+ end += length
234
+ if python3:
235
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
236
+ else:
237
+ self.message = str[start:end]
238
+ return self
239
+ except struct.error as e:
240
+ raise genpy.DeserializationError(e) # most likely buffer underfill
241
+
242
+
243
+ def serialize_numpy(self, buff, numpy):
244
+ """
245
+ serialize message with numpy array types into buffer
246
+ :param buff: buffer, ``StringIO``
247
+ :param numpy: numpy python module
248
+ """
249
+ try:
250
+ _x = self.success
251
+ buff.write(_get_struct_B().pack(_x))
252
+ _x = self.message
253
+ length = len(_x)
254
+ if python3 or type(_x) == unicode:
255
+ _x = _x.encode('utf-8')
256
+ length = len(_x)
257
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
258
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
259
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
260
+
261
+ def deserialize_numpy(self, str, numpy):
262
+ """
263
+ unpack serialized message in str into this message instance using numpy for array types
264
+ :param str: byte array of serialized message, ``str``
265
+ :param numpy: numpy python module
266
+ """
267
+ if python3:
268
+ codecs.lookup_error("rosmsg").msg_type = self._type
269
+ try:
270
+ end = 0
271
+ start = end
272
+ end += 1
273
+ (self.success,) = _get_struct_B().unpack(str[start:end])
274
+ self.success = bool(self.success)
275
+ start = end
276
+ end += 4
277
+ (length,) = _struct_I.unpack(str[start:end])
278
+ start = end
279
+ end += length
280
+ if python3:
281
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
282
+ else:
283
+ self.message = str[start:end]
284
+ return self
285
+ except struct.error as e:
286
+ raise genpy.DeserializationError(e) # most likely buffer underfill
287
+
288
+ _struct_I = genpy.struct_I
289
+ def _get_struct_I():
290
+ global _struct_I
291
+ return _struct_I
292
+ _struct_B = None
293
+ def _get_struct_B():
294
+ global _struct_B
295
+ if _struct_B is None:
296
+ _struct_B = struct.Struct("<B")
297
+ return _struct_B
298
+ class jointMoveTo(object):
299
+ _type = 'kuavo_msgs/jointMoveTo'
300
+ _md5sum = '61bc968af7a59106f6f5092f42d53578'
301
+ _request_class = jointMoveToRequest
302
+ _response_class = jointMoveToResponse
@@ -0,0 +1,304 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/setHwIntialStateRequest.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 setHwIntialStateRequest(genpy.Message):
11
+ _md5sum = "e059ca7891626ef7f222daadf24b17ad"
12
+ _type = "kuavo_msgs/setHwIntialStateRequest"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """float64[] q_intial
15
+ float64[] v_intial
16
+ """
17
+ __slots__ = ['q_intial','v_intial']
18
+ _slot_types = ['float64[]','float64[]']
19
+
20
+ def __init__(self, *args, **kwds):
21
+ """
22
+ Constructor. Any message fields that are implicitly/explicitly
23
+ set to None will be assigned a default value. The recommend
24
+ use is keyword arguments as this is more robust to future message
25
+ changes. You cannot mix in-order arguments and keyword arguments.
26
+
27
+ The available fields are:
28
+ q_intial,v_intial
29
+
30
+ :param args: complete set of field values, in .msg order
31
+ :param kwds: use keyword arguments corresponding to message field names
32
+ to set specific fields.
33
+ """
34
+ if args or kwds:
35
+ super(setHwIntialStateRequest, self).__init__(*args, **kwds)
36
+ # message fields cannot be None, assign default values for those that are
37
+ if self.q_intial is None:
38
+ self.q_intial = []
39
+ if self.v_intial is None:
40
+ self.v_intial = []
41
+ else:
42
+ self.q_intial = []
43
+ self.v_intial = []
44
+
45
+ def _get_types(self):
46
+ """
47
+ internal API method
48
+ """
49
+ return self._slot_types
50
+
51
+ def serialize(self, buff):
52
+ """
53
+ serialize message into buffer
54
+ :param buff: buffer, ``StringIO``
55
+ """
56
+ try:
57
+ length = len(self.q_intial)
58
+ buff.write(_struct_I.pack(length))
59
+ pattern = '<%sd'%length
60
+ buff.write(struct.Struct(pattern).pack(*self.q_intial))
61
+ length = len(self.v_intial)
62
+ buff.write(_struct_I.pack(length))
63
+ pattern = '<%sd'%length
64
+ buff.write(struct.Struct(pattern).pack(*self.v_intial))
65
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
66
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
67
+
68
+ def deserialize(self, str):
69
+ """
70
+ unpack serialized message in str into this message instance
71
+ :param str: byte array of serialized message, ``str``
72
+ """
73
+ if python3:
74
+ codecs.lookup_error("rosmsg").msg_type = self._type
75
+ try:
76
+ end = 0
77
+ start = end
78
+ end += 4
79
+ (length,) = _struct_I.unpack(str[start:end])
80
+ pattern = '<%sd'%length
81
+ start = end
82
+ s = struct.Struct(pattern)
83
+ end += s.size
84
+ self.q_intial = s.unpack(str[start:end])
85
+ start = end
86
+ end += 4
87
+ (length,) = _struct_I.unpack(str[start:end])
88
+ pattern = '<%sd'%length
89
+ start = end
90
+ s = struct.Struct(pattern)
91
+ end += s.size
92
+ self.v_intial = s.unpack(str[start:end])
93
+ return self
94
+ except struct.error as e:
95
+ raise genpy.DeserializationError(e) # most likely buffer underfill
96
+
97
+
98
+ def serialize_numpy(self, buff, numpy):
99
+ """
100
+ serialize message with numpy array types into buffer
101
+ :param buff: buffer, ``StringIO``
102
+ :param numpy: numpy python module
103
+ """
104
+ try:
105
+ length = len(self.q_intial)
106
+ buff.write(_struct_I.pack(length))
107
+ pattern = '<%sd'%length
108
+ buff.write(self.q_intial.tostring())
109
+ length = len(self.v_intial)
110
+ buff.write(_struct_I.pack(length))
111
+ pattern = '<%sd'%length
112
+ buff.write(self.v_intial.tostring())
113
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
114
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
115
+
116
+ def deserialize_numpy(self, str, numpy):
117
+ """
118
+ unpack serialized message in str into this message instance using numpy for array types
119
+ :param str: byte array of serialized message, ``str``
120
+ :param numpy: numpy python module
121
+ """
122
+ if python3:
123
+ codecs.lookup_error("rosmsg").msg_type = self._type
124
+ try:
125
+ end = 0
126
+ start = end
127
+ end += 4
128
+ (length,) = _struct_I.unpack(str[start:end])
129
+ pattern = '<%sd'%length
130
+ start = end
131
+ s = struct.Struct(pattern)
132
+ end += s.size
133
+ self.q_intial = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
134
+ start = end
135
+ end += 4
136
+ (length,) = _struct_I.unpack(str[start:end])
137
+ pattern = '<%sd'%length
138
+ start = end
139
+ s = struct.Struct(pattern)
140
+ end += s.size
141
+ self.v_intial = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
142
+ return self
143
+ except struct.error as e:
144
+ raise genpy.DeserializationError(e) # most likely buffer underfill
145
+
146
+ _struct_I = genpy.struct_I
147
+ def _get_struct_I():
148
+ global _struct_I
149
+ return _struct_I
150
+ # This Python file uses the following encoding: utf-8
151
+ """autogenerated by genpy from kuavo_msgs/setHwIntialStateResponse.msg. Do not edit."""
152
+ import codecs
153
+ import sys
154
+ python3 = True if sys.hexversion > 0x03000000 else False
155
+ import genpy
156
+ import struct
157
+
158
+
159
+ class setHwIntialStateResponse(genpy.Message):
160
+ _md5sum = "937c9679a518e3a18d831e57125ea522"
161
+ _type = "kuavo_msgs/setHwIntialStateResponse"
162
+ _has_header = False # flag to mark the presence of a Header object
163
+ _full_text = """bool success
164
+ string message
165
+
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(setHwIntialStateResponse, 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 setHwIntialState(object):
301
+ _type = 'kuavo_msgs/setHwIntialState'
302
+ _md5sum = '5289a64acc27422c552070b8181b8118'
303
+ _request_class = setHwIntialStateRequest
304
+ _response_class = setHwIntialStateResponse