kuavo-humanoid-sdk 1.2.2b3208__20250922170818-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 (186) 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 +16 -0
  9. kuavo_humanoid_sdk/kuavo/core/audio.py +32 -0
  10. kuavo_humanoid_sdk/kuavo/core/core.py +666 -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/llm_doubao.py +608 -0
  14. kuavo_humanoid_sdk/kuavo/core/microphone.py +192 -0
  15. kuavo_humanoid_sdk/kuavo/core/navigation.py +70 -0
  16. kuavo_humanoid_sdk/kuavo/core/ros/audio.py +110 -0
  17. kuavo_humanoid_sdk/kuavo/core/ros/camera.py +105 -0
  18. kuavo_humanoid_sdk/kuavo/core/ros/control.py +1524 -0
  19. kuavo_humanoid_sdk/kuavo/core/ros/microphone.py +38 -0
  20. kuavo_humanoid_sdk/kuavo/core/ros/navigation.py +217 -0
  21. kuavo_humanoid_sdk/kuavo/core/ros/observation.py +94 -0
  22. kuavo_humanoid_sdk/kuavo/core/ros/param.py +201 -0
  23. kuavo_humanoid_sdk/kuavo/core/ros/sat_utils.py +103 -0
  24. kuavo_humanoid_sdk/kuavo/core/ros/state.py +652 -0
  25. kuavo_humanoid_sdk/kuavo/core/ros/tools.py +220 -0
  26. kuavo_humanoid_sdk/kuavo/core/ros/vision.py +234 -0
  27. kuavo_humanoid_sdk/kuavo/core/ros_env.py +238 -0
  28. kuavo_humanoid_sdk/kuavo/core/sdk_deprecated.py +41 -0
  29. kuavo_humanoid_sdk/kuavo/demo_climbstair.py +249 -0
  30. kuavo_humanoid_sdk/kuavo/dexterous_hand.py +238 -0
  31. kuavo_humanoid_sdk/kuavo/leju_claw.py +235 -0
  32. kuavo_humanoid_sdk/kuavo/logger_client.py +80 -0
  33. kuavo_humanoid_sdk/kuavo/robot.py +646 -0
  34. kuavo_humanoid_sdk/kuavo/robot_arm.py +411 -0
  35. kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
  36. kuavo_humanoid_sdk/kuavo/robot_blockly.py +1154 -0
  37. kuavo_humanoid_sdk/kuavo/robot_climbstair.py +1607 -0
  38. kuavo_humanoid_sdk/kuavo/robot_head.py +95 -0
  39. kuavo_humanoid_sdk/kuavo/robot_info.py +134 -0
  40. kuavo_humanoid_sdk/kuavo/robot_microphone.py +19 -0
  41. kuavo_humanoid_sdk/kuavo/robot_navigation.py +135 -0
  42. kuavo_humanoid_sdk/kuavo/robot_observation.py +64 -0
  43. kuavo_humanoid_sdk/kuavo/robot_speech.py +24 -0
  44. kuavo_humanoid_sdk/kuavo/robot_state.py +310 -0
  45. kuavo_humanoid_sdk/kuavo/robot_tool.py +109 -0
  46. kuavo_humanoid_sdk/kuavo/robot_vision.py +81 -0
  47. kuavo_humanoid_sdk/kuavo_strategy/__init__.py +2 -0
  48. kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +1325 -0
  49. kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +106 -0
  50. kuavo_humanoid_sdk/kuavo_strategy_v2/common/data_type.py +340 -0
  51. kuavo_humanoid_sdk/kuavo_strategy_v2/common/events/base_event.py +215 -0
  52. kuavo_humanoid_sdk/kuavo_strategy_v2/common/robot_sdk.py +25 -0
  53. kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/case.py +331 -0
  54. kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/strategy.py +504 -0
  55. kuavo_humanoid_sdk/kuavo_strategy_v2/utils/logger_setup.py +40 -0
  56. kuavo_humanoid_sdk/kuavo_strategy_v2/utils/utils.py +88 -0
  57. kuavo_humanoid_sdk/msg/__init__.py +4 -0
  58. kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
  59. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetection.py +306 -0
  60. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetectionArray.py +437 -0
  61. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AudioReceiverData.py +122 -0
  62. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_FTsensorData.py +260 -0
  63. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_JoySticks.py +191 -0
  64. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  65. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_MmDetectionMsg.py +264 -0
  66. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
  67. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
  68. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TaskPoint.py +175 -0
  69. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +62 -0
  70. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armCollisionCheckInfo.py +160 -0
  71. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +161 -0
  72. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
  73. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  74. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +171 -0
  75. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
  76. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  77. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  78. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  79. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
  80. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6D.py +123 -0
  81. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6DTargetTrajectories.py +320 -0
  82. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
  83. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVision.py +136 -0
  84. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVisionArray.py +231 -0
  85. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
  86. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses6D.py +149 -0
  87. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
  88. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  89. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  90. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  91. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
  92. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  93. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
  94. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
  95. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  96. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
  97. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  98. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  99. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_kuavoModeSchedule.py +224 -0
  100. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  101. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  102. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
  103. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfo.py +143 -0
  104. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfoList.py +220 -0
  105. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
  106. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
  107. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
  108. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotBodyMatrices.py +332 -0
  109. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  110. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  111. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  112. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +655 -0
  113. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  114. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_tagDataArray.py +216 -0
  115. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  116. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +273 -0
  117. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +316 -0
  118. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
  119. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
  120. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  121. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  122. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_CreatePath.py +581 -0
  123. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
  124. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetAllMaps.py +241 -0
  125. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetCurrentMap.py +225 -0
  126. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetTargetPartPoseInCamera.py +298 -0
  127. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_InitialPoseWithTaskPoint.py +281 -0
  128. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_LoadMap.py +281 -0
  129. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_NavigateToTaskPoint.py +281 -0
  130. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
  131. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetInitialPose.py +394 -0
  132. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
  133. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode.py +468 -0
  134. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode_free.py +289 -0
  135. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
  136. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_TaskPointOperation.py +536 -0
  137. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +43 -0
  138. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_adjustZeroPoint.py +277 -0
  139. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  140. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
  141. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
  142. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  143. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  144. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  145. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +395 -0
  146. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPose6DTargetTrajectoriesSrv.py +426 -0
  147. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
  148. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  149. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  150. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  151. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  152. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
  153. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorZeroPoints.py +286 -0
  154. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  155. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  156. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +422 -0
  157. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
  158. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
  159. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  160. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
  161. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  162. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  163. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
  164. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
  165. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +664 -0
  166. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  167. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  168. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  169. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  170. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  171. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  172. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  173. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  174. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  175. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  176. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  177. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  178. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  179. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  180. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  181. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  182. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  183. kuavo_humanoid_sdk-1.2.2b3208.dist-info/METADATA +297 -0
  184. kuavo_humanoid_sdk-1.2.2b3208.dist-info/RECORD +186 -0
  185. kuavo_humanoid_sdk-1.2.2b3208.dist-info/WHEEL +6 -0
  186. kuavo_humanoid_sdk-1.2.2b3208.dist-info/top_level.txt +1 -0
