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