kuavo-humanoid-sdk 1.2.1b1625__20250804112347-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 (156) hide show
  1. kuavo_humanoid_sdk/__init__.py +6 -0
  2. kuavo_humanoid_sdk/common/logger.py +45 -0
  3. kuavo_humanoid_sdk/interfaces/__init__.py +4 -0
  4. kuavo_humanoid_sdk/interfaces/data_types.py +288 -0
  5. kuavo_humanoid_sdk/interfaces/end_effector.py +62 -0
  6. kuavo_humanoid_sdk/interfaces/robot.py +22 -0
  7. kuavo_humanoid_sdk/interfaces/robot_info.py +56 -0
  8. kuavo_humanoid_sdk/kuavo/__init__.py +11 -0
  9. kuavo_humanoid_sdk/kuavo/core/audio.py +32 -0
  10. kuavo_humanoid_sdk/kuavo/core/core.py +634 -0
  11. kuavo_humanoid_sdk/kuavo/core/dex_hand_control.py +114 -0
  12. kuavo_humanoid_sdk/kuavo/core/leju_claw_control.py +67 -0
  13. kuavo_humanoid_sdk/kuavo/core/ros/audio.py +92 -0
  14. kuavo_humanoid_sdk/kuavo/core/ros/control.py +1453 -0
  15. kuavo_humanoid_sdk/kuavo/core/ros/observation.py +94 -0
  16. kuavo_humanoid_sdk/kuavo/core/ros/param.py +183 -0
  17. kuavo_humanoid_sdk/kuavo/core/ros/sat_utils.py +103 -0
  18. kuavo_humanoid_sdk/kuavo/core/ros/state.py +634 -0
  19. kuavo_humanoid_sdk/kuavo/core/ros/tools.py +220 -0
  20. kuavo_humanoid_sdk/kuavo/core/ros/vision.py +234 -0
  21. kuavo_humanoid_sdk/kuavo/core/ros_env.py +238 -0
  22. kuavo_humanoid_sdk/kuavo/dexterous_hand.py +201 -0
  23. kuavo_humanoid_sdk/kuavo/leju_claw.py +235 -0
  24. kuavo_humanoid_sdk/kuavo/robot.py +514 -0
  25. kuavo_humanoid_sdk/kuavo/robot_arm.py +248 -0
  26. kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
  27. kuavo_humanoid_sdk/kuavo/robot_head.py +50 -0
  28. kuavo_humanoid_sdk/kuavo/robot_info.py +113 -0
  29. kuavo_humanoid_sdk/kuavo/robot_observation.py +64 -0
  30. kuavo_humanoid_sdk/kuavo/robot_state.py +307 -0
  31. kuavo_humanoid_sdk/kuavo/robot_tool.py +109 -0
  32. kuavo_humanoid_sdk/kuavo/robot_vision.py +81 -0
  33. kuavo_humanoid_sdk/kuavo_strategy/__init__.py +2 -0
  34. kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +1325 -0
  35. kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +106 -0
  36. kuavo_humanoid_sdk/kuavo_strategy_v2/common/data_type.py +340 -0
  37. kuavo_humanoid_sdk/kuavo_strategy_v2/common/events/base_event.py +215 -0
  38. kuavo_humanoid_sdk/kuavo_strategy_v2/common/robot_sdk.py +25 -0
  39. kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/case.py +331 -0
  40. kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/strategy.py +504 -0
  41. kuavo_humanoid_sdk/kuavo_strategy_v2/utils/logger_setup.py +40 -0
  42. kuavo_humanoid_sdk/kuavo_strategy_v2/utils/utils.py +88 -0
  43. kuavo_humanoid_sdk/msg/__init__.py +4 -0
  44. kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
  45. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetection.py +306 -0
  46. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetectionArray.py +437 -0
  47. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_JoySticks.py +191 -0
  48. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  49. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_MmDetectionMsg.py +264 -0
  50. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
  51. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
  52. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +58 -0
  53. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armCollisionCheckInfo.py +160 -0
  54. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +160 -0
  55. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
  56. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  57. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +151 -0
  58. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
  59. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  60. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  61. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  62. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
  63. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6D.py +123 -0
  64. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6DTargetTrajectories.py +301 -0
  65. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
  66. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVision.py +136 -0
  67. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVisionArray.py +231 -0
  68. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
  69. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses6D.py +149 -0
  70. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
  71. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  72. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  73. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  74. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
  75. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  76. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
  77. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
  78. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  79. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
  80. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  81. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  82. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  83. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  84. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
  85. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfo.py +143 -0
  86. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfoList.py +220 -0
  87. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
  88. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
  89. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
  90. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotBodyMatrices.py +332 -0
  91. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  92. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  93. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  94. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +495 -0
  95. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  96. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_tagDataArray.py +216 -0
  97. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  98. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +272 -0
  99. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +315 -0
  100. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
  101. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
  102. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  103. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  104. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
  105. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetTargetPartPoseInCamera.py +298 -0
  106. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
  107. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
  108. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
  109. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +31 -0
  110. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  111. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
  112. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
  113. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  114. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  115. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  116. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +394 -0
  117. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPose6DTargetTrajectoriesSrv.py +410 -0
  118. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
  119. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  120. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  121. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  122. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  123. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
  124. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  125. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  126. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +421 -0
  127. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
  128. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
  129. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  130. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
  131. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  132. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  133. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
  134. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
  135. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +662 -0
  136. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  137. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  138. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  139. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  140. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  141. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  142. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  143. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  144. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  145. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  146. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  147. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  148. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  149. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  150. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  151. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  152. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  153. kuavo_humanoid_sdk-1.2.1b1625.dist-info/METADATA +291 -0
  154. kuavo_humanoid_sdk-1.2.1b1625.dist-info/RECORD +156 -0
  155. kuavo_humanoid_sdk-1.2.1b1625.dist-info/WHEEL +6 -0
  156. kuavo_humanoid_sdk-1.2.1b1625.dist-info/top_level.txt +1 -0
