kuavo-humanoid-sdk 1.2.1b1675__20250812203328-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,122 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/motorParam.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 motorParam(genpy.Message):
11
+ _md5sum = "7db1bed5b161d04864969d530bea48c5"
12
+ _type = "kuavo_msgs/motorParam"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """float32 Kp
15
+ float32 Kd
16
+ int16 id"""
17
+ __slots__ = ['Kp','Kd','id']
18
+ _slot_types = ['float32','float32','int16']
19
+
20
+ def __init__(self, *args, **kwds):
21
+ """
22
+ Constructor. Any message fields that are implicitly/explicitly
23
+ set to None will be assigned a default value. The recommend
24
+ use is keyword arguments as this is more robust to future message
25
+ changes. You cannot mix in-order arguments and keyword arguments.
26
+
27
+ The available fields are:
28
+ Kp,Kd,id
29
+
30
+ :param args: complete set of field values, in .msg order
31
+ :param kwds: use keyword arguments corresponding to message field names
32
+ to set specific fields.
33
+ """
34
+ if args or kwds:
35
+ super(motorParam, self).__init__(*args, **kwds)
36
+ # message fields cannot be None, assign default values for those that are
37
+ if self.Kp is None:
38
+ self.Kp = 0.
39
+ if self.Kd is None:
40
+ self.Kd = 0.
41
+ if self.id is None:
42
+ self.id = 0
43
+ else:
44
+ self.Kp = 0.
45
+ self.Kd = 0.
46
+ self.id = 0
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
+ _x = self
61
+ buff.write(_get_struct_2fh().pack(_x.Kp, _x.Kd, _x.id))
62
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
63
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
64
+
65
+ def deserialize(self, str):
66
+ """
67
+ unpack serialized message in str into this message instance
68
+ :param str: byte array of serialized message, ``str``
69
+ """
70
+ if python3:
71
+ codecs.lookup_error("rosmsg").msg_type = self._type
72
+ try:
73
+ end = 0
74
+ _x = self
75
+ start = end
76
+ end += 10
77
+ (_x.Kp, _x.Kd, _x.id,) = _get_struct_2fh().unpack(str[start:end])
78
+ return self
79
+ except struct.error as e:
80
+ raise genpy.DeserializationError(e) # most likely buffer underfill
81
+
82
+
83
+ def serialize_numpy(self, buff, numpy):
84
+ """
85
+ serialize message with numpy array types into buffer
86
+ :param buff: buffer, ``StringIO``
87
+ :param numpy: numpy python module
88
+ """
89
+ try:
90
+ _x = self
91
+ buff.write(_get_struct_2fh().pack(_x.Kp, _x.Kd, _x.id))
92
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
93
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
94
+
95
+ def deserialize_numpy(self, str, numpy):
96
+ """
97
+ unpack serialized message in str into this message instance using numpy for array types
98
+ :param str: byte array of serialized message, ``str``
99
+ :param numpy: numpy python module
100
+ """
101
+ if python3:
102
+ codecs.lookup_error("rosmsg").msg_type = self._type
103
+ try:
104
+ end = 0
105
+ _x = self
106
+ start = end
107
+ end += 10
108
+ (_x.Kp, _x.Kd, _x.id,) = _get_struct_2fh().unpack(str[start:end])
109
+ return self
110
+ except struct.error as e:
111
+ raise genpy.DeserializationError(e) # most likely buffer underfill
112
+
113
+ _struct_I = genpy.struct_I
114
+ def _get_struct_I():
115
+ global _struct_I
116
+ return _struct_I
117
+ _struct_2fh = None
118
+ def _get_struct_2fh():
119
+ global _struct_2fh
120
+ if _struct_2fh is None:
121
+ _struct_2fh = struct.Struct("<2fh")
122
+ return _struct_2fh
@@ -0,0 +1,143 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/picoPoseInfo.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 geometry_msgs.msg
10
+
11
+ class picoPoseInfo(genpy.Message):
12
+ _md5sum = "e45d45a5a1ce597b249e23fb30fc871f"
13
+ _type = "kuavo_msgs/picoPoseInfo"
14
+ _has_header = False # flag to mark the presence of a Header object
15
+ _full_text = """geometry_msgs/Point position
16
+ geometry_msgs/Quaternion orientation
17
+ ================================================================================
18
+ MSG: geometry_msgs/Point
19
+ # This contains the position of a point in free space
20
+ float64 x
21
+ float64 y
22
+ float64 z
23
+
24
+ ================================================================================
25
+ MSG: geometry_msgs/Quaternion
26
+ # This represents an orientation in free space in quaternion form.
27
+
28
+ float64 x
29
+ float64 y
30
+ float64 z
31
+ float64 w
32
+ """
33
+ __slots__ = ['position','orientation']
34
+ _slot_types = ['geometry_msgs/Point','geometry_msgs/Quaternion']
35
+
36
+ def __init__(self, *args, **kwds):
37
+ """
38
+ Constructor. Any message fields that are implicitly/explicitly
39
+ set to None will be assigned a default value. The recommend
40
+ use is keyword arguments as this is more robust to future message
41
+ changes. You cannot mix in-order arguments and keyword arguments.
42
+
43
+ The available fields are:
44
+ position,orientation
45
+
46
+ :param args: complete set of field values, in .msg order
47
+ :param kwds: use keyword arguments corresponding to message field names
48
+ to set specific fields.
49
+ """
50
+ if args or kwds:
51
+ super(picoPoseInfo, self).__init__(*args, **kwds)
52
+ # message fields cannot be None, assign default values for those that are
53
+ if self.position is None:
54
+ self.position = geometry_msgs.msg.Point()
55
+ if self.orientation is None:
56
+ self.orientation = geometry_msgs.msg.Quaternion()
57
+ else:
58
+ self.position = geometry_msgs.msg.Point()
59
+ self.orientation = geometry_msgs.msg.Quaternion()
60
+
61
+ def _get_types(self):
62
+ """
63
+ internal API method
64
+ """
65
+ return self._slot_types
66
+
67
+ def serialize(self, buff):
68
+ """
69
+ serialize message into buffer
70
+ :param buff: buffer, ``StringIO``
71
+ """
72
+ try:
73
+ _x = self
74
+ buff.write(_get_struct_7d().pack(_x.position.x, _x.position.y, _x.position.z, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w))
75
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
76
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
77
+
78
+ def deserialize(self, str):
79
+ """
80
+ unpack serialized message in str into this message instance
81
+ :param str: byte array of serialized message, ``str``
82
+ """
83
+ if python3:
84
+ codecs.lookup_error("rosmsg").msg_type = self._type
85
+ try:
86
+ if self.position is None:
87
+ self.position = geometry_msgs.msg.Point()
88
+ if self.orientation is None:
89
+ self.orientation = geometry_msgs.msg.Quaternion()
90
+ end = 0
91
+ _x = self
92
+ start = end
93
+ end += 56
94
+ (_x.position.x, _x.position.y, _x.position.z, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w,) = _get_struct_7d().unpack(str[start:end])
95
+ return self
96
+ except struct.error as e:
97
+ raise genpy.DeserializationError(e) # most likely buffer underfill
98
+
99
+
100
+ def serialize_numpy(self, buff, numpy):
101
+ """
102
+ serialize message with numpy array types into buffer
103
+ :param buff: buffer, ``StringIO``
104
+ :param numpy: numpy python module
105
+ """
106
+ try:
107
+ _x = self
108
+ buff.write(_get_struct_7d().pack(_x.position.x, _x.position.y, _x.position.z, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w))
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_numpy(self, str, numpy):
113
+ """
114
+ unpack serialized message in str into this message instance using numpy for array types
115
+ :param str: byte array of serialized message, ``str``
116
+ :param numpy: numpy python module
117
+ """
118
+ if python3:
119
+ codecs.lookup_error("rosmsg").msg_type = self._type
120
+ try:
121
+ if self.position is None:
122
+ self.position = geometry_msgs.msg.Point()
123
+ if self.orientation is None:
124
+ self.orientation = geometry_msgs.msg.Quaternion()
125
+ end = 0
126
+ _x = self
127
+ start = end
128
+ end += 56
129
+ (_x.position.x, _x.position.y, _x.position.z, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w,) = _get_struct_7d().unpack(str[start:end])
130
+ return self
131
+ except struct.error as e:
132
+ raise genpy.DeserializationError(e) # most likely buffer underfill
133
+
134
+ _struct_I = genpy.struct_I
135
+ def _get_struct_I():
136
+ global _struct_I
137
+ return _struct_I
138
+ _struct_7d = None
139
+ def _get_struct_7d():
140
+ global _struct_7d
141
+ if _struct_7d is None:
142
+ _struct_7d = struct.Struct("<7d")
143
+ return _struct_7d
@@ -0,0 +1,220 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/picoPoseInfoList.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 geometry_msgs.msg
10
+ import kuavo_msgs.msg
11
+
12
+ class picoPoseInfoList(genpy.Message):
13
+ _md5sum = "f56d5e4df1c0e38a423ead4bde9414b3"
14
+ _type = "kuavo_msgs/picoPoseInfoList"
15
+ _has_header = False # flag to mark the presence of a Header object
16
+ _full_text = """int64 timestamp_ms
17
+ bool is_high_confidence
18
+ bool is_hand_tracking
19
+ picoPoseInfo[] poses
20
+ ================================================================================
21
+ MSG: kuavo_msgs/picoPoseInfo
22
+ geometry_msgs/Point position
23
+ geometry_msgs/Quaternion orientation
24
+ ================================================================================
25
+ MSG: geometry_msgs/Point
26
+ # This contains the position of a point in free space
27
+ float64 x
28
+ float64 y
29
+ float64 z
30
+
31
+ ================================================================================
32
+ MSG: geometry_msgs/Quaternion
33
+ # This represents an orientation in free space in quaternion form.
34
+
35
+ float64 x
36
+ float64 y
37
+ float64 z
38
+ float64 w
39
+ """
40
+ __slots__ = ['timestamp_ms','is_high_confidence','is_hand_tracking','poses']
41
+ _slot_types = ['int64','bool','bool','kuavo_msgs/picoPoseInfo[]']
42
+
43
+ def __init__(self, *args, **kwds):
44
+ """
45
+ Constructor. Any message fields that are implicitly/explicitly
46
+ set to None will be assigned a default value. The recommend
47
+ use is keyword arguments as this is more robust to future message
48
+ changes. You cannot mix in-order arguments and keyword arguments.
49
+
50
+ The available fields are:
51
+ timestamp_ms,is_high_confidence,is_hand_tracking,poses
52
+
53
+ :param args: complete set of field values, in .msg order
54
+ :param kwds: use keyword arguments corresponding to message field names
55
+ to set specific fields.
56
+ """
57
+ if args or kwds:
58
+ super(picoPoseInfoList, self).__init__(*args, **kwds)
59
+ # message fields cannot be None, assign default values for those that are
60
+ if self.timestamp_ms is None:
61
+ self.timestamp_ms = 0
62
+ if self.is_high_confidence is None:
63
+ self.is_high_confidence = False
64
+ if self.is_hand_tracking is None:
65
+ self.is_hand_tracking = False
66
+ if self.poses is None:
67
+ self.poses = []
68
+ else:
69
+ self.timestamp_ms = 0
70
+ self.is_high_confidence = False
71
+ self.is_hand_tracking = False
72
+ self.poses = []
73
+
74
+ def _get_types(self):
75
+ """
76
+ internal API method
77
+ """
78
+ return self._slot_types
79
+
80
+ def serialize(self, buff):
81
+ """
82
+ serialize message into buffer
83
+ :param buff: buffer, ``StringIO``
84
+ """
85
+ try:
86
+ _x = self
87
+ buff.write(_get_struct_q2B().pack(_x.timestamp_ms, _x.is_high_confidence, _x.is_hand_tracking))
88
+ length = len(self.poses)
89
+ buff.write(_struct_I.pack(length))
90
+ for val1 in self.poses:
91
+ _v1 = val1.position
92
+ _x = _v1
93
+ buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
94
+ _v2 = val1.orientation
95
+ _x = _v2
96
+ buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
97
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
98
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
99
+
100
+ def deserialize(self, str):
101
+ """
102
+ unpack serialized message in str into this message instance
103
+ :param str: byte array of serialized message, ``str``
104
+ """
105
+ if python3:
106
+ codecs.lookup_error("rosmsg").msg_type = self._type
107
+ try:
108
+ if self.poses is None:
109
+ self.poses = None
110
+ end = 0
111
+ _x = self
112
+ start = end
113
+ end += 10
114
+ (_x.timestamp_ms, _x.is_high_confidence, _x.is_hand_tracking,) = _get_struct_q2B().unpack(str[start:end])
115
+ self.is_high_confidence = bool(self.is_high_confidence)
116
+ self.is_hand_tracking = bool(self.is_hand_tracking)
117
+ start = end
118
+ end += 4
119
+ (length,) = _struct_I.unpack(str[start:end])
120
+ self.poses = []
121
+ for i in range(0, length):
122
+ val1 = kuavo_msgs.msg.picoPoseInfo()
123
+ _v3 = val1.position
124
+ _x = _v3
125
+ start = end
126
+ end += 24
127
+ (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
128
+ _v4 = val1.orientation
129
+ _x = _v4
130
+ start = end
131
+ end += 32
132
+ (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
133
+ self.poses.append(val1)
134
+ return self
135
+ except struct.error as e:
136
+ raise genpy.DeserializationError(e) # most likely buffer underfill
137
+
138
+
139
+ def serialize_numpy(self, buff, numpy):
140
+ """
141
+ serialize message with numpy array types into buffer
142
+ :param buff: buffer, ``StringIO``
143
+ :param numpy: numpy python module
144
+ """
145
+ try:
146
+ _x = self
147
+ buff.write(_get_struct_q2B().pack(_x.timestamp_ms, _x.is_high_confidence, _x.is_hand_tracking))
148
+ length = len(self.poses)
149
+ buff.write(_struct_I.pack(length))
150
+ for val1 in self.poses:
151
+ _v5 = val1.position
152
+ _x = _v5
153
+ buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
154
+ _v6 = val1.orientation
155
+ _x = _v6
156
+ buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
157
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
158
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
159
+
160
+ def deserialize_numpy(self, str, numpy):
161
+ """
162
+ unpack serialized message in str into this message instance using numpy for array types
163
+ :param str: byte array of serialized message, ``str``
164
+ :param numpy: numpy python module
165
+ """
166
+ if python3:
167
+ codecs.lookup_error("rosmsg").msg_type = self._type
168
+ try:
169
+ if self.poses is None:
170
+ self.poses = None
171
+ end = 0
172
+ _x = self
173
+ start = end
174
+ end += 10
175
+ (_x.timestamp_ms, _x.is_high_confidence, _x.is_hand_tracking,) = _get_struct_q2B().unpack(str[start:end])
176
+ self.is_high_confidence = bool(self.is_high_confidence)
177
+ self.is_hand_tracking = bool(self.is_hand_tracking)
178
+ start = end
179
+ end += 4
180
+ (length,) = _struct_I.unpack(str[start:end])
181
+ self.poses = []
182
+ for i in range(0, length):
183
+ val1 = kuavo_msgs.msg.picoPoseInfo()
184
+ _v7 = val1.position
185
+ _x = _v7
186
+ start = end
187
+ end += 24
188
+ (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
189
+ _v8 = val1.orientation
190
+ _x = _v8
191
+ start = end
192
+ end += 32
193
+ (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
194
+ self.poses.append(val1)
195
+ return self
196
+ except struct.error as e:
197
+ raise genpy.DeserializationError(e) # most likely buffer underfill
198
+
199
+ _struct_I = genpy.struct_I
200
+ def _get_struct_I():
201
+ global _struct_I
202
+ return _struct_I
203
+ _struct_3d = None
204
+ def _get_struct_3d():
205
+ global _struct_3d
206
+ if _struct_3d is None:
207
+ _struct_3d = struct.Struct("<3d")
208
+ return _struct_3d
209
+ _struct_4d = None
210
+ def _get_struct_4d():
211
+ global _struct_4d
212
+ if _struct_4d is None:
213
+ _struct_4d = struct.Struct("<4d")
214
+ return _struct_4d
215
+ _struct_q2B = None
216
+ def _get_struct_q2B():
217
+ global _struct_q2B
218
+ if _struct_q2B is None:
219
+ _struct_q2B = struct.Struct("<q2B")
220
+ return _struct_q2B
@@ -0,0 +1,120 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/planArmState.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 planArmState(genpy.Message):
11
+ _md5sum = "0743feb5221b176f512f6ea58920b201"
12
+ _type = "kuavo_msgs/planArmState"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """int32 progress
15
+ bool is_finished"""
16
+ __slots__ = ['progress','is_finished']
17
+ _slot_types = ['int32','bool']
18
+
19
+ def __init__(self, *args, **kwds):
20
+ """
21
+ Constructor. Any message fields that are implicitly/explicitly
22
+ set to None will be assigned a default value. The recommend
23
+ use is keyword arguments as this is more robust to future message
24
+ changes. You cannot mix in-order arguments and keyword arguments.
25
+
26
+ The available fields are:
27
+ progress,is_finished
28
+
29
+ :param args: complete set of field values, in .msg order
30
+ :param kwds: use keyword arguments corresponding to message field names
31
+ to set specific fields.
32
+ """
33
+ if args or kwds:
34
+ super(planArmState, self).__init__(*args, **kwds)
35
+ # message fields cannot be None, assign default values for those that are
36
+ if self.progress is None:
37
+ self.progress = 0
38
+ if self.is_finished is None:
39
+ self.is_finished = False
40
+ else:
41
+ self.progress = 0
42
+ self.is_finished = False
43
+
44
+ def _get_types(self):
45
+ """
46
+ internal API method
47
+ """
48
+ return self._slot_types
49
+
50
+ def serialize(self, buff):
51
+ """
52
+ serialize message into buffer
53
+ :param buff: buffer, ``StringIO``
54
+ """
55
+ try:
56
+ _x = self
57
+ buff.write(_get_struct_iB().pack(_x.progress, _x.is_finished))
58
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
59
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
60
+
61
+ def deserialize(self, str):
62
+ """
63
+ unpack serialized message in str into this message instance
64
+ :param str: byte array of serialized message, ``str``
65
+ """
66
+ if python3:
67
+ codecs.lookup_error("rosmsg").msg_type = self._type
68
+ try:
69
+ end = 0
70
+ _x = self
71
+ start = end
72
+ end += 5
73
+ (_x.progress, _x.is_finished,) = _get_struct_iB().unpack(str[start:end])
74
+ self.is_finished = bool(self.is_finished)
75
+ return self
76
+ except struct.error as e:
77
+ raise genpy.DeserializationError(e) # most likely buffer underfill
78
+
79
+
80
+ def serialize_numpy(self, buff, numpy):
81
+ """
82
+ serialize message with numpy array types into buffer
83
+ :param buff: buffer, ``StringIO``
84
+ :param numpy: numpy python module
85
+ """
86
+ try:
87
+ _x = self
88
+ buff.write(_get_struct_iB().pack(_x.progress, _x.is_finished))
89
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
90
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
91
+
92
+ def deserialize_numpy(self, str, numpy):
93
+ """
94
+ unpack serialized message in str into this message instance using numpy for array types
95
+ :param str: byte array of serialized message, ``str``
96
+ :param numpy: numpy python module
97
+ """
98
+ if python3:
99
+ codecs.lookup_error("rosmsg").msg_type = self._type
100
+ try:
101
+ end = 0
102
+ _x = self
103
+ start = end
104
+ end += 5
105
+ (_x.progress, _x.is_finished,) = _get_struct_iB().unpack(str[start:end])
106
+ self.is_finished = bool(self.is_finished)
107
+ return self
108
+ except struct.error as e:
109
+ raise genpy.DeserializationError(e) # most likely buffer underfill
110
+
111
+ _struct_I = genpy.struct_I
112
+ def _get_struct_I():
113
+ global _struct_I
114
+ return _struct_I
115
+ _struct_iB = None
116
+ def _get_struct_iB():
117
+ global _struct_iB
118
+ if _struct_iB is None:
119
+ _struct_iB = struct.Struct("<iB")
120
+ return _struct_iB