kuavo-humanoid-sdk 1.2.1b3321__20250917182547-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.1b3321.dist-info/METADATA +297 -0
  184. kuavo_humanoid_sdk-1.2.1b3321.dist-info/RECORD +186 -0
  185. kuavo_humanoid_sdk-1.2.1b3321.dist-info/WHEEL +6 -0
  186. kuavo_humanoid_sdk-1.2.1b3321.dist-info/top_level.txt +1 -0
@@ -0,0 +1,390 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/jointCmd.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 jointCmd(genpy.Message):
12
+ _md5sum = "9ed16f87b9f90b25cdeeb417f3c21f9e"
13
+ _type = "kuavo_msgs/jointCmd"
14
+ _has_header = True # flag to mark the presence of a Header object
15
+ _full_text = """std_msgs/Header header
16
+ float64[] joint_q
17
+ float64[] joint_v
18
+ float64[] tau
19
+ float64[] tau_max
20
+ float64[] tau_ratio
21
+ float64[] joint_kp
22
+ float64[] joint_kd
23
+ int32[] control_modes
24
+
25
+ ================================================================================
26
+ MSG: std_msgs/Header
27
+ # Standard metadata for higher-level stamped data types.
28
+ # This is generally used to communicate timestamped data
29
+ # in a particular coordinate frame.
30
+ #
31
+ # sequence ID: consecutively increasing ID
32
+ uint32 seq
33
+ #Two-integer timestamp that is expressed as:
34
+ # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
35
+ # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
36
+ # time-handling sugar is provided by the client library
37
+ time stamp
38
+ #Frame this data is associated with
39
+ string frame_id
40
+ """
41
+ __slots__ = ['header','joint_q','joint_v','tau','tau_max','tau_ratio','joint_kp','joint_kd','control_modes']
42
+ _slot_types = ['std_msgs/Header','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','int32[]']
43
+
44
+ def __init__(self, *args, **kwds):
45
+ """
46
+ Constructor. Any message fields that are implicitly/explicitly
47
+ set to None will be assigned a default value. The recommend
48
+ use is keyword arguments as this is more robust to future message
49
+ changes. You cannot mix in-order arguments and keyword arguments.
50
+
51
+ The available fields are:
52
+ header,joint_q,joint_v,tau,tau_max,tau_ratio,joint_kp,joint_kd,control_modes
53
+
54
+ :param args: complete set of field values, in .msg order
55
+ :param kwds: use keyword arguments corresponding to message field names
56
+ to set specific fields.
57
+ """
58
+ if args or kwds:
59
+ super(jointCmd, self).__init__(*args, **kwds)
60
+ # message fields cannot be None, assign default values for those that are
61
+ if self.header is None:
62
+ self.header = std_msgs.msg.Header()
63
+ if self.joint_q is None:
64
+ self.joint_q = []
65
+ if self.joint_v is None:
66
+ self.joint_v = []
67
+ if self.tau is None:
68
+ self.tau = []
69
+ if self.tau_max is None:
70
+ self.tau_max = []
71
+ if self.tau_ratio is None:
72
+ self.tau_ratio = []
73
+ if self.joint_kp is None:
74
+ self.joint_kp = []
75
+ if self.joint_kd is None:
76
+ self.joint_kd = []
77
+ if self.control_modes is None:
78
+ self.control_modes = []
79
+ else:
80
+ self.header = std_msgs.msg.Header()
81
+ self.joint_q = []
82
+ self.joint_v = []
83
+ self.tau = []
84
+ self.tau_max = []
85
+ self.tau_ratio = []
86
+ self.joint_kp = []
87
+ self.joint_kd = []
88
+ self.control_modes = []
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
+ length = len(self.joint_q)
111
+ buff.write(_struct_I.pack(length))
112
+ pattern = '<%sd'%length
113
+ buff.write(struct.Struct(pattern).pack(*self.joint_q))
114
+ length = len(self.joint_v)
115
+ buff.write(_struct_I.pack(length))
116
+ pattern = '<%sd'%length
117
+ buff.write(struct.Struct(pattern).pack(*self.joint_v))
118
+ length = len(self.tau)
119
+ buff.write(_struct_I.pack(length))
120
+ pattern = '<%sd'%length
121
+ buff.write(struct.Struct(pattern).pack(*self.tau))
122
+ length = len(self.tau_max)
123
+ buff.write(_struct_I.pack(length))
124
+ pattern = '<%sd'%length
125
+ buff.write(struct.Struct(pattern).pack(*self.tau_max))
126
+ length = len(self.tau_ratio)
127
+ buff.write(_struct_I.pack(length))
128
+ pattern = '<%sd'%length
129
+ buff.write(struct.Struct(pattern).pack(*self.tau_ratio))
130
+ length = len(self.joint_kp)
131
+ buff.write(_struct_I.pack(length))
132
+ pattern = '<%sd'%length
133
+ buff.write(struct.Struct(pattern).pack(*self.joint_kp))
134
+ length = len(self.joint_kd)
135
+ buff.write(_struct_I.pack(length))
136
+ pattern = '<%sd'%length
137
+ buff.write(struct.Struct(pattern).pack(*self.joint_kd))
138
+ length = len(self.control_modes)
139
+ buff.write(_struct_I.pack(length))
140
+ pattern = '<%si'%length
141
+ buff.write(struct.Struct(pattern).pack(*self.control_modes))
142
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
143
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
144
+
145
+ def deserialize(self, str):
146
+ """
147
+ unpack serialized message in str into this message instance
148
+ :param str: byte array of serialized message, ``str``
149
+ """
150
+ if python3:
151
+ codecs.lookup_error("rosmsg").msg_type = self._type
152
+ try:
153
+ if self.header is None:
154
+ self.header = std_msgs.msg.Header()
155
+ end = 0
156
+ _x = self
157
+ start = end
158
+ end += 12
159
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
160
+ start = end
161
+ end += 4
162
+ (length,) = _struct_I.unpack(str[start:end])
163
+ start = end
164
+ end += length
165
+ if python3:
166
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
167
+ else:
168
+ self.header.frame_id = str[start:end]
169
+ start = end
170
+ end += 4
171
+ (length,) = _struct_I.unpack(str[start:end])
172
+ pattern = '<%sd'%length
173
+ start = end
174
+ s = struct.Struct(pattern)
175
+ end += s.size
176
+ self.joint_q = s.unpack(str[start:end])
177
+ start = end
178
+ end += 4
179
+ (length,) = _struct_I.unpack(str[start:end])
180
+ pattern = '<%sd'%length
181
+ start = end
182
+ s = struct.Struct(pattern)
183
+ end += s.size
184
+ self.joint_v = s.unpack(str[start:end])
185
+ start = end
186
+ end += 4
187
+ (length,) = _struct_I.unpack(str[start:end])
188
+ pattern = '<%sd'%length
189
+ start = end
190
+ s = struct.Struct(pattern)
191
+ end += s.size
192
+ self.tau = s.unpack(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.tau_max = s.unpack(str[start:end])
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.tau_ratio = s.unpack(str[start:end])
209
+ start = end
210
+ end += 4
211
+ (length,) = _struct_I.unpack(str[start:end])
212
+ pattern = '<%sd'%length
213
+ start = end
214
+ s = struct.Struct(pattern)
215
+ end += s.size
216
+ self.joint_kp = s.unpack(str[start:end])
217
+ start = end
218
+ end += 4
219
+ (length,) = _struct_I.unpack(str[start:end])
220
+ pattern = '<%sd'%length
221
+ start = end
222
+ s = struct.Struct(pattern)
223
+ end += s.size
224
+ self.joint_kd = s.unpack(str[start:end])
225
+ start = end
226
+ end += 4
227
+ (length,) = _struct_I.unpack(str[start:end])
228
+ pattern = '<%si'%length
229
+ start = end
230
+ s = struct.Struct(pattern)
231
+ end += s.size
232
+ self.control_modes = s.unpack(str[start:end])
233
+ return self
234
+ except struct.error as e:
235
+ raise genpy.DeserializationError(e) # most likely buffer underfill
236
+
237
+
238
+ def serialize_numpy(self, buff, numpy):
239
+ """
240
+ serialize message with numpy array types into buffer
241
+ :param buff: buffer, ``StringIO``
242
+ :param numpy: numpy python module
243
+ """
244
+ try:
245
+ _x = self
246
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
247
+ _x = self.header.frame_id
248
+ length = len(_x)
249
+ if python3 or type(_x) == unicode:
250
+ _x = _x.encode('utf-8')
251
+ length = len(_x)
252
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
253
+ length = len(self.joint_q)
254
+ buff.write(_struct_I.pack(length))
255
+ pattern = '<%sd'%length
256
+ buff.write(self.joint_q.tostring())
257
+ length = len(self.joint_v)
258
+ buff.write(_struct_I.pack(length))
259
+ pattern = '<%sd'%length
260
+ buff.write(self.joint_v.tostring())
261
+ length = len(self.tau)
262
+ buff.write(_struct_I.pack(length))
263
+ pattern = '<%sd'%length
264
+ buff.write(self.tau.tostring())
265
+ length = len(self.tau_max)
266
+ buff.write(_struct_I.pack(length))
267
+ pattern = '<%sd'%length
268
+ buff.write(self.tau_max.tostring())
269
+ length = len(self.tau_ratio)
270
+ buff.write(_struct_I.pack(length))
271
+ pattern = '<%sd'%length
272
+ buff.write(self.tau_ratio.tostring())
273
+ length = len(self.joint_kp)
274
+ buff.write(_struct_I.pack(length))
275
+ pattern = '<%sd'%length
276
+ buff.write(self.joint_kp.tostring())
277
+ length = len(self.joint_kd)
278
+ buff.write(_struct_I.pack(length))
279
+ pattern = '<%sd'%length
280
+ buff.write(self.joint_kd.tostring())
281
+ length = len(self.control_modes)
282
+ buff.write(_struct_I.pack(length))
283
+ pattern = '<%si'%length
284
+ buff.write(self.control_modes.tostring())
285
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
286
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
287
+
288
+ def deserialize_numpy(self, str, numpy):
289
+ """
290
+ unpack serialized message in str into this message instance using numpy for array types
291
+ :param str: byte array of serialized message, ``str``
292
+ :param numpy: numpy python module
293
+ """
294
+ if python3:
295
+ codecs.lookup_error("rosmsg").msg_type = self._type
296
+ try:
297
+ if self.header is None:
298
+ self.header = std_msgs.msg.Header()
299
+ end = 0
300
+ _x = self
301
+ start = end
302
+ end += 12
303
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
304
+ start = end
305
+ end += 4
306
+ (length,) = _struct_I.unpack(str[start:end])
307
+ start = end
308
+ end += length
309
+ if python3:
310
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
311
+ else:
312
+ self.header.frame_id = str[start:end]
313
+ start = end
314
+ end += 4
315
+ (length,) = _struct_I.unpack(str[start:end])
316
+ pattern = '<%sd'%length
317
+ start = end
318
+ s = struct.Struct(pattern)
319
+ end += s.size
320
+ self.joint_q = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
321
+ start = end
322
+ end += 4
323
+ (length,) = _struct_I.unpack(str[start:end])
324
+ pattern = '<%sd'%length
325
+ start = end
326
+ s = struct.Struct(pattern)
327
+ end += s.size
328
+ self.joint_v = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
329
+ start = end
330
+ end += 4
331
+ (length,) = _struct_I.unpack(str[start:end])
332
+ pattern = '<%sd'%length
333
+ start = end
334
+ s = struct.Struct(pattern)
335
+ end += s.size
336
+ self.tau = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
337
+ start = end
338
+ end += 4
339
+ (length,) = _struct_I.unpack(str[start:end])
340
+ pattern = '<%sd'%length
341
+ start = end
342
+ s = struct.Struct(pattern)
343
+ end += s.size
344
+ self.tau_max = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
345
+ start = end
346
+ end += 4
347
+ (length,) = _struct_I.unpack(str[start:end])
348
+ pattern = '<%sd'%length
349
+ start = end
350
+ s = struct.Struct(pattern)
351
+ end += s.size
352
+ self.tau_ratio = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
353
+ start = end
354
+ end += 4
355
+ (length,) = _struct_I.unpack(str[start:end])
356
+ pattern = '<%sd'%length
357
+ start = end
358
+ s = struct.Struct(pattern)
359
+ end += s.size
360
+ self.joint_kp = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
361
+ start = end
362
+ end += 4
363
+ (length,) = _struct_I.unpack(str[start:end])
364
+ pattern = '<%sd'%length
365
+ start = end
366
+ s = struct.Struct(pattern)
367
+ end += s.size
368
+ self.joint_kd = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
369
+ start = end
370
+ end += 4
371
+ (length,) = _struct_I.unpack(str[start:end])
372
+ pattern = '<%si'%length
373
+ start = end
374
+ s = struct.Struct(pattern)
375
+ end += s.size
376
+ self.control_modes = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
377
+ return self
378
+ except struct.error as e:
379
+ raise genpy.DeserializationError(e) # most likely buffer underfill
380
+
381
+ _struct_I = genpy.struct_I
382
+ def _get_struct_I():
383
+ global _struct_I
384
+ return _struct_I
385
+ _struct_3I = None
386
+ def _get_struct_3I():
387
+ global _struct_3I
388
+ if _struct_3I is None:
389
+ _struct_3I = struct.Struct("<3I")
390
+ return _struct_3I
@@ -0,0 +1,205 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/jointData.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 jointData(genpy.Message):
11
+ _md5sum = "2e01436cbc40e94e8fe8f54a2c4ea282"
12
+ _type = "kuavo_msgs/jointData"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """float64[] joint_q
15
+ float64[] joint_v
16
+ float64[] joint_vd
17
+ float64[] joint_torque
18
+ """
19
+ __slots__ = ['joint_q','joint_v','joint_vd','joint_torque']
20
+ _slot_types = ['float64[]','float64[]','float64[]','float64[]']
21
+
22
+ def __init__(self, *args, **kwds):
23
+ """
24
+ Constructor. Any message fields that are implicitly/explicitly
25
+ set to None will be assigned a default value. The recommend
26
+ use is keyword arguments as this is more robust to future message
27
+ changes. You cannot mix in-order arguments and keyword arguments.
28
+
29
+ The available fields are:
30
+ joint_q,joint_v,joint_vd,joint_torque
31
+
32
+ :param args: complete set of field values, in .msg order
33
+ :param kwds: use keyword arguments corresponding to message field names
34
+ to set specific fields.
35
+ """
36
+ if args or kwds:
37
+ super(jointData, self).__init__(*args, **kwds)
38
+ # message fields cannot be None, assign default values for those that are
39
+ if self.joint_q is None:
40
+ self.joint_q = []
41
+ if self.joint_v is None:
42
+ self.joint_v = []
43
+ if self.joint_vd is None:
44
+ self.joint_vd = []
45
+ if self.joint_torque is None:
46
+ self.joint_torque = []
47
+ else:
48
+ self.joint_q = []
49
+ self.joint_v = []
50
+ self.joint_vd = []
51
+ self.joint_torque = []
52
+
53
+ def _get_types(self):
54
+ """
55
+ internal API method
56
+ """
57
+ return self._slot_types
58
+
59
+ def serialize(self, buff):
60
+ """
61
+ serialize message into buffer
62
+ :param buff: buffer, ``StringIO``
63
+ """
64
+ try:
65
+ length = len(self.joint_q)
66
+ buff.write(_struct_I.pack(length))
67
+ pattern = '<%sd'%length
68
+ buff.write(struct.Struct(pattern).pack(*self.joint_q))
69
+ length = len(self.joint_v)
70
+ buff.write(_struct_I.pack(length))
71
+ pattern = '<%sd'%length
72
+ buff.write(struct.Struct(pattern).pack(*self.joint_v))
73
+ length = len(self.joint_vd)
74
+ buff.write(_struct_I.pack(length))
75
+ pattern = '<%sd'%length
76
+ buff.write(struct.Struct(pattern).pack(*self.joint_vd))
77
+ length = len(self.joint_torque)
78
+ buff.write(_struct_I.pack(length))
79
+ pattern = '<%sd'%length
80
+ buff.write(struct.Struct(pattern).pack(*self.joint_torque))
81
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
82
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
83
+
84
+ def deserialize(self, str):
85
+ """
86
+ unpack serialized message in str into this message instance
87
+ :param str: byte array of serialized message, ``str``
88
+ """
89
+ if python3:
90
+ codecs.lookup_error("rosmsg").msg_type = self._type
91
+ try:
92
+ end = 0
93
+ start = end
94
+ end += 4
95
+ (length,) = _struct_I.unpack(str[start:end])
96
+ pattern = '<%sd'%length
97
+ start = end
98
+ s = struct.Struct(pattern)
99
+ end += s.size
100
+ self.joint_q = s.unpack(str[start:end])
101
+ start = end
102
+ end += 4
103
+ (length,) = _struct_I.unpack(str[start:end])
104
+ pattern = '<%sd'%length
105
+ start = end
106
+ s = struct.Struct(pattern)
107
+ end += s.size
108
+ self.joint_v = s.unpack(str[start:end])
109
+ start = end
110
+ end += 4
111
+ (length,) = _struct_I.unpack(str[start:end])
112
+ pattern = '<%sd'%length
113
+ start = end
114
+ s = struct.Struct(pattern)
115
+ end += s.size
116
+ self.joint_vd = s.unpack(str[start:end])
117
+ start = end
118
+ end += 4
119
+ (length,) = _struct_I.unpack(str[start:end])
120
+ pattern = '<%sd'%length
121
+ start = end
122
+ s = struct.Struct(pattern)
123
+ end += s.size
124
+ self.joint_torque = s.unpack(str[start:end])
125
+ return self
126
+ except struct.error as e:
127
+ raise genpy.DeserializationError(e) # most likely buffer underfill
128
+
129
+
130
+ def serialize_numpy(self, buff, numpy):
131
+ """
132
+ serialize message with numpy array types into buffer
133
+ :param buff: buffer, ``StringIO``
134
+ :param numpy: numpy python module
135
+ """
136
+ try:
137
+ length = len(self.joint_q)
138
+ buff.write(_struct_I.pack(length))
139
+ pattern = '<%sd'%length
140
+ buff.write(self.joint_q.tostring())
141
+ length = len(self.joint_v)
142
+ buff.write(_struct_I.pack(length))
143
+ pattern = '<%sd'%length
144
+ buff.write(self.joint_v.tostring())
145
+ length = len(self.joint_vd)
146
+ buff.write(_struct_I.pack(length))
147
+ pattern = '<%sd'%length
148
+ buff.write(self.joint_vd.tostring())
149
+ length = len(self.joint_torque)
150
+ buff.write(_struct_I.pack(length))
151
+ pattern = '<%sd'%length
152
+ buff.write(self.joint_torque.tostring())
153
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
154
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
155
+
156
+ def deserialize_numpy(self, str, numpy):
157
+ """
158
+ unpack serialized message in str into this message instance using numpy for array types
159
+ :param str: byte array of serialized message, ``str``
160
+ :param numpy: numpy python module
161
+ """
162
+ if python3:
163
+ codecs.lookup_error("rosmsg").msg_type = self._type
164
+ try:
165
+ end = 0
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.joint_q = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
174
+ start = end
175
+ end += 4
176
+ (length,) = _struct_I.unpack(str[start:end])
177
+ pattern = '<%sd'%length
178
+ start = end
179
+ s = struct.Struct(pattern)
180
+ end += s.size
181
+ self.joint_v = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
182
+ start = end
183
+ end += 4
184
+ (length,) = _struct_I.unpack(str[start:end])
185
+ pattern = '<%sd'%length
186
+ start = end
187
+ s = struct.Struct(pattern)
188
+ end += s.size
189
+ self.joint_vd = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
190
+ start = end
191
+ end += 4
192
+ (length,) = _struct_I.unpack(str[start:end])
193
+ pattern = '<%sd'%length
194
+ start = end
195
+ s = struct.Struct(pattern)
196
+ end += s.size
197
+ self.joint_torque = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
198
+ return self
199
+ except struct.error as e:
200
+ raise genpy.DeserializationError(e) # most likely buffer underfill
201
+
202
+ _struct_I = genpy.struct_I
203
+ def _get_struct_I():
204
+ global _struct_I
205
+ return _struct_I