@@ -0,0 +1,225 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/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 = "kuavo_msgs/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,128 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/robotHeadMotionData.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 robotHeadMotionData(genpy.Message):
11
+ _md5sum = "400001e7cf73111efbced59084cb481a"
12
+ _type = "kuavo_msgs/robotHeadMotionData"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """# robotHeadMotionData.msg
15
+ #
16
+ # - joint_data[0] : yaw, [-30, 30]
17
+ # - joint_data[1] : pitch, [-25, 25]
18
+ #
19
+ # - [-8.000000, 0.000000]
20
+
21
+ float64[] joint_data
22
+ """
23
+ __slots__ = ['joint_data']
24
+ _slot_types = ['float64[]']
25
+
26
+ def __init__(self, *args, **kwds):
27
+ """
28
+ Constructor. Any message fields that are implicitly/explicitly
29
+ set to None will be assigned a default value. The recommend
30
+ use is keyword arguments as this is more robust to future message
31
+ changes. You cannot mix in-order arguments and keyword arguments.
32
+
33
+ The available fields are:
34
+ joint_data
35
+
36
+ :param args: complete set of field values, in .msg order
37
+ :param kwds: use keyword arguments corresponding to message field names
38
+ to set specific fields.
39
+ """
40
+ if args or kwds:
41
+ super(robotHeadMotionData, self).__init__(*args, **kwds)
42
+ # message fields cannot be None, assign default values for those that are
43
+ if self.joint_data is None:
44
+ self.joint_data = []
45
+ else:
46
+ self.joint_data = []
47
+
48
+ def _get_types(self):
49
+ """
50
+ internal API method
51
+ """
52
+ return self._slot_types
53
+
54
+ def serialize(self, buff):
55
+ """
56
+ serialize message into buffer
57
+ :param buff: buffer, ``StringIO``
58
+ """
59
+ try:
60
+ length = len(self.joint_data)
61
+ buff.write(_struct_I.pack(length))
62
+ pattern = '<%sd'%length
63
+ buff.write(struct.Struct(pattern).pack(*self.joint_data))
64
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
65
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
66
+
67
+ def deserialize(self, str):
68
+ """
69
+ unpack serialized message in str into this message instance
70
+ :param str: byte array of serialized message, ``str``
71
+ """
72
+ if python3:
73
+ codecs.lookup_error("rosmsg").msg_type = self._type
74
+ try:
75
+ end = 0
76
+ start = end
77
+ end += 4
78
+ (length,) = _struct_I.unpack(str[start:end])
79
+ pattern = '<%sd'%length
80
+ start = end
81
+ s = struct.Struct(pattern)
82
+ end += s.size
83
+ self.joint_data = s.unpack(str[start:end])
84
+ return self
85
+ except struct.error as e:
86
+ raise genpy.DeserializationError(e) # most likely buffer underfill
87
+
88
+
89
+ def serialize_numpy(self, buff, numpy):
90
+ """
91
+ serialize message with numpy array types into buffer
92
+ :param buff: buffer, ``StringIO``
93
+ :param numpy: numpy python module
94
+ """
95
+ try:
96
+ length = len(self.joint_data)
97
+ buff.write(_struct_I.pack(length))
98
+ pattern = '<%sd'%length
99
+ buff.write(self.joint_data.tostring())
100
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
101
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
102
+
103
+ def deserialize_numpy(self, str, numpy):
104
+ """
105
+ unpack serialized message in str into this message instance using numpy for array types
106
+ :param str: byte array of serialized message, ``str``
107
+ :param numpy: numpy python module
108
+ """
109
+ if python3:
110
+ codecs.lookup_error("rosmsg").msg_type = self._type
111
+ try:
112
+ end = 0
113
+ start = end
114
+ end += 4
115
+ (length,) = _struct_I.unpack(str[start:end])
116
+ pattern = '<%sd'%length
117
+ start = end
118
+ s = struct.Struct(pattern)
119
+ end += s.size
120
+ self.joint_data = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
121
+ return self
122
+ except struct.error as e:
123
+ raise genpy.DeserializationError(e) # most likely buffer underfill
124
+
125
+ _struct_I = genpy.struct_I
126
+ def _get_struct_I():
127
+ global _struct_I
128
+ return _struct_I
@@ -0,0 +1,222 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/robotState.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 robotState(genpy.Message):
12
+ _md5sum = "43677a53c92d60be98c565165f89dd00"
13
+ _type = "kuavo_msgs/robotState"
14
+ _has_header = True # flag to mark the presence of a Header object
15
+ _full_text = """std_msgs/Header header
16
+ float64[] q
17
+ float64[] v
18
+
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
+ __slots__ = ['header','q','v']
36
+ _slot_types = ['std_msgs/Header','float64[]','float64[]']
37
+
38
+ def __init__(self, *args, **kwds):
39
+ """
40
+ Constructor. Any message fields that are implicitly/explicitly
41
+ set to None will be assigned a default value. The recommend
42
+ use is keyword arguments as this is more robust to future message
43
+ changes. You cannot mix in-order arguments and keyword arguments.
44
+
45
+ The available fields are:
46
+ header,q,v
47
+
48
+ :param args: complete set of field values, in .msg order
49
+ :param kwds: use keyword arguments corresponding to message field names
50
+ to set specific fields.
51
+ """
52
+ if args or kwds:
53
+ super(robotState, self).__init__(*args, **kwds)
54
+ # message fields cannot be None, assign default values for those that are
55
+ if self.header is None:
56
+ self.header = std_msgs.msg.Header()
57
+ if self.q is None:
58
+ self.q = []
59
+ if self.v is None:
60
+ self.v = []
61
+ else:
62
+ self.header = std_msgs.msg.Header()
63
+ self.q = []
64
+ self.v = []
65
+
66
+ def _get_types(self):
67
+ """
68
+ internal API method
69
+ """
70
+ return self._slot_types
71
+
72
+ def serialize(self, buff):
73
+ """
74
+ serialize message into buffer
75
+ :param buff: buffer, ``StringIO``
76
+ """
77
+ try:
78
+ _x = self
79
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
80
+ _x = self.header.frame_id
81
+ length = len(_x)
82
+ if python3 or type(_x) == unicode:
83
+ _x = _x.encode('utf-8')
84
+ length = len(_x)
85
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
86
+ length = len(self.q)
87
+ buff.write(_struct_I.pack(length))
88
+ pattern = '<%sd'%length
89
+ buff.write(struct.Struct(pattern).pack(*self.q))
90
+ length = len(self.v)
91
+ buff.write(_struct_I.pack(length))
92
+ pattern = '<%sd'%length
93
+ buff.write(struct.Struct(pattern).pack(*self.v))
94
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
95
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
96
+
97
+ def deserialize(self, str):
98
+ """
99
+ unpack serialized message in str into this message instance
100
+ :param str: byte array of serialized message, ``str``
101
+ """
102
+ if python3:
103
+ codecs.lookup_error("rosmsg").msg_type = self._type
104
+ try:
105
+ if self.header is None:
106
+ self.header = std_msgs.msg.Header()
107
+ end = 0
108
+ _x = self
109
+ start = end
110
+ end += 12
111
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
112
+ start = end
113
+ end += 4
114
+ (length,) = _struct_I.unpack(str[start:end])
115
+ start = end
116
+ end += length
117
+ if python3:
118
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
119
+ else:
120
+ self.header.frame_id = str[start:end]
121
+ start = end
122
+ end += 4
123
+ (length,) = _struct_I.unpack(str[start:end])
124
+ pattern = '<%sd'%length
125
+ start = end
126
+ s = struct.Struct(pattern)
127
+ end += s.size
128
+ self.q = s.unpack(str[start:end])
129
+ start = end
130
+ end += 4
131
+ (length,) = _struct_I.unpack(str[start:end])
132
+ pattern = '<%sd'%length
133
+ start = end
134
+ s = struct.Struct(pattern)
135
+ end += s.size
136
+ self.v = s.unpack(str[start:end])
137
+ return self
138
+ except struct.error as e:
139
+ raise genpy.DeserializationError(e) # most likely buffer underfill
140
+
141
+
142
+ def serialize_numpy(self, buff, numpy):
143
+ """
144
+ serialize message with numpy array types into buffer
145
+ :param buff: buffer, ``StringIO``
146
+ :param numpy: numpy python module
147
+ """
148
+ try:
149
+ _x = self
150
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
151
+ _x = self.header.frame_id
152
+ length = len(_x)
153
+ if python3 or type(_x) == unicode:
154
+ _x = _x.encode('utf-8')
155
+ length = len(_x)
156
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
157
+ length = len(self.q)
158
+ buff.write(_struct_I.pack(length))
159
+ pattern = '<%sd'%length
160
+ buff.write(self.q.tostring())
161
+ length = len(self.v)
162
+ buff.write(_struct_I.pack(length))
163
+ pattern = '<%sd'%length
164
+ buff.write(self.v.tostring())
165
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
166
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
167
+
168
+ def deserialize_numpy(self, str, numpy):
169
+ """
170
+ unpack serialized message in str into this message instance using numpy for array types
171
+ :param str: byte array of serialized message, ``str``
172
+ :param numpy: numpy python module
173
+ """
174
+ if python3:
175
+ codecs.lookup_error("rosmsg").msg_type = self._type
176
+ try:
177
+ if self.header is None:
178
+ self.header = std_msgs.msg.Header()
179
+ end = 0
180
+ _x = self
181
+ start = end
182
+ end += 12
183
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
184
+ start = end
185
+ end += 4
186
+ (length,) = _struct_I.unpack(str[start:end])
187
+ start = end
188
+ end += length
189
+ if python3:
190
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
191
+ else:
192
+ self.header.frame_id = str[start:end]
193
+ start = end
194
+ end += 4
195
+ (length,) = _struct_I.unpack(str[start:end])
196
+ pattern = '<%sd'%length
197
+ start = end
198
+ s = struct.Struct(pattern)
199
+ end += s.size
200
+ self.q = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
201
+ start = end
202
+ end += 4
203
+ (length,) = _struct_I.unpack(str[start:end])
204
+ pattern = '<%sd'%length
205
+ start = end
206
+ s = struct.Struct(pattern)
207
+ end += s.size
208
+ self.v = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
209
+ return self
210
+ except struct.error as e:
211
+ raise genpy.DeserializationError(e) # most likely buffer underfill
212
+
213
+ _struct_I = genpy.struct_I
214
+ def _get_struct_I():
215
+ global _struct_I
216
+ return _struct_I
217
+ _struct_3I = None
218
+ def _get_struct_3I():
219
+ global _struct_3I
220
+ if _struct_3I is None:
221
+ _struct_3I = struct.Struct("<3I")
222
+ return _struct_3I