kuavo-humanoid-sdk 1.1.2a692__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 (83) hide show
  1. kuavo_humanoid_sdk/kuavo/core/ros/state.py +1 -1
  2. kuavo_humanoid_sdk/msg/__init__.py +4 -0
  3. kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
  4. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  5. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +26 -0
  6. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  7. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +151 -0
  8. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  9. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  10. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  11. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +122 -0
  12. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +203 -0
  13. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  14. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  15. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  16. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  17. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  18. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  19. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  20. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  21. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  22. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_questJoySticks.py +191 -0
  23. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  24. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  25. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  26. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +495 -0
  27. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  28. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  29. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  30. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  31. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +15 -0
  32. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  33. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  34. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  35. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  36. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +321 -0
  37. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  38. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  39. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  40. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  41. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  42. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  43. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  44. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  45. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  46. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +356 -0
  47. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  48. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/__init__.py +9 -0
  49. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_armHandPose.py +160 -0
  50. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_handPose.py +136 -0
  51. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_headBodyPose.py +145 -0
  52. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_ikSolveError.py +171 -0
  53. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_ikSolveParam.py +140 -0
  54. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_robotArmQVVD.py +177 -0
  55. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_robotHandPosition.py +225 -0
  56. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_twoArmHandPose.py +272 -0
  57. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_twoArmHandPoseCmd.py +311 -0
  58. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/__init__.py +4 -0
  59. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_changeArmCtrlMode.py +275 -0
  60. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_changeArmCtrlModeKuavo.py +236 -0
  61. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_fkSrv.py +394 -0
  62. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/_twoArmHandPoseCmdSrv.py +661 -0
  63. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  64. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  65. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  66. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  67. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  68. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  69. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  70. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  71. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  72. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  73. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  74. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  75. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  76. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  77. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  78. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  79. {kuavo_humanoid_sdk-1.1.2a692.dist-info → kuavo_humanoid_sdk-1.1.2a922.dist-info}/METADATA +2 -2
  80. kuavo_humanoid_sdk-1.1.2a922.dist-info/RECORD +104 -0
  81. kuavo_humanoid_sdk-1.1.2a692.dist-info/RECORD +0 -27
  82. {kuavo_humanoid_sdk-1.1.2a692.dist-info → kuavo_humanoid_sdk-1.1.2a922.dist-info}/WHEEL +0 -0
  83. {kuavo_humanoid_sdk-1.1.2a692.dist-info → kuavo_humanoid_sdk-1.1.2a922.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,283 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/setMotorEncoderRoundServiceRequest.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 setMotorEncoderRoundServiceRequest(genpy.Message):
11
+ _md5sum = "5104e77e6b69ebe8cb1f06d5c2f1d52a"
12
+ _type = "kuavo_msgs/setMotorEncoderRoundServiceRequest"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """# 设置电机编码器圈数,用于单编码器版本的校准
15
+ # 传入参数
16
+ int32 motor_id # 电机 ID
17
+ int32 direction # 方向,1 表示顺时针+1圈,-1 表示逆时针-1圈
18
+ bool save_offset # 是否保存偏移量到文件
19
+ """
20
+ __slots__ = ['motor_id','direction','save_offset']
21
+ _slot_types = ['int32','int32','bool']
22
+
23
+ def __init__(self, *args, **kwds):
24
+ """
25
+ Constructor. Any message fields that are implicitly/explicitly
26
+ set to None will be assigned a default value. The recommend
27
+ use is keyword arguments as this is more robust to future message
28
+ changes. You cannot mix in-order arguments and keyword arguments.
29
+
30
+ The available fields are:
31
+ motor_id,direction,save_offset
32
+
33
+ :param args: complete set of field values, in .msg order
34
+ :param kwds: use keyword arguments corresponding to message field names
35
+ to set specific fields.
36
+ """
37
+ if args or kwds:
38
+ super(setMotorEncoderRoundServiceRequest, self).__init__(*args, **kwds)
39
+ # message fields cannot be None, assign default values for those that are
40
+ if self.motor_id is None:
41
+ self.motor_id = 0
42
+ if self.direction is None:
43
+ self.direction = 0
44
+ if self.save_offset is None:
45
+ self.save_offset = False
46
+ else:
47
+ self.motor_id = 0
48
+ self.direction = 0
49
+ self.save_offset = False
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
+ _x = self
64
+ buff.write(_get_struct_2iB().pack(_x.motor_id, _x.direction, _x.save_offset))
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
+ _x = self
78
+ start = end
79
+ end += 9
80
+ (_x.motor_id, _x.direction, _x.save_offset,) = _get_struct_2iB().unpack(str[start:end])
81
+ self.save_offset = bool(self.save_offset)
82
+ return self
83
+ except struct.error as e:
84
+ raise genpy.DeserializationError(e) # most likely buffer underfill
85
+
86
+
87
+ def serialize_numpy(self, buff, numpy):
88
+ """
89
+ serialize message with numpy array types into buffer
90
+ :param buff: buffer, ``StringIO``
91
+ :param numpy: numpy python module
92
+ """
93
+ try:
94
+ _x = self
95
+ buff.write(_get_struct_2iB().pack(_x.motor_id, _x.direction, _x.save_offset))
96
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
97
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
98
+
99
+ def deserialize_numpy(self, str, numpy):
100
+ """
101
+ unpack serialized message in str into this message instance using numpy for array types
102
+ :param str: byte array of serialized message, ``str``
103
+ :param numpy: numpy python module
104
+ """
105
+ if python3:
106
+ codecs.lookup_error("rosmsg").msg_type = self._type
107
+ try:
108
+ end = 0
109
+ _x = self
110
+ start = end
111
+ end += 9
112
+ (_x.motor_id, _x.direction, _x.save_offset,) = _get_struct_2iB().unpack(str[start:end])
113
+ self.save_offset = bool(self.save_offset)
114
+ return self
115
+ except struct.error as e:
116
+ raise genpy.DeserializationError(e) # most likely buffer underfill
117
+
118
+ _struct_I = genpy.struct_I
119
+ def _get_struct_I():
120
+ global _struct_I
121
+ return _struct_I
122
+ _struct_2iB = None
123
+ def _get_struct_2iB():
124
+ global _struct_2iB
125
+ if _struct_2iB is None:
126
+ _struct_2iB = struct.Struct("<2iB")
127
+ return _struct_2iB
128
+ # This Python file uses the following encoding: utf-8
129
+ """autogenerated by genpy from kuavo_msgs/setMotorEncoderRoundServiceResponse.msg. Do not edit."""
130
+ import codecs
131
+ import sys
132
+ python3 = True if sys.hexversion > 0x03000000 else False
133
+ import genpy
134
+ import struct
135
+
136
+
137
+ class setMotorEncoderRoundServiceResponse(genpy.Message):
138
+ _md5sum = "937c9679a518e3a18d831e57125ea522"
139
+ _type = "kuavo_msgs/setMotorEncoderRoundServiceResponse"
140
+ _has_header = False # flag to mark the presence of a Header object
141
+ _full_text = """# 返回结果
142
+ bool success # 成功与否
143
+ string message # 返回信息
144
+
145
+ """
146
+ __slots__ = ['success','message']
147
+ _slot_types = ['bool','string']
148
+
149
+ def __init__(self, *args, **kwds):
150
+ """
151
+ Constructor. Any message fields that are implicitly/explicitly
152
+ set to None will be assigned a default value. The recommend
153
+ use is keyword arguments as this is more robust to future message
154
+ changes. You cannot mix in-order arguments and keyword arguments.
155
+
156
+ The available fields are:
157
+ success,message
158
+
159
+ :param args: complete set of field values, in .msg order
160
+ :param kwds: use keyword arguments corresponding to message field names
161
+ to set specific fields.
162
+ """
163
+ if args or kwds:
164
+ super(setMotorEncoderRoundServiceResponse, self).__init__(*args, **kwds)
165
+ # message fields cannot be None, assign default values for those that are
166
+ if self.success is None:
167
+ self.success = False
168
+ if self.message is None:
169
+ self.message = ''
170
+ else:
171
+ self.success = False
172
+ self.message = ''
173
+
174
+ def _get_types(self):
175
+ """
176
+ internal API method
177
+ """
178
+ return self._slot_types
179
+
180
+ def serialize(self, buff):
181
+ """
182
+ serialize message into buffer
183
+ :param buff: buffer, ``StringIO``
184
+ """
185
+ try:
186
+ _x = self.success
187
+ buff.write(_get_struct_B().pack(_x))
188
+ _x = self.message
189
+ length = len(_x)
190
+ if python3 or type(_x) == unicode:
191
+ _x = _x.encode('utf-8')
192
+ length = len(_x)
193
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
194
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
195
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
196
+
197
+ def deserialize(self, str):
198
+ """
199
+ unpack serialized message in str into this message instance
200
+ :param str: byte array of serialized message, ``str``
201
+ """
202
+ if python3:
203
+ codecs.lookup_error("rosmsg").msg_type = self._type
204
+ try:
205
+ end = 0
206
+ start = end
207
+ end += 1
208
+ (self.success,) = _get_struct_B().unpack(str[start:end])
209
+ self.success = bool(self.success)
210
+ start = end
211
+ end += 4
212
+ (length,) = _struct_I.unpack(str[start:end])
213
+ start = end
214
+ end += length
215
+ if python3:
216
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
217
+ else:
218
+ self.message = str[start:end]
219
+ return self
220
+ except struct.error as e:
221
+ raise genpy.DeserializationError(e) # most likely buffer underfill
222
+
223
+
224
+ def serialize_numpy(self, buff, numpy):
225
+ """
226
+ serialize message with numpy array types into buffer
227
+ :param buff: buffer, ``StringIO``
228
+ :param numpy: numpy python module
229
+ """
230
+ try:
231
+ _x = self.success
232
+ buff.write(_get_struct_B().pack(_x))
233
+ _x = self.message
234
+ length = len(_x)
235
+ if python3 or type(_x) == unicode:
236
+ _x = _x.encode('utf-8')
237
+ length = len(_x)
238
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
239
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
240
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
241
+
242
+ def deserialize_numpy(self, str, numpy):
243
+ """
244
+ unpack serialized message in str into this message instance using numpy for array types
245
+ :param str: byte array of serialized message, ``str``
246
+ :param numpy: numpy python module
247
+ """
248
+ if python3:
249
+ codecs.lookup_error("rosmsg").msg_type = self._type
250
+ try:
251
+ end = 0
252
+ start = end
253
+ end += 1
254
+ (self.success,) = _get_struct_B().unpack(str[start:end])
255
+ self.success = bool(self.success)
256
+ start = end
257
+ end += 4
258
+ (length,) = _struct_I.unpack(str[start:end])
259
+ start = end
260
+ end += length
261
+ if python3:
262
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
263
+ else:
264
+ self.message = str[start:end]
265
+ return self
266
+ except struct.error as e:
267
+ raise genpy.DeserializationError(e) # most likely buffer underfill
268
+
269
+ _struct_I = genpy.struct_I
270
+ def _get_struct_I():
271
+ global _struct_I
272
+ return _struct_I
273
+ _struct_B = None
274
+ def _get_struct_B():
275
+ global _struct_B
276
+ if _struct_B is None:
277
+ _struct_B = struct.Struct("<B")
278
+ return _struct_B
279
+ class setMotorEncoderRoundService(object):
280
+ _type = 'kuavo_msgs/setMotorEncoderRoundService'
281
+ _md5sum = 'c8e2df10122ff9a180b403f54a3f8831'
282
+ _request_class = setMotorEncoderRoundServiceRequest
283
+ _response_class = setMotorEncoderRoundServiceResponse
@@ -0,0 +1,275 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/setTagIdRequest.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 setTagIdRequest(genpy.Message):
11
+ _md5sum = "3ab0b8b553a9751c72d3d7cbe44c28ff"
12
+ _type = "kuavo_msgs/setTagIdRequest"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """int32 tag_id
15
+ """
16
+ __slots__ = ['tag_id']
17
+ _slot_types = ['int32']
18
+
19
+ def __init__(self, *args, **kwds):
20
+ """
21
+ Constructor. Any message fields that are implicitly/explicitly
22
+ set to None will be assigned a default value. The recommend
23
+ use is keyword arguments as this is more robust to future message
24
+ changes. You cannot mix in-order arguments and keyword arguments.
25
+
26
+ The available fields are:
27
+ tag_id
28
+
29
+ :param args: complete set of field values, in .msg order
30
+ :param kwds: use keyword arguments corresponding to message field names
31
+ to set specific fields.
32
+ """
33
+ if args or kwds:
34
+ super(setTagIdRequest, self).__init__(*args, **kwds)
35
+ # message fields cannot be None, assign default values for those that are
36
+ if self.tag_id is None:
37
+ self.tag_id = 0
38
+ else:
39
+ self.tag_id = 0
40
+
41
+ def _get_types(self):
42
+ """
43
+ internal API method
44
+ """
45
+ return self._slot_types
46
+
47
+ def serialize(self, buff):
48
+ """
49
+ serialize message into buffer
50
+ :param buff: buffer, ``StringIO``
51
+ """
52
+ try:
53
+ _x = self.tag_id
54
+ buff.write(_get_struct_i().pack(_x))
55
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
56
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
57
+
58
+ def deserialize(self, str):
59
+ """
60
+ unpack serialized message in str into this message instance
61
+ :param str: byte array of serialized message, ``str``
62
+ """
63
+ if python3:
64
+ codecs.lookup_error("rosmsg").msg_type = self._type
65
+ try:
66
+ end = 0
67
+ start = end
68
+ end += 4
69
+ (self.tag_id,) = _get_struct_i().unpack(str[start:end])
70
+ return self
71
+ except struct.error as e:
72
+ raise genpy.DeserializationError(e) # most likely buffer underfill
73
+
74
+
75
+ def serialize_numpy(self, buff, numpy):
76
+ """
77
+ serialize message with numpy array types into buffer
78
+ :param buff: buffer, ``StringIO``
79
+ :param numpy: numpy python module
80
+ """
81
+ try:
82
+ _x = self.tag_id
83
+ buff.write(_get_struct_i().pack(_x))
84
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
85
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
86
+
87
+ def deserialize_numpy(self, str, numpy):
88
+ """
89
+ unpack serialized message in str into this message instance using numpy for array types
90
+ :param str: byte array of serialized message, ``str``
91
+ :param numpy: numpy python module
92
+ """
93
+ if python3:
94
+ codecs.lookup_error("rosmsg").msg_type = self._type
95
+ try:
96
+ end = 0
97
+ start = end
98
+ end += 4
99
+ (self.tag_id,) = _get_struct_i().unpack(str[start:end])
100
+ return self
101
+ except struct.error as e:
102
+ raise genpy.DeserializationError(e) # most likely buffer underfill
103
+
104
+ _struct_I = genpy.struct_I
105
+ def _get_struct_I():
106
+ global _struct_I
107
+ return _struct_I
108
+ _struct_i = None
109
+ def _get_struct_i():
110
+ global _struct_i
111
+ if _struct_i is None:
112
+ _struct_i = struct.Struct("<i")
113
+ return _struct_i
114
+ # This Python file uses the following encoding: utf-8
115
+ """autogenerated by genpy from kuavo_msgs/setTagIdResponse.msg. Do not edit."""
116
+ import codecs
117
+ import sys
118
+ python3 = True if sys.hexversion > 0x03000000 else False
119
+ import genpy
120
+ import struct
121
+
122
+
123
+ class setTagIdResponse(genpy.Message):
124
+ _md5sum = "1796932a50ff0455cc7b2d61d285bea9"
125
+ _type = "kuavo_msgs/setTagIdResponse"
126
+ _has_header = False # flag to mark the presence of a Header object
127
+ _full_text = """bool success
128
+ int32 tag_id
129
+ string message
130
+
131
+
132
+ """
133
+ __slots__ = ['success','tag_id','message']
134
+ _slot_types = ['bool','int32','string']
135
+
136
+ def __init__(self, *args, **kwds):
137
+ """
138
+ Constructor. Any message fields that are implicitly/explicitly
139
+ set to None will be assigned a default value. The recommend
140
+ use is keyword arguments as this is more robust to future message
141
+ changes. You cannot mix in-order arguments and keyword arguments.
142
+
143
+ The available fields are:
144
+ success,tag_id,message
145
+
146
+ :param args: complete set of field values, in .msg order
147
+ :param kwds: use keyword arguments corresponding to message field names
148
+ to set specific fields.
149
+ """
150
+ if args or kwds:
151
+ super(setTagIdResponse, self).__init__(*args, **kwds)
152
+ # message fields cannot be None, assign default values for those that are
153
+ if self.success is None:
154
+ self.success = False
155
+ if self.tag_id is None:
156
+ self.tag_id = 0
157
+ if self.message is None:
158
+ self.message = ''
159
+ else:
160
+ self.success = False
161
+ self.tag_id = 0
162
+ self.message = ''
163
+
164
+ def _get_types(self):
165
+ """
166
+ internal API method
167
+ """
168
+ return self._slot_types
169
+
170
+ def serialize(self, buff):
171
+ """
172
+ serialize message into buffer
173
+ :param buff: buffer, ``StringIO``
174
+ """
175
+ try:
176
+ _x = self
177
+ buff.write(_get_struct_Bi().pack(_x.success, _x.tag_id))
178
+ _x = self.message
179
+ length = len(_x)
180
+ if python3 or type(_x) == unicode:
181
+ _x = _x.encode('utf-8')
182
+ length = len(_x)
183
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
184
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
185
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
186
+
187
+ def deserialize(self, str):
188
+ """
189
+ unpack serialized message in str into this message instance
190
+ :param str: byte array of serialized message, ``str``
191
+ """
192
+ if python3:
193
+ codecs.lookup_error("rosmsg").msg_type = self._type
194
+ try:
195
+ end = 0
196
+ _x = self
197
+ start = end
198
+ end += 5
199
+ (_x.success, _x.tag_id,) = _get_struct_Bi().unpack(str[start:end])
200
+ self.success = bool(self.success)
201
+ start = end
202
+ end += 4
203
+ (length,) = _struct_I.unpack(str[start:end])
204
+ start = end
205
+ end += length
206
+ if python3:
207
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
208
+ else:
209
+ self.message = str[start:end]
210
+ return self
211
+ except struct.error as e:
212
+ raise genpy.DeserializationError(e) # most likely buffer underfill
213
+
214
+
215
+ def serialize_numpy(self, buff, numpy):
216
+ """
217
+ serialize message with numpy array types into buffer
218
+ :param buff: buffer, ``StringIO``
219
+ :param numpy: numpy python module
220
+ """
221
+ try:
222
+ _x = self
223
+ buff.write(_get_struct_Bi().pack(_x.success, _x.tag_id))
224
+ _x = self.message
225
+ length = len(_x)
226
+ if python3 or type(_x) == unicode:
227
+ _x = _x.encode('utf-8')
228
+ length = len(_x)
229
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
230
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
231
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
232
+
233
+ def deserialize_numpy(self, str, numpy):
234
+ """
235
+ unpack serialized message in str into this message instance using numpy for array types
236
+ :param str: byte array of serialized message, ``str``
237
+ :param numpy: numpy python module
238
+ """
239
+ if python3:
240
+ codecs.lookup_error("rosmsg").msg_type = self._type
241
+ try:
242
+ end = 0
243
+ _x = self
244
+ start = end
245
+ end += 5
246
+ (_x.success, _x.tag_id,) = _get_struct_Bi().unpack(str[start:end])
247
+ self.success = bool(self.success)
248
+ start = end
249
+ end += 4
250
+ (length,) = _struct_I.unpack(str[start:end])
251
+ start = end
252
+ end += length
253
+ if python3:
254
+ self.message = str[start:end].decode('utf-8', 'rosmsg')
255
+ else:
256
+ self.message = str[start:end]
257
+ return self
258
+ except struct.error as e:
259
+ raise genpy.DeserializationError(e) # most likely buffer underfill
260
+
261
+ _struct_I = genpy.struct_I
262
+ def _get_struct_I():
263
+ global _struct_I
264
+ return _struct_I
265
+ _struct_Bi = None
266
+ def _get_struct_Bi():
267
+ global _struct_Bi
268
+ if _struct_Bi is None:
269
+ _struct_Bi = struct.Struct("<Bi")
270
+ return _struct_Bi
271
+ class setTagId(object):
272
+ _type = 'kuavo_msgs/setTagId'
273
+ _md5sum = 'f6b2c1ef4eedb7525fd3a42b8e5cd61f'
274
+ _request_class = setTagIdRequest
275
+ _response_class = setTagIdResponse