kuavo-humanoid-sdk 1.2.1b1675__20250812233944-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 (158) 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/_AudioReceiverData.py +122 -0
  48. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_JoySticks.py +191 -0
  49. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  50. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_MmDetectionMsg.py +264 -0
  51. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
  52. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
  53. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +59 -0
  54. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armCollisionCheckInfo.py +160 -0
  55. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +160 -0
  56. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
  57. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  58. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +151 -0
  59. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
  60. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  61. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  62. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  63. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
  64. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6D.py +123 -0
  65. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6DTargetTrajectories.py +301 -0
  66. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
  67. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVision.py +136 -0
  68. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVisionArray.py +231 -0
  69. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
  70. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses6D.py +149 -0
  71. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
  72. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  73. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  74. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  75. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
  76. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  77. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
  78. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
  79. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  80. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
  81. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  82. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  83. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  84. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  85. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
  86. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfo.py +143 -0
  87. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfoList.py +220 -0
  88. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
  89. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
  90. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
  91. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotBodyMatrices.py +332 -0
  92. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  93. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  94. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  95. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +495 -0
  96. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  97. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_tagDataArray.py +216 -0
  98. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  99. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +272 -0
  100. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +315 -0
  101. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
  102. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
  103. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  104. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  105. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
  106. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetTargetPartPoseInCamera.py +298 -0
  107. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
  108. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
  109. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode.py +468 -0
  110. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
  111. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +32 -0
  112. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  113. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
  114. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
  115. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  116. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  117. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  118. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +394 -0
  119. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPose6DTargetTrajectoriesSrv.py +410 -0
  120. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
  121. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  122. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  123. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  124. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  125. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
  126. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  127. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  128. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +421 -0
  129. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
  130. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
  131. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  132. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
  133. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  134. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  135. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
  136. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
  137. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +662 -0
  138. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  139. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  140. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  141. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  142. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  143. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  144. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  145. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  146. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  147. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  148. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  149. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  150. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  151. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  152. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  153. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  154. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  155. kuavo_humanoid_sdk-1.2.1b1675.dist-info/METADATA +291 -0
  156. kuavo_humanoid_sdk-1.2.1b1675.dist-info/RECORD +158 -0
  157. kuavo_humanoid_sdk-1.2.1b1675.dist-info/WHEEL +6 -0
  158. kuavo_humanoid_sdk-1.2.1b1675.dist-info/top_level.txt +1 -0
@@ -0,0 +1,299 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/twoArmHandPoseFree.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 kuavo_msgs.msg
10
+ import std_msgs.msg
11
+
12
+ class twoArmHandPoseFree(genpy.Message):
13
+ _md5sum = "502eb9b395e49da766ec7aa160688372"
14
+ _type = "kuavo_msgs/twoArmHandPoseFree"
15
+ _has_header = True # flag to mark the presence of a Header object
16
+ _full_text = """Header header
17
+ armHandPoseFree left_pose
18
+ armHandPoseFree 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: kuavo_msgs/armHandPoseFree
37
+ float64[3] pos_xyz
38
+ float64[4] quat_xyzw
39
+
40
+ float64[3] elbow_pos_xyz
41
+
42
+ float64[] joint_angles
43
+ """
44
+ __slots__ = ['header','left_pose','right_pose']
45
+ _slot_types = ['std_msgs/Header','kuavo_msgs/armHandPoseFree','kuavo_msgs/armHandPoseFree']
46
+
47
+ def __init__(self, *args, **kwds):
48
+ """
49
+ Constructor. Any message fields that are implicitly/explicitly
50
+ set to None will be assigned a default value. The recommend
51
+ use is keyword arguments as this is more robust to future message
52
+ changes. You cannot mix in-order arguments and keyword arguments.
53
+
54
+ The available fields are:
55
+ header,left_pose,right_pose
56
+
57
+ :param args: complete set of field values, in .msg order
58
+ :param kwds: use keyword arguments corresponding to message field names
59
+ to set specific fields.
60
+ """
61
+ if args or kwds:
62
+ super(twoArmHandPoseFree, self).__init__(*args, **kwds)
63
+ # message fields cannot be None, assign default values for those that are
64
+ if self.header is None:
65
+ self.header = std_msgs.msg.Header()
66
+ if self.left_pose is None:
67
+ self.left_pose = kuavo_msgs.msg.armHandPoseFree()
68
+ if self.right_pose is None:
69
+ self.right_pose = kuavo_msgs.msg.armHandPoseFree()
70
+ else:
71
+ self.header = std_msgs.msg.Header()
72
+ self.left_pose = kuavo_msgs.msg.armHandPoseFree()
73
+ self.right_pose = kuavo_msgs.msg.armHandPoseFree()
74
+
75
+ def _get_types(self):
76
+ """
77
+ internal API method
78
+ """
79
+ return self._slot_types
80
+
81
+ def serialize(self, buff):
82
+ """
83
+ serialize message into buffer
84
+ :param buff: buffer, ``StringIO``
85
+ """
86
+ try:
87
+ _x = self
88
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
89
+ _x = self.header.frame_id
90
+ length = len(_x)
91
+ if python3 or type(_x) == unicode:
92
+ _x = _x.encode('utf-8')
93
+ length = len(_x)
94
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
95
+ buff.write(_get_struct_3d().pack(*self.left_pose.pos_xyz))
96
+ buff.write(_get_struct_4d().pack(*self.left_pose.quat_xyzw))
97
+ buff.write(_get_struct_3d().pack(*self.left_pose.elbow_pos_xyz))
98
+ length = len(self.left_pose.joint_angles)
99
+ buff.write(_struct_I.pack(length))
100
+ pattern = '<%sd'%length
101
+ buff.write(struct.Struct(pattern).pack(*self.left_pose.joint_angles))
102
+ buff.write(_get_struct_3d().pack(*self.right_pose.pos_xyz))
103
+ buff.write(_get_struct_4d().pack(*self.right_pose.quat_xyzw))
104
+ buff.write(_get_struct_3d().pack(*self.right_pose.elbow_pos_xyz))
105
+ length = len(self.right_pose.joint_angles)
106
+ buff.write(_struct_I.pack(length))
107
+ pattern = '<%sd'%length
108
+ buff.write(struct.Struct(pattern).pack(*self.right_pose.joint_angles))
109
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
110
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
111
+
112
+ def deserialize(self, str):
113
+ """
114
+ unpack serialized message in str into this message instance
115
+ :param str: byte array of serialized message, ``str``
116
+ """
117
+ if python3:
118
+ codecs.lookup_error("rosmsg").msg_type = self._type
119
+ try:
120
+ if self.header is None:
121
+ self.header = std_msgs.msg.Header()
122
+ if self.left_pose is None:
123
+ self.left_pose = kuavo_msgs.msg.armHandPoseFree()
124
+ if self.right_pose is None:
125
+ self.right_pose = kuavo_msgs.msg.armHandPoseFree()
126
+ end = 0
127
+ _x = self
128
+ start = end
129
+ end += 12
130
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
131
+ start = end
132
+ end += 4
133
+ (length,) = _struct_I.unpack(str[start:end])
134
+ start = end
135
+ end += length
136
+ if python3:
137
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
138
+ else:
139
+ self.header.frame_id = str[start:end]
140
+ start = end
141
+ end += 24
142
+ self.left_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
143
+ start = end
144
+ end += 32
145
+ self.left_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
146
+ start = end
147
+ end += 24
148
+ self.left_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
149
+ start = end
150
+ end += 4
151
+ (length,) = _struct_I.unpack(str[start:end])
152
+ pattern = '<%sd'%length
153
+ start = end
154
+ s = struct.Struct(pattern)
155
+ end += s.size
156
+ self.left_pose.joint_angles = s.unpack(str[start:end])
157
+ start = end
158
+ end += 24
159
+ self.right_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
160
+ start = end
161
+ end += 32
162
+ self.right_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
163
+ start = end
164
+ end += 24
165
+ self.right_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
166
+ start = end
167
+ end += 4
168
+ (length,) = _struct_I.unpack(str[start:end])
169
+ pattern = '<%sd'%length
170
+ start = end
171
+ s = struct.Struct(pattern)
172
+ end += s.size
173
+ self.right_pose.joint_angles = s.unpack(str[start:end])
174
+ return self
175
+ except struct.error as e:
176
+ raise genpy.DeserializationError(e) # most likely buffer underfill
177
+
178
+
179
+ def serialize_numpy(self, buff, numpy):
180
+ """
181
+ serialize message with numpy array types into buffer
182
+ :param buff: buffer, ``StringIO``
183
+ :param numpy: numpy python module
184
+ """
185
+ try:
186
+ _x = self
187
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
188
+ _x = self.header.frame_id
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
+ buff.write(self.left_pose.pos_xyz.tostring())
195
+ buff.write(self.left_pose.quat_xyzw.tostring())
196
+ buff.write(self.left_pose.elbow_pos_xyz.tostring())
197
+ length = len(self.left_pose.joint_angles)
198
+ buff.write(_struct_I.pack(length))
199
+ pattern = '<%sd'%length
200
+ buff.write(self.left_pose.joint_angles.tostring())
201
+ buff.write(self.right_pose.pos_xyz.tostring())
202
+ buff.write(self.right_pose.quat_xyzw.tostring())
203
+ buff.write(self.right_pose.elbow_pos_xyz.tostring())
204
+ length = len(self.right_pose.joint_angles)
205
+ buff.write(_struct_I.pack(length))
206
+ pattern = '<%sd'%length
207
+ buff.write(self.right_pose.joint_angles.tostring())
208
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
209
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
210
+
211
+ def deserialize_numpy(self, str, numpy):
212
+ """
213
+ unpack serialized message in str into this message instance using numpy for array types
214
+ :param str: byte array of serialized message, ``str``
215
+ :param numpy: numpy python module
216
+ """
217
+ if python3:
218
+ codecs.lookup_error("rosmsg").msg_type = self._type
219
+ try:
220
+ if self.header is None:
221
+ self.header = std_msgs.msg.Header()
222
+ if self.left_pose is None:
223
+ self.left_pose = kuavo_msgs.msg.armHandPoseFree()
224
+ if self.right_pose is None:
225
+ self.right_pose = kuavo_msgs.msg.armHandPoseFree()
226
+ end = 0
227
+ _x = self
228
+ start = end
229
+ end += 12
230
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
231
+ start = end
232
+ end += 4
233
+ (length,) = _struct_I.unpack(str[start:end])
234
+ start = end
235
+ end += length
236
+ if python3:
237
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
238
+ else:
239
+ self.header.frame_id = str[start:end]
240
+ start = end
241
+ end += 24
242
+ self.left_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
243
+ start = end
244
+ end += 32
245
+ self.left_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
246
+ start = end
247
+ end += 24
248
+ self.left_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
249
+ start = end
250
+ end += 4
251
+ (length,) = _struct_I.unpack(str[start:end])
252
+ pattern = '<%sd'%length
253
+ start = end
254
+ s = struct.Struct(pattern)
255
+ end += s.size
256
+ self.left_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
257
+ start = end
258
+ end += 24
259
+ self.right_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
260
+ start = end
261
+ end += 32
262
+ self.right_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
263
+ start = end
264
+ end += 24
265
+ self.right_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
266
+ start = end
267
+ end += 4
268
+ (length,) = _struct_I.unpack(str[start:end])
269
+ pattern = '<%sd'%length
270
+ start = end
271
+ s = struct.Struct(pattern)
272
+ end += s.size
273
+ self.right_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
274
+ return self
275
+ except struct.error as e:
276
+ raise genpy.DeserializationError(e) # most likely buffer underfill
277
+
278
+ _struct_I = genpy.struct_I
279
+ def _get_struct_I():
280
+ global _struct_I
281
+ return _struct_I
282
+ _struct_3I = None
283
+ def _get_struct_3I():
284
+ global _struct_3I
285
+ if _struct_3I is None:
286
+ _struct_3I = struct.Struct("<3I")
287
+ return _struct_3I
288
+ _struct_3d = None
289
+ def _get_struct_3d():
290
+ global _struct_3d
291
+ if _struct_3d is None:
292
+ _struct_3d = struct.Struct("<3d")
293
+ return _struct_3d
294
+ _struct_4d = None
295
+ def _get_struct_4d():
296
+ global _struct_4d
297
+ if _struct_4d is None:
298
+ _struct_4d = struct.Struct("<4d")
299
+ return _struct_4d
@@ -0,0 +1,251 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/yoloDetection.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 kuavo_msgs.msg
10
+ import std_msgs.msg
11
+
12
+ class yoloDetection(genpy.Message):
13
+ _md5sum = "442f2c4723f0369e79b97b3e674354d8"
14
+ _type = "kuavo_msgs/yoloDetection"
15
+ _has_header = True # flag to mark the presence of a Header object
16
+ _full_text = """std_msgs/Header header
17
+ yoloOutputData[] data
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
+ ================================================================================
35
+ MSG: kuavo_msgs/yoloOutputData
36
+ string class_name
37
+ int32 class_id
38
+ float32 confidence
39
+ float32 x_pos
40
+ float32 y_pos
41
+ float32 height
42
+ float32 width"""
43
+ __slots__ = ['header','data']
44
+ _slot_types = ['std_msgs/Header','kuavo_msgs/yoloOutputData[]']
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,data
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(yoloDetection, 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.data is None:
66
+ self.data = []
67
+ else:
68
+ self.header = std_msgs.msg.Header()
69
+ self.data = []
70
+
71
+ def _get_types(self):
72
+ """
73
+ internal API method
74
+ """
75
+ return self._slot_types
76
+
77
+ def serialize(self, buff):
78
+ """
79
+ serialize message into buffer
80
+ :param buff: buffer, ``StringIO``
81
+ """
82
+ try:
83
+ _x = self
84
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
85
+ _x = self.header.frame_id
86
+ length = len(_x)
87
+ if python3 or type(_x) == unicode:
88
+ _x = _x.encode('utf-8')
89
+ length = len(_x)
90
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
91
+ length = len(self.data)
92
+ buff.write(_struct_I.pack(length))
93
+ for val1 in self.data:
94
+ _x = val1.class_name
95
+ length = len(_x)
96
+ if python3 or type(_x) == unicode:
97
+ _x = _x.encode('utf-8')
98
+ length = len(_x)
99
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
100
+ _x = val1
101
+ buff.write(_get_struct_i5f().pack(_x.class_id, _x.confidence, _x.x_pos, _x.y_pos, _x.height, _x.width))
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.data is None:
116
+ self.data = None
117
+ end = 0
118
+ _x = self
119
+ start = end
120
+ end += 12
121
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
122
+ start = end
123
+ end += 4
124
+ (length,) = _struct_I.unpack(str[start:end])
125
+ start = end
126
+ end += length
127
+ if python3:
128
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
129
+ else:
130
+ self.header.frame_id = str[start:end]
131
+ start = end
132
+ end += 4
133
+ (length,) = _struct_I.unpack(str[start:end])
134
+ self.data = []
135
+ for i in range(0, length):
136
+ val1 = kuavo_msgs.msg.yoloOutputData()
137
+ start = end
138
+ end += 4
139
+ (length,) = _struct_I.unpack(str[start:end])
140
+ start = end
141
+ end += length
142
+ if python3:
143
+ val1.class_name = str[start:end].decode('utf-8', 'rosmsg')
144
+ else:
145
+ val1.class_name = str[start:end]
146
+ _x = val1
147
+ start = end
148
+ end += 24
149
+ (_x.class_id, _x.confidence, _x.x_pos, _x.y_pos, _x.height, _x.width,) = _get_struct_i5f().unpack(str[start:end])
150
+ self.data.append(val1)
151
+ return self
152
+ except struct.error as e:
153
+ raise genpy.DeserializationError(e) # most likely buffer underfill
154
+
155
+
156
+ def serialize_numpy(self, buff, numpy):
157
+ """
158
+ serialize message with numpy array types into buffer
159
+ :param buff: buffer, ``StringIO``
160
+ :param numpy: numpy python module
161
+ """
162
+ try:
163
+ _x = self
164
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
165
+ _x = self.header.frame_id
166
+ length = len(_x)
167
+ if python3 or type(_x) == unicode:
168
+ _x = _x.encode('utf-8')
169
+ length = len(_x)
170
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
171
+ length = len(self.data)
172
+ buff.write(_struct_I.pack(length))
173
+ for val1 in self.data:
174
+ _x = val1.class_name
175
+ length = len(_x)
176
+ if python3 or type(_x) == unicode:
177
+ _x = _x.encode('utf-8')
178
+ length = len(_x)
179
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
180
+ _x = val1
181
+ buff.write(_get_struct_i5f().pack(_x.class_id, _x.confidence, _x.x_pos, _x.y_pos, _x.height, _x.width))
182
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
183
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
184
+
185
+ def deserialize_numpy(self, str, numpy):
186
+ """
187
+ unpack serialized message in str into this message instance using numpy for array types
188
+ :param str: byte array of serialized message, ``str``
189
+ :param numpy: numpy python module
190
+ """
191
+ if python3:
192
+ codecs.lookup_error("rosmsg").msg_type = self._type
193
+ try:
194
+ if self.header is None:
195
+ self.header = std_msgs.msg.Header()
196
+ if self.data is None:
197
+ self.data = None
198
+ end = 0
199
+ _x = self
200
+ start = end
201
+ end += 12
202
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
203
+ start = end
204
+ end += 4
205
+ (length,) = _struct_I.unpack(str[start:end])
206
+ start = end
207
+ end += length
208
+ if python3:
209
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
210
+ else:
211
+ self.header.frame_id = str[start:end]
212
+ start = end
213
+ end += 4
214
+ (length,) = _struct_I.unpack(str[start:end])
215
+ self.data = []
216
+ for i in range(0, length):
217
+ val1 = kuavo_msgs.msg.yoloOutputData()
218
+ start = end
219
+ end += 4
220
+ (length,) = _struct_I.unpack(str[start:end])
221
+ start = end
222
+ end += length
223
+ if python3:
224
+ val1.class_name = str[start:end].decode('utf-8', 'rosmsg')
225
+ else:
226
+ val1.class_name = str[start:end]
227
+ _x = val1
228
+ start = end
229
+ end += 24
230
+ (_x.class_id, _x.confidence, _x.x_pos, _x.y_pos, _x.height, _x.width,) = _get_struct_i5f().unpack(str[start:end])
231
+ self.data.append(val1)
232
+ return self
233
+ except struct.error as e:
234
+ raise genpy.DeserializationError(e) # most likely buffer underfill
235
+
236
+ _struct_I = genpy.struct_I
237
+ def _get_struct_I():
238
+ global _struct_I
239
+ return _struct_I
240
+ _struct_3I = None
241
+ def _get_struct_3I():
242
+ global _struct_3I
243
+ if _struct_3I is None:
244
+ _struct_3I = struct.Struct("<3I")
245
+ return _struct_3I
246
+ _struct_i5f = None
247
+ def _get_struct_i5f():
248
+ global _struct_i5f
249
+ if _struct_i5f is None:
250
+ _struct_i5f = struct.Struct("<i5f")
251
+ return _struct_i5f