@@ -0,0 +1,332 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/robotBodyMatrices.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 genpy
10
+ import std_msgs.msg
11
+
12
+ class robotBodyMatrices(genpy.Message):
13
+ _md5sum = "8e448e11a251e177feb29dc5f6298be7"
14
+ _type = "kuavo_msgs/robotBodyMatrices"
15
+ _has_header = True # flag to mark the presence of a Header object
16
+ _full_text = """# robotBodyMatrices.msg
17
+ Header header
18
+
19
+ # 时间戳
20
+ time timestamp
21
+
22
+ # 矩阵数据 - 每个矩阵是4x4的齐次变换矩阵,展平为16个float64
23
+ float64[] matrices_data
24
+
25
+ # 矩阵数量
26
+ uint32 num_matrices
27
+
28
+ # 身体部位名称列表
29
+ string[] body_parts
30
+
31
+ # 数据来源标识
32
+ string data_source
33
+
34
+ ================================================================================
35
+ MSG: std_msgs/Header
36
+ # Standard metadata for higher-level stamped data types.
37
+ # This is generally used to communicate timestamped data
38
+ # in a particular coordinate frame.
39
+ #
40
+ # sequence ID: consecutively increasing ID
41
+ uint32 seq
42
+ #Two-integer timestamp that is expressed as:
43
+ # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
44
+ # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
45
+ # time-handling sugar is provided by the client library
46
+ time stamp
47
+ #Frame this data is associated with
48
+ string frame_id
49
+ """
50
+ __slots__ = ['header','timestamp','matrices_data','num_matrices','body_parts','data_source']
51
+ _slot_types = ['std_msgs/Header','time','float64[]','uint32','string[]','string']
52
+
53
+ def __init__(self, *args, **kwds):
54
+ """
55
+ Constructor. Any message fields that are implicitly/explicitly
56
+ set to None will be assigned a default value. The recommend
57
+ use is keyword arguments as this is more robust to future message
58
+ changes. You cannot mix in-order arguments and keyword arguments.
59
+
60
+ The available fields are:
61
+ header,timestamp,matrices_data,num_matrices,body_parts,data_source
62
+
63
+ :param args: complete set of field values, in .msg order
64
+ :param kwds: use keyword arguments corresponding to message field names
65
+ to set specific fields.
66
+ """
67
+ if args or kwds:
68
+ super(robotBodyMatrices, self).__init__(*args, **kwds)
69
+ # message fields cannot be None, assign default values for those that are
70
+ if self.header is None:
71
+ self.header = std_msgs.msg.Header()
72
+ if self.timestamp is None:
73
+ self.timestamp = genpy.Time()
74
+ if self.matrices_data is None:
75
+ self.matrices_data = []
76
+ if self.num_matrices is None:
77
+ self.num_matrices = 0
78
+ if self.body_parts is None:
79
+ self.body_parts = []
80
+ if self.data_source is None:
81
+ self.data_source = ''
82
+ else:
83
+ self.header = std_msgs.msg.Header()
84
+ self.timestamp = genpy.Time()
85
+ self.matrices_data = []
86
+ self.num_matrices = 0
87
+ self.body_parts = []
88
+ self.data_source = ''
89
+
90
+ def _get_types(self):
91
+ """
92
+ internal API method
93
+ """
94
+ return self._slot_types
95
+
96
+ def serialize(self, buff):
97
+ """
98
+ serialize message into buffer
99
+ :param buff: buffer, ``StringIO``
100
+ """
101
+ try:
102
+ _x = self
103
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
104
+ _x = self.header.frame_id
105
+ length = len(_x)
106
+ if python3 or type(_x) == unicode:
107
+ _x = _x.encode('utf-8')
108
+ length = len(_x)
109
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
110
+ _x = self
111
+ buff.write(_get_struct_2I().pack(_x.timestamp.secs, _x.timestamp.nsecs))
112
+ length = len(self.matrices_data)
113
+ buff.write(_struct_I.pack(length))
114
+ pattern = '<%sd'%length
115
+ buff.write(struct.Struct(pattern).pack(*self.matrices_data))
116
+ _x = self.num_matrices
117
+ buff.write(_get_struct_I().pack(_x))
118
+ length = len(self.body_parts)
119
+ buff.write(_struct_I.pack(length))
120
+ for val1 in self.body_parts:
121
+ length = len(val1)
122
+ if python3 or type(val1) == unicode:
123
+ val1 = val1.encode('utf-8')
124
+ length = len(val1)
125
+ buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
126
+ _x = self.data_source
127
+ length = len(_x)
128
+ if python3 or type(_x) == unicode:
129
+ _x = _x.encode('utf-8')
130
+ length = len(_x)
131
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
132
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
133
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
134
+
135
+ def deserialize(self, str):
136
+ """
137
+ unpack serialized message in str into this message instance
138
+ :param str: byte array of serialized message, ``str``
139
+ """
140
+ if python3:
141
+ codecs.lookup_error("rosmsg").msg_type = self._type
142
+ try:
143
+ if self.header is None:
144
+ self.header = std_msgs.msg.Header()
145
+ if self.timestamp is None:
146
+ self.timestamp = genpy.Time()
147
+ end = 0
148
+ _x = self
149
+ start = end
150
+ end += 12
151
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
152
+ start = end
153
+ end += 4
154
+ (length,) = _struct_I.unpack(str[start:end])
155
+ start = end
156
+ end += length
157
+ if python3:
158
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
159
+ else:
160
+ self.header.frame_id = str[start:end]
161
+ _x = self
162
+ start = end
163
+ end += 8
164
+ (_x.timestamp.secs, _x.timestamp.nsecs,) = _get_struct_2I().unpack(str[start:end])
165
+ start = end
166
+ end += 4
167
+ (length,) = _struct_I.unpack(str[start:end])
168
+ pattern = '<%sd'%length
169
+ start = end
170
+ s = struct.Struct(pattern)
171
+ end += s.size
172
+ self.matrices_data = s.unpack(str[start:end])
173
+ start = end
174
+ end += 4
175
+ (self.num_matrices,) = _get_struct_I().unpack(str[start:end])
176
+ start = end
177
+ end += 4
178
+ (length,) = _struct_I.unpack(str[start:end])
179
+ self.body_parts = []
180
+ for i in range(0, length):
181
+ start = end
182
+ end += 4
183
+ (length,) = _struct_I.unpack(str[start:end])
184
+ start = end
185
+ end += length
186
+ if python3:
187
+ val1 = str[start:end].decode('utf-8', 'rosmsg')
188
+ else:
189
+ val1 = str[start:end]
190
+ self.body_parts.append(val1)
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.data_source = str[start:end].decode('utf-8', 'rosmsg')
198
+ else:
199
+ self.data_source = str[start:end]
200
+ self.timestamp.canon()
201
+ return self
202
+ except struct.error as e:
203
+ raise genpy.DeserializationError(e) # most likely buffer underfill
204
+
205
+
206
+ def serialize_numpy(self, buff, numpy):
207
+ """
208
+ serialize message with numpy array types into buffer
209
+ :param buff: buffer, ``StringIO``
210
+ :param numpy: numpy python module
211
+ """
212
+ try:
213
+ _x = self
214
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
215
+ _x = self.header.frame_id
216
+ length = len(_x)
217
+ if python3 or type(_x) == unicode:
218
+ _x = _x.encode('utf-8')
219
+ length = len(_x)
220
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
221
+ _x = self
222
+ buff.write(_get_struct_2I().pack(_x.timestamp.secs, _x.timestamp.nsecs))
223
+ length = len(self.matrices_data)
224
+ buff.write(_struct_I.pack(length))
225
+ pattern = '<%sd'%length
226
+ buff.write(self.matrices_data.tostring())
227
+ _x = self.num_matrices
228
+ buff.write(_get_struct_I().pack(_x))
229
+ length = len(self.body_parts)
230
+ buff.write(_struct_I.pack(length))
231
+ for val1 in self.body_parts:
232
+ length = len(val1)
233
+ if python3 or type(val1) == unicode:
234
+ val1 = val1.encode('utf-8')
235
+ length = len(val1)
236
+ buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
237
+ _x = self.data_source
238
+ length = len(_x)
239
+ if python3 or type(_x) == unicode:
240
+ _x = _x.encode('utf-8')
241
+ length = len(_x)
242
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
243
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
244
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
245
+
246
+ def deserialize_numpy(self, str, numpy):
247
+ """
248
+ unpack serialized message in str into this message instance using numpy for array types
249
+ :param str: byte array of serialized message, ``str``
250
+ :param numpy: numpy python module
251
+ """
252
+ if python3:
253
+ codecs.lookup_error("rosmsg").msg_type = self._type
254
+ try:
255
+ if self.header is None:
256
+ self.header = std_msgs.msg.Header()
257
+ if self.timestamp is None:
258
+ self.timestamp = genpy.Time()
259
+ end = 0
260
+ _x = self
261
+ start = end
262
+ end += 12
263
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
264
+ start = end
265
+ end += 4
266
+ (length,) = _struct_I.unpack(str[start:end])
267
+ start = end
268
+ end += length
269
+ if python3:
270
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
271
+ else:
272
+ self.header.frame_id = str[start:end]
273
+ _x = self
274
+ start = end
275
+ end += 8
276
+ (_x.timestamp.secs, _x.timestamp.nsecs,) = _get_struct_2I().unpack(str[start:end])
277
+ start = end
278
+ end += 4
279
+ (length,) = _struct_I.unpack(str[start:end])
280
+ pattern = '<%sd'%length
281
+ start = end
282
+ s = struct.Struct(pattern)
283
+ end += s.size
284
+ self.matrices_data = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
285
+ start = end
286
+ end += 4
287
+ (self.num_matrices,) = _get_struct_I().unpack(str[start:end])
288
+ start = end
289
+ end += 4
290
+ (length,) = _struct_I.unpack(str[start:end])
291
+ self.body_parts = []
292
+ for i in range(0, length):
293
+ start = end
294
+ end += 4
295
+ (length,) = _struct_I.unpack(str[start:end])
296
+ start = end
297
+ end += length
298
+ if python3:
299
+ val1 = str[start:end].decode('utf-8', 'rosmsg')
300
+ else:
301
+ val1 = str[start:end]
302
+ self.body_parts.append(val1)
303
+ start = end
304
+ end += 4
305
+ (length,) = _struct_I.unpack(str[start:end])
306
+ start = end
307
+ end += length
308
+ if python3:
309
+ self.data_source = str[start:end].decode('utf-8', 'rosmsg')
310
+ else:
311
+ self.data_source = str[start:end]
312
+ self.timestamp.canon()
313
+ return self
314
+ except struct.error as e:
315
+ raise genpy.DeserializationError(e) # most likely buffer underfill
316
+
317
+ _struct_I = genpy.struct_I
318
+ def _get_struct_I():
319
+ global _struct_I
320
+ return _struct_I
321
+ _struct_2I = None
322
+ def _get_struct_2I():
323
+ global _struct_2I
324
+ if _struct_2I is None:
325
+ _struct_2I = struct.Struct("<2I")
326
+ return _struct_2I
327
+ _struct_3I = None
328
+ def _get_struct_3I():
329
+ global _struct_3I
330
+ if _struct_3I is None:
331
+ _struct_3I = struct.Struct("<3I")
332
+ return _struct_3I
@@ -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