kuavo-humanoid-sdk 1.1.2a921__py3-none-any.whl → 1.1.2a924__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.2a924.dist-info}/METADATA +1 -1
  79. kuavo_humanoid_sdk-1.1.2a924.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.2a924.dist-info}/WHEEL +0 -0
  82. {kuavo_humanoid_sdk-1.1.2a921.dist-info → kuavo_humanoid_sdk-1.1.2a924.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,225 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from motion_capture_ik/robotHandPosition.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 std_msgs.msg
10
+
11
+ class robotHandPosition(genpy.Message):
12
+ _md5sum = "ee45ac8dfb6e0c9a4c7712025fd69d4f"
13
+ _type = "motion_capture_ik/robotHandPosition"
14
+ _has_header = True # flag to mark the presence of a Header object
15
+ _full_text = """Header header
16
+ uint8[] left_hand_position
17
+ uint8[] right_hand_position
18
+ ================================================================================
19
+ MSG: std_msgs/Header
20
+ # Standard metadata for higher-level stamped data types.
21
+ # This is generally used to communicate timestamped data
22
+ # in a particular coordinate frame.
23
+ #
24
+ # sequence ID: consecutively increasing ID
25
+ uint32 seq
26
+ #Two-integer timestamp that is expressed as:
27
+ # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
28
+ # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
29
+ # time-handling sugar is provided by the client library
30
+ time stamp
31
+ #Frame this data is associated with
32
+ string frame_id
33
+ """
34
+ __slots__ = ['header','left_hand_position','right_hand_position']
35
+ _slot_types = ['std_msgs/Header','uint8[]','uint8[]']
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
+ header,left_hand_position,right_hand_position
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(robotHandPosition, self).__init__(*args, **kwds)
53
+ # message fields cannot be None, assign default values for those that are
54
+ if self.header is None:
55
+ self.header = std_msgs.msg.Header()
56
+ if self.left_hand_position is None:
57
+ self.left_hand_position = b''
58
+ if self.right_hand_position is None:
59
+ self.right_hand_position = b''
60
+ else:
61
+ self.header = std_msgs.msg.Header()
62
+ self.left_hand_position = b''
63
+ self.right_hand_position = b''
64
+
65
+ def _get_types(self):
66
+ """
67
+ internal API method
68
+ """
69
+ return self._slot_types
70
+
71
+ def serialize(self, buff):
72
+ """
73
+ serialize message into buffer
74
+ :param buff: buffer, ``StringIO``
75
+ """
76
+ try:
77
+ _x = self
78
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
79
+ _x = self.header.frame_id
80
+ length = len(_x)
81
+ if python3 or type(_x) == unicode:
82
+ _x = _x.encode('utf-8')
83
+ length = len(_x)
84
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
85
+ _x = self.left_hand_position
86
+ length = len(_x)
87
+ # - if encoded as a list instead, serialize as bytes instead of string
88
+ if type(_x) in [list, tuple]:
89
+ buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
90
+ else:
91
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
92
+ _x = self.right_hand_position
93
+ length = len(_x)
94
+ # - if encoded as a list instead, serialize as bytes instead of string
95
+ if type(_x) in [list, tuple]:
96
+ buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
97
+ else:
98
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
99
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
100
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
101
+
102
+ def deserialize(self, str):
103
+ """
104
+ unpack serialized message in str into this message instance
105
+ :param str: byte array of serialized message, ``str``
106
+ """
107
+ if python3:
108
+ codecs.lookup_error("rosmsg").msg_type = self._type
109
+ try:
110
+ if self.header is None:
111
+ self.header = std_msgs.msg.Header()
112
+ end = 0
113
+ _x = self
114
+ start = end
115
+ end += 12
116
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
117
+ start = end
118
+ end += 4
119
+ (length,) = _struct_I.unpack(str[start:end])
120
+ start = end
121
+ end += length
122
+ if python3:
123
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
124
+ else:
125
+ self.header.frame_id = str[start:end]
126
+ start = end
127
+ end += 4
128
+ (length,) = _struct_I.unpack(str[start:end])
129
+ start = end
130
+ end += length
131
+ self.left_hand_position = str[start:end]
132
+ start = end
133
+ end += 4
134
+ (length,) = _struct_I.unpack(str[start:end])
135
+ start = end
136
+ end += length
137
+ self.right_hand_position = str[start:end]
138
+ return self
139
+ except struct.error as e:
140
+ raise genpy.DeserializationError(e) # most likely buffer underfill
141
+
142
+
143
+ def serialize_numpy(self, buff, numpy):
144
+ """
145
+ serialize message with numpy array types into buffer
146
+ :param buff: buffer, ``StringIO``
147
+ :param numpy: numpy python module
148
+ """
149
+ try:
150
+ _x = self
151
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
152
+ _x = self.header.frame_id
153
+ length = len(_x)
154
+ if python3 or type(_x) == unicode:
155
+ _x = _x.encode('utf-8')
156
+ length = len(_x)
157
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
158
+ _x = self.left_hand_position
159
+ length = len(_x)
160
+ # - if encoded as a list instead, serialize as bytes instead of string
161
+ if type(_x) in [list, tuple]:
162
+ buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
163
+ else:
164
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
165
+ _x = self.right_hand_position
166
+ length = len(_x)
167
+ # - if encoded as a list instead, serialize as bytes instead of string
168
+ if type(_x) in [list, tuple]:
169
+ buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
170
+ else:
171
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
172
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
173
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
174
+
175
+ def deserialize_numpy(self, str, numpy):
176
+ """
177
+ unpack serialized message in str into this message instance using numpy for array types
178
+ :param str: byte array of serialized message, ``str``
179
+ :param numpy: numpy python module
180
+ """
181
+ if python3:
182
+ codecs.lookup_error("rosmsg").msg_type = self._type
183
+ try:
184
+ if self.header is None:
185
+ self.header = std_msgs.msg.Header()
186
+ end = 0
187
+ _x = self
188
+ start = end
189
+ end += 12
190
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
191
+ start = end
192
+ end += 4
193
+ (length,) = _struct_I.unpack(str[start:end])
194
+ start = end
195
+ end += length
196
+ if python3:
197
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
198
+ else:
199
+ self.header.frame_id = str[start:end]
200
+ start = end
201
+ end += 4
202
+ (length,) = _struct_I.unpack(str[start:end])
203
+ start = end
204
+ end += length
205
+ self.left_hand_position = str[start:end]
206
+ start = end
207
+ end += 4
208
+ (length,) = _struct_I.unpack(str[start:end])
209
+ start = end
210
+ end += length
211
+ self.right_hand_position = str[start:end]
212
+ return self
213
+ except struct.error as e:
214
+ raise genpy.DeserializationError(e) # most likely buffer underfill
215
+
216
+ _struct_I = genpy.struct_I
217
+ def _get_struct_I():
218
+ global _struct_I
219
+ return _struct_I
220
+ _struct_3I = None
221
+ def _get_struct_3I():
222
+ global _struct_3I
223
+ if _struct_3I is None:
224
+ _struct_3I = struct.Struct("<3I")
225
+ return _struct_3I
@@ -0,0 +1,272 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from motion_capture_ik/twoArmHandPose.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 motion_capture_ik.msg
10
+ import std_msgs.msg
11
+
12
+ class twoArmHandPose(genpy.Message):
13
+ _md5sum = "5bdb1e027f430369b6f88e5e2f5d31ca"
14
+ _type = "motion_capture_ik/twoArmHandPose"
15
+ _has_header = True # flag to mark the presence of a Header object
16
+ _full_text = """Header header
17
+ armHandPose left_pose
18
+ armHandPose right_pose
19
+ ================================================================================
20
+ MSG: std_msgs/Header
21
+ # Standard metadata for higher-level stamped data types.
22
+ # This is generally used to communicate timestamped data
23
+ # in a particular coordinate frame.
24
+ #
25
+ # sequence ID: consecutively increasing ID
26
+ uint32 seq
27
+ #Two-integer timestamp that is expressed as:
28
+ # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
29
+ # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
30
+ # time-handling sugar is provided by the client library
31
+ time stamp
32
+ #Frame this data is associated with
33
+ string frame_id
34
+
35
+ ================================================================================
36
+ MSG: motion_capture_ik/armHandPose
37
+ float64[3] pos_xyz
38
+ float64[4] quat_xyzw
39
+
40
+ float64[3] elbow_pos_xyz
41
+
42
+ float64[7] joint_angles"""
43
+ __slots__ = ['header','left_pose','right_pose']
44
+ _slot_types = ['std_msgs/Header','motion_capture_ik/armHandPose','motion_capture_ik/armHandPose']
45
+
46
+ def __init__(self, *args, **kwds):
47
+ """
48
+ Constructor. Any message fields that are implicitly/explicitly
49
+ set to None will be assigned a default value. The recommend
50
+ use is keyword arguments as this is more robust to future message
51
+ changes. You cannot mix in-order arguments and keyword arguments.
52
+
53
+ The available fields are:
54
+ header,left_pose,right_pose
55
+
56
+ :param args: complete set of field values, in .msg order
57
+ :param kwds: use keyword arguments corresponding to message field names
58
+ to set specific fields.
59
+ """
60
+ if args or kwds:
61
+ super(twoArmHandPose, self).__init__(*args, **kwds)
62
+ # message fields cannot be None, assign default values for those that are
63
+ if self.header is None:
64
+ self.header = std_msgs.msg.Header()
65
+ if self.left_pose is None:
66
+ self.left_pose = motion_capture_ik.msg.armHandPose()
67
+ if self.right_pose is None:
68
+ self.right_pose = motion_capture_ik.msg.armHandPose()
69
+ else:
70
+ self.header = std_msgs.msg.Header()
71
+ self.left_pose = motion_capture_ik.msg.armHandPose()
72
+ self.right_pose = motion_capture_ik.msg.armHandPose()
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_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
88
+ _x = self.header.frame_id
89
+ length = len(_x)
90
+ if python3 or type(_x) == unicode:
91
+ _x = _x.encode('utf-8')
92
+ length = len(_x)
93
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
94
+ buff.write(_get_struct_3d().pack(*self.left_pose.pos_xyz))
95
+ buff.write(_get_struct_4d().pack(*self.left_pose.quat_xyzw))
96
+ buff.write(_get_struct_3d().pack(*self.left_pose.elbow_pos_xyz))
97
+ buff.write(_get_struct_7d().pack(*self.left_pose.joint_angles))
98
+ buff.write(_get_struct_3d().pack(*self.right_pose.pos_xyz))
99
+ buff.write(_get_struct_4d().pack(*self.right_pose.quat_xyzw))
100
+ buff.write(_get_struct_3d().pack(*self.right_pose.elbow_pos_xyz))
101
+ buff.write(_get_struct_7d().pack(*self.right_pose.joint_angles))
102
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
103
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
104
+
105
+ def deserialize(self, str):
106
+ """
107
+ unpack serialized message in str into this message instance
108
+ :param str: byte array of serialized message, ``str``
109
+ """
110
+ if python3:
111
+ codecs.lookup_error("rosmsg").msg_type = self._type
112
+ try:
113
+ if self.header is None:
114
+ self.header = std_msgs.msg.Header()
115
+ if self.left_pose is None:
116
+ self.left_pose = motion_capture_ik.msg.armHandPose()
117
+ if self.right_pose is None:
118
+ self.right_pose = motion_capture_ik.msg.armHandPose()
119
+ end = 0
120
+ _x = self
121
+ start = end
122
+ end += 12
123
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
124
+ start = end
125
+ end += 4
126
+ (length,) = _struct_I.unpack(str[start:end])
127
+ start = end
128
+ end += length
129
+ if python3:
130
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
131
+ else:
132
+ self.header.frame_id = str[start:end]
133
+ start = end
134
+ end += 24
135
+ self.left_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
136
+ start = end
137
+ end += 32
138
+ self.left_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
139
+ start = end
140
+ end += 24
141
+ self.left_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
142
+ start = end
143
+ end += 56
144
+ self.left_pose.joint_angles = _get_struct_7d().unpack(str[start:end])
145
+ start = end
146
+ end += 24
147
+ self.right_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
148
+ start = end
149
+ end += 32
150
+ self.right_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
151
+ start = end
152
+ end += 24
153
+ self.right_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
154
+ start = end
155
+ end += 56
156
+ self.right_pose.joint_angles = _get_struct_7d().unpack(str[start:end])
157
+ return self
158
+ except struct.error as e:
159
+ raise genpy.DeserializationError(e) # most likely buffer underfill
160
+
161
+
162
+ def serialize_numpy(self, buff, numpy):
163
+ """
164
+ serialize message with numpy array types into buffer
165
+ :param buff: buffer, ``StringIO``
166
+ :param numpy: numpy python module
167
+ """
168
+ try:
169
+ _x = self
170
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
171
+ _x = self.header.frame_id
172
+ length = len(_x)
173
+ if python3 or type(_x) == unicode:
174
+ _x = _x.encode('utf-8')
175
+ length = len(_x)
176
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
177
+ buff.write(self.left_pose.pos_xyz.tostring())
178
+ buff.write(self.left_pose.quat_xyzw.tostring())
179
+ buff.write(self.left_pose.elbow_pos_xyz.tostring())
180
+ buff.write(self.left_pose.joint_angles.tostring())
181
+ buff.write(self.right_pose.pos_xyz.tostring())
182
+ buff.write(self.right_pose.quat_xyzw.tostring())
183
+ buff.write(self.right_pose.elbow_pos_xyz.tostring())
184
+ buff.write(self.right_pose.joint_angles.tostring())
185
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
186
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
187
+
188
+ def deserialize_numpy(self, str, numpy):
189
+ """
190
+ unpack serialized message in str into this message instance using numpy for array types
191
+ :param str: byte array of serialized message, ``str``
192
+ :param numpy: numpy python module
193
+ """
194
+ if python3:
195
+ codecs.lookup_error("rosmsg").msg_type = self._type
196
+ try:
197
+ if self.header is None:
198
+ self.header = std_msgs.msg.Header()
199
+ if self.left_pose is None:
200
+ self.left_pose = motion_capture_ik.msg.armHandPose()
201
+ if self.right_pose is None:
202
+ self.right_pose = motion_capture_ik.msg.armHandPose()
203
+ end = 0
204
+ _x = self
205
+ start = end
206
+ end += 12
207
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
208
+ start = end
209
+ end += 4
210
+ (length,) = _struct_I.unpack(str[start:end])
211
+ start = end
212
+ end += length
213
+ if python3:
214
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
215
+ else:
216
+ self.header.frame_id = str[start:end]
217
+ start = end
218
+ end += 24
219
+ self.left_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
220
+ start = end
221
+ end += 32
222
+ self.left_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
223
+ start = end
224
+ end += 24
225
+ self.left_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
226
+ start = end
227
+ end += 56
228
+ self.left_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=7)
229
+ start = end
230
+ end += 24
231
+ self.right_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
232
+ start = end
233
+ end += 32
234
+ self.right_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
235
+ start = end
236
+ end += 24
237
+ self.right_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
238
+ start = end
239
+ end += 56
240
+ self.right_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=7)
241
+ return self
242
+ except struct.error as e:
243
+ raise genpy.DeserializationError(e) # most likely buffer underfill
244
+
245
+ _struct_I = genpy.struct_I
246
+ def _get_struct_I():
247
+ global _struct_I
248
+ return _struct_I
249
+ _struct_3I = None
250
+ def _get_struct_3I():
251
+ global _struct_3I
252
+ if _struct_3I is None:
253
+ _struct_3I = struct.Struct("<3I")
254
+ return _struct_3I
255
+ _struct_3d = None
256
+ def _get_struct_3d():
257
+ global _struct_3d
258
+ if _struct_3d is None:
259
+ _struct_3d = struct.Struct("<3d")
260
+ return _struct_3d
261
+ _struct_4d = None
262
+ def _get_struct_4d():
263
+ global _struct_4d
264
+ if _struct_4d is None:
265
+ _struct_4d = struct.Struct("<4d")
266
+ return _struct_4d
267
+ _struct_7d = None
268
+ def _get_struct_7d():
269
+ global _struct_7d
270
+ if _struct_7d is None:
271
+ _struct_7d = struct.Struct("<7d")
272
+ return _struct_7d