kuavo-humanoid-sdk 1.2.2__20250922181216-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 (137) 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 +276 -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 +612 -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 +1309 -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 +605 -0
  19. kuavo_humanoid_sdk/kuavo/core/ros/tools.py +219 -0
  20. kuavo_humanoid_sdk/kuavo/core/ros/vision.py +234 -0
  21. kuavo_humanoid_sdk/kuavo/core/ros_env.py +237 -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 +465 -0
  25. kuavo_humanoid_sdk/kuavo/robot_arm.py +210 -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 +299 -0
  31. kuavo_humanoid_sdk/kuavo/robot_tool.py +82 -0
  32. kuavo_humanoid_sdk/kuavo/robot_vision.py +83 -0
  33. kuavo_humanoid_sdk/kuavo_strategy/__init__.py +2 -0
  34. kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +1126 -0
  35. kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +104 -0
  36. kuavo_humanoid_sdk/msg/__init__.py +4 -0
  37. kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
  38. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetection.py +306 -0
  39. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetectionArray.py +437 -0
  40. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_JoySticks.py +191 -0
  41. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  42. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
  43. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
  44. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +48 -0
  45. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +160 -0
  46. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
  47. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  48. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +151 -0
  49. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
  50. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  51. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  52. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  53. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
  54. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
  55. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
  56. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
  57. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  58. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  59. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  60. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
  61. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  62. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
  63. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
  64. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  65. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
  66. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  67. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  68. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  69. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  70. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
  71. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
  72. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_questJoySticks.py +191 -0
  73. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
  74. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
  75. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  76. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  77. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  78. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +495 -0
  79. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  80. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  81. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +272 -0
  82. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +315 -0
  83. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
  84. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
  85. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  86. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  87. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
  88. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
  89. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
  90. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
  91. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +29 -0
  92. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  93. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
  94. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
  95. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  96. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  97. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  98. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +394 -0
  99. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
  100. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  101. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  102. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  103. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  104. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
  105. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  106. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  107. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +421 -0
  108. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
  109. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
  110. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  111. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
  112. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  113. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  114. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
  115. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
  116. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +662 -0
  117. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  118. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  119. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  120. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  121. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  122. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  123. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  124. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  125. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  126. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  127. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  128. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  129. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  130. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  131. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  132. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  133. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  134. kuavo_humanoid_sdk-1.2.2.dist-info/METADATA +291 -0
  135. kuavo_humanoid_sdk-1.2.2.dist-info/RECORD +137 -0
  136. kuavo_humanoid_sdk-1.2.2.dist-info/WHEEL +6 -0
  137. kuavo_humanoid_sdk-1.2.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,160 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/armHandPose.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 armHandPose(genpy.Message):
11
+ _md5sum = "4f28a253cb60d59c6491569369f38f4d"
12
+ _type = "kuavo_msgs/armHandPose"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """float64[3] pos_xyz
15
+ float64[4] quat_xyzw
16
+
17
+ float64[3] elbow_pos_xyz
18
+
19
+ float64[7] joint_angles"""
20
+ __slots__ = ['pos_xyz','quat_xyzw','elbow_pos_xyz','joint_angles']
21
+ _slot_types = ['float64[3]','float64[4]','float64[3]','float64[7]']
22
+
23
+ def __init__(self, *args, **kwds):
24
+ """
25
+ Constructor. Any message fields that are implicitly/explicitly
26
+ set to None will be assigned a default value. The recommend
27
+ use is keyword arguments as this is more robust to future message
28
+ changes. You cannot mix in-order arguments and keyword arguments.
29
+
30
+ The available fields are:
31
+ pos_xyz,quat_xyzw,elbow_pos_xyz,joint_angles
32
+
33
+ :param args: complete set of field values, in .msg order
34
+ :param kwds: use keyword arguments corresponding to message field names
35
+ to set specific fields.
36
+ """
37
+ if args or kwds:
38
+ super(armHandPose, self).__init__(*args, **kwds)
39
+ # message fields cannot be None, assign default values for those that are
40
+ if self.pos_xyz is None:
41
+ self.pos_xyz = [0.] * 3
42
+ if self.quat_xyzw is None:
43
+ self.quat_xyzw = [0.] * 4
44
+ if self.elbow_pos_xyz is None:
45
+ self.elbow_pos_xyz = [0.] * 3
46
+ if self.joint_angles is None:
47
+ self.joint_angles = [0.] * 7
48
+ else:
49
+ self.pos_xyz = [0.] * 3
50
+ self.quat_xyzw = [0.] * 4
51
+ self.elbow_pos_xyz = [0.] * 3
52
+ self.joint_angles = [0.] * 7
53
+
54
+ def _get_types(self):
55
+ """
56
+ internal API method
57
+ """
58
+ return self._slot_types
59
+
60
+ def serialize(self, buff):
61
+ """
62
+ serialize message into buffer
63
+ :param buff: buffer, ``StringIO``
64
+ """
65
+ try:
66
+ buff.write(_get_struct_3d().pack(*self.pos_xyz))
67
+ buff.write(_get_struct_4d().pack(*self.quat_xyzw))
68
+ buff.write(_get_struct_3d().pack(*self.elbow_pos_xyz))
69
+ buff.write(_get_struct_7d().pack(*self.joint_angles))
70
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
71
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
72
+
73
+ def deserialize(self, str):
74
+ """
75
+ unpack serialized message in str into this message instance
76
+ :param str: byte array of serialized message, ``str``
77
+ """
78
+ if python3:
79
+ codecs.lookup_error("rosmsg").msg_type = self._type
80
+ try:
81
+ end = 0
82
+ start = end
83
+ end += 24
84
+ self.pos_xyz = _get_struct_3d().unpack(str[start:end])
85
+ start = end
86
+ end += 32
87
+ self.quat_xyzw = _get_struct_4d().unpack(str[start:end])
88
+ start = end
89
+ end += 24
90
+ self.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
91
+ start = end
92
+ end += 56
93
+ self.joint_angles = _get_struct_7d().unpack(str[start:end])
94
+ return self
95
+ except struct.error as e:
96
+ raise genpy.DeserializationError(e) # most likely buffer underfill
97
+
98
+
99
+ def serialize_numpy(self, buff, numpy):
100
+ """
101
+ serialize message with numpy array types into buffer
102
+ :param buff: buffer, ``StringIO``
103
+ :param numpy: numpy python module
104
+ """
105
+ try:
106
+ buff.write(self.pos_xyz.tostring())
107
+ buff.write(self.quat_xyzw.tostring())
108
+ buff.write(self.elbow_pos_xyz.tostring())
109
+ buff.write(self.joint_angles.tostring())
110
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
111
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
112
+
113
+ def deserialize_numpy(self, str, numpy):
114
+ """
115
+ unpack serialized message in str into this message instance using numpy for array types
116
+ :param str: byte array of serialized message, ``str``
117
+ :param numpy: numpy python module
118
+ """
119
+ if python3:
120
+ codecs.lookup_error("rosmsg").msg_type = self._type
121
+ try:
122
+ end = 0
123
+ start = end
124
+ end += 24
125
+ self.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
126
+ start = end
127
+ end += 32
128
+ self.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
129
+ start = end
130
+ end += 24
131
+ self.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
132
+ start = end
133
+ end += 56
134
+ self.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=7)
135
+ return self
136
+ except struct.error as e:
137
+ raise genpy.DeserializationError(e) # most likely buffer underfill
138
+
139
+ _struct_I = genpy.struct_I
140
+ def _get_struct_I():
141
+ global _struct_I
142
+ return _struct_I
143
+ _struct_3d = None
144
+ def _get_struct_3d():
145
+ global _struct_3d
146
+ if _struct_3d is None:
147
+ _struct_3d = struct.Struct("<3d")
148
+ return _struct_3d
149
+ _struct_4d = None
150
+ def _get_struct_4d():
151
+ global _struct_4d
152
+ if _struct_4d is None:
153
+ _struct_4d = struct.Struct("<4d")
154
+ return _struct_4d
155
+ _struct_7d = None
156
+ def _get_struct_7d():
157
+ global _struct_7d
158
+ if _struct_7d is None:
159
+ _struct_7d = struct.Struct("<7d")
160
+ return _struct_7d
@@ -0,0 +1,171 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/armHandPoseFree.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 armHandPoseFree(genpy.Message):
11
+ _md5sum = "db2a990bc43e189bf12bc1b55df612a8"
12
+ _type = "kuavo_msgs/armHandPoseFree"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """float64[3] pos_xyz
15
+ float64[4] quat_xyzw
16
+
17
+ float64[3] elbow_pos_xyz
18
+
19
+ float64[] joint_angles
20
+ """
21
+ __slots__ = ['pos_xyz','quat_xyzw','elbow_pos_xyz','joint_angles']
22
+ _slot_types = ['float64[3]','float64[4]','float64[3]','float64[]']
23
+
24
+ def __init__(self, *args, **kwds):
25
+ """
26
+ Constructor. Any message fields that are implicitly/explicitly
27
+ set to None will be assigned a default value. The recommend
28
+ use is keyword arguments as this is more robust to future message
29
+ changes. You cannot mix in-order arguments and keyword arguments.
30
+
31
+ The available fields are:
32
+ pos_xyz,quat_xyzw,elbow_pos_xyz,joint_angles
33
+
34
+ :param args: complete set of field values, in .msg order
35
+ :param kwds: use keyword arguments corresponding to message field names
36
+ to set specific fields.
37
+ """
38
+ if args or kwds:
39
+ super(armHandPoseFree, self).__init__(*args, **kwds)
40
+ # message fields cannot be None, assign default values for those that are
41
+ if self.pos_xyz is None:
42
+ self.pos_xyz = [0.] * 3
43
+ if self.quat_xyzw is None:
44
+ self.quat_xyzw = [0.] * 4
45
+ if self.elbow_pos_xyz is None:
46
+ self.elbow_pos_xyz = [0.] * 3
47
+ if self.joint_angles is None:
48
+ self.joint_angles = []
49
+ else:
50
+ self.pos_xyz = [0.] * 3
51
+ self.quat_xyzw = [0.] * 4
52
+ self.elbow_pos_xyz = [0.] * 3
53
+ self.joint_angles = []
54
+
55
+ def _get_types(self):
56
+ """
57
+ internal API method
58
+ """
59
+ return self._slot_types
60
+
61
+ def serialize(self, buff):
62
+ """
63
+ serialize message into buffer
64
+ :param buff: buffer, ``StringIO``
65
+ """
66
+ try:
67
+ buff.write(_get_struct_3d().pack(*self.pos_xyz))
68
+ buff.write(_get_struct_4d().pack(*self.quat_xyzw))
69
+ buff.write(_get_struct_3d().pack(*self.elbow_pos_xyz))
70
+ length = len(self.joint_angles)
71
+ buff.write(_struct_I.pack(length))
72
+ pattern = '<%sd'%length
73
+ buff.write(struct.Struct(pattern).pack(*self.joint_angles))
74
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
75
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
76
+
77
+ def deserialize(self, str):
78
+ """
79
+ unpack serialized message in str into this message instance
80
+ :param str: byte array of serialized message, ``str``
81
+ """
82
+ if python3:
83
+ codecs.lookup_error("rosmsg").msg_type = self._type
84
+ try:
85
+ end = 0
86
+ start = end
87
+ end += 24
88
+ self.pos_xyz = _get_struct_3d().unpack(str[start:end])
89
+ start = end
90
+ end += 32
91
+ self.quat_xyzw = _get_struct_4d().unpack(str[start:end])
92
+ start = end
93
+ end += 24
94
+ self.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
95
+ start = end
96
+ end += 4
97
+ (length,) = _struct_I.unpack(str[start:end])
98
+ pattern = '<%sd'%length
99
+ start = end
100
+ s = struct.Struct(pattern)
101
+ end += s.size
102
+ self.joint_angles = s.unpack(str[start:end])
103
+ return self
104
+ except struct.error as e:
105
+ raise genpy.DeserializationError(e) # most likely buffer underfill
106
+
107
+
108
+ def serialize_numpy(self, buff, numpy):
109
+ """
110
+ serialize message with numpy array types into buffer
111
+ :param buff: buffer, ``StringIO``
112
+ :param numpy: numpy python module
113
+ """
114
+ try:
115
+ buff.write(self.pos_xyz.tostring())
116
+ buff.write(self.quat_xyzw.tostring())
117
+ buff.write(self.elbow_pos_xyz.tostring())
118
+ length = len(self.joint_angles)
119
+ buff.write(_struct_I.pack(length))
120
+ pattern = '<%sd'%length
121
+ buff.write(self.joint_angles.tostring())
122
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
123
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
124
+
125
+ def deserialize_numpy(self, str, numpy):
126
+ """
127
+ unpack serialized message in str into this message instance using numpy for array types
128
+ :param str: byte array of serialized message, ``str``
129
+ :param numpy: numpy python module
130
+ """
131
+ if python3:
132
+ codecs.lookup_error("rosmsg").msg_type = self._type
133
+ try:
134
+ end = 0
135
+ start = end
136
+ end += 24
137
+ self.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
138
+ start = end
139
+ end += 32
140
+ self.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
141
+ start = end
142
+ end += 24
143
+ self.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
144
+ start = end
145
+ end += 4
146
+ (length,) = _struct_I.unpack(str[start:end])
147
+ pattern = '<%sd'%length
148
+ start = end
149
+ s = struct.Struct(pattern)
150
+ end += s.size
151
+ self.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
152
+ return self
153
+ except struct.error as e:
154
+ raise genpy.DeserializationError(e) # most likely buffer underfill
155
+
156
+ _struct_I = genpy.struct_I
157
+ def _get_struct_I():
158
+ global _struct_I
159
+ return _struct_I
160
+ _struct_3d = None
161
+ def _get_struct_3d():
162
+ global _struct_3d
163
+ if _struct_3d is None:
164
+ _struct_3d = struct.Struct("<3d")
165
+ return _struct_3d
166
+ _struct_4d = None
167
+ def _get_struct_4d():
168
+ global _struct_4d
169
+ if _struct_4d is None:
170
+ _struct_4d = struct.Struct("<4d")
171
+ return _struct_4d
@@ -0,0 +1,168 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/armPoseWithTimeStamp.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 armPoseWithTimeStamp(genpy.Message):
11
+ _md5sum = "3404338b5cb042ac3b3cf3de3f0fcb4f"
12
+ _type = "kuavo_msgs/armPoseWithTimeStamp"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """int32 offset
15
+ float64[] left_hand_pose
16
+ float64[] right_hand_pose"""
17
+ __slots__ = ['offset','left_hand_pose','right_hand_pose']
18
+ _slot_types = ['int32','float64[]','float64[]']
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
+ offset,left_hand_pose,right_hand_pose
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(armPoseWithTimeStamp, self).__init__(*args, **kwds)
36
+ # message fields cannot be None, assign default values for those that are
37
+ if self.offset is None:
38
+ self.offset = 0
39
+ if self.left_hand_pose is None:
40
+ self.left_hand_pose = []
41
+ if self.right_hand_pose is None:
42
+ self.right_hand_pose = []
43
+ else:
44
+ self.offset = 0
45
+ self.left_hand_pose = []
46
+ self.right_hand_pose = []
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.offset
61
+ buff.write(_get_struct_i().pack(_x))
62
+ length = len(self.left_hand_pose)
63
+ buff.write(_struct_I.pack(length))
64
+ pattern = '<%sd'%length
65
+ buff.write(struct.Struct(pattern).pack(*self.left_hand_pose))
66
+ length = len(self.right_hand_pose)
67
+ buff.write(_struct_I.pack(length))
68
+ pattern = '<%sd'%length
69
+ buff.write(struct.Struct(pattern).pack(*self.right_hand_pose))
70
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
71
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
72
+
73
+ def deserialize(self, str):
74
+ """
75
+ unpack serialized message in str into this message instance
76
+ :param str: byte array of serialized message, ``str``
77
+ """
78
+ if python3:
79
+ codecs.lookup_error("rosmsg").msg_type = self._type
80
+ try:
81
+ end = 0
82
+ start = end
83
+ end += 4
84
+ (self.offset,) = _get_struct_i().unpack(str[start:end])
85
+ start = end
86
+ end += 4
87
+ (length,) = _struct_I.unpack(str[start:end])
88
+ pattern = '<%sd'%length
89
+ start = end
90
+ s = struct.Struct(pattern)
91
+ end += s.size
92
+ self.left_hand_pose = s.unpack(str[start:end])
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.right_hand_pose = s.unpack(str[start:end])
101
+ return self
102
+ except struct.error as e:
103
+ raise genpy.DeserializationError(e) # most likely buffer underfill
104
+
105
+
106
+ def serialize_numpy(self, buff, numpy):
107
+ """
108
+ serialize message with numpy array types into buffer
109
+ :param buff: buffer, ``StringIO``
110
+ :param numpy: numpy python module
111
+ """
112
+ try:
113
+ _x = self.offset
114
+ buff.write(_get_struct_i().pack(_x))
115
+ length = len(self.left_hand_pose)
116
+ buff.write(_struct_I.pack(length))
117
+ pattern = '<%sd'%length
118
+ buff.write(self.left_hand_pose.tostring())
119
+ length = len(self.right_hand_pose)
120
+ buff.write(_struct_I.pack(length))
121
+ pattern = '<%sd'%length
122
+ buff.write(self.right_hand_pose.tostring())
123
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
124
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
125
+
126
+ def deserialize_numpy(self, str, numpy):
127
+ """
128
+ unpack serialized message in str into this message instance using numpy for array types
129
+ :param str: byte array of serialized message, ``str``
130
+ :param numpy: numpy python module
131
+ """
132
+ if python3:
133
+ codecs.lookup_error("rosmsg").msg_type = self._type
134
+ try:
135
+ end = 0
136
+ start = end
137
+ end += 4
138
+ (self.offset,) = _get_struct_i().unpack(str[start:end])
139
+ start = end
140
+ end += 4
141
+ (length,) = _struct_I.unpack(str[start:end])
142
+ pattern = '<%sd'%length
143
+ start = end
144
+ s = struct.Struct(pattern)
145
+ end += s.size
146
+ self.left_hand_pose = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
147
+ start = end
148
+ end += 4
149
+ (length,) = _struct_I.unpack(str[start:end])
150
+ pattern = '<%sd'%length
151
+ start = end
152
+ s = struct.Struct(pattern)
153
+ end += s.size
154
+ self.right_hand_pose = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
155
+ return self
156
+ except struct.error as e:
157
+ raise genpy.DeserializationError(e) # most likely buffer underfill
158
+
159
+ _struct_I = genpy.struct_I
160
+ def _get_struct_I():
161
+ global _struct_I
162
+ return _struct_I
163
+ _struct_i = None
164
+ def _get_struct_i():
165
+ global _struct_i
166
+ if _struct_i is None:
167
+ _struct_i = struct.Struct("<i")
168
+ return _struct_i
@@ -0,0 +1,151 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/armTargetPoses.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 armTargetPoses(genpy.Message):
11
+ _md5sum = "267055a1a7e685e90c17a3ebf7a8a26c"
12
+ _type = "kuavo_msgs/armTargetPoses"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """# times: times series
15
+ # values: values matrix
16
+ float64[] times
17
+ float64[] values
18
+ """
19
+ __slots__ = ['times','values']
20
+ _slot_types = ['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
+ times,values
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(armTargetPoses, self).__init__(*args, **kwds)
38
+ # message fields cannot be None, assign default values for those that are
39
+ if self.times is None:
40
+ self.times = []
41
+ if self.values is None:
42
+ self.values = []
43
+ else:
44
+ self.times = []
45
+ self.values = []
46
+
47
+ def _get_types(self):
48
+ """
49
+ internal API method
50
+ """
51
+ return self._slot_types
52
+
53
+ def serialize(self, buff):
54
+ """
55
+ serialize message into buffer
56
+ :param buff: buffer, ``StringIO``
57
+ """
58
+ try:
59
+ length = len(self.times)
60
+ buff.write(_struct_I.pack(length))
61
+ pattern = '<%sd'%length
62
+ buff.write(struct.Struct(pattern).pack(*self.times))
63
+ length = len(self.values)
64
+ buff.write(_struct_I.pack(length))
65
+ pattern = '<%sd'%length
66
+ buff.write(struct.Struct(pattern).pack(*self.values))
67
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
68
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
69
+
70
+ def deserialize(self, str):
71
+ """
72
+ unpack serialized message in str into this message instance
73
+ :param str: byte array of serialized message, ``str``
74
+ """
75
+ if python3:
76
+ codecs.lookup_error("rosmsg").msg_type = self._type
77
+ try:
78
+ end = 0
79
+ start = end
80
+ end += 4
81
+ (length,) = _struct_I.unpack(str[start:end])
82
+ pattern = '<%sd'%length
83
+ start = end
84
+ s = struct.Struct(pattern)
85
+ end += s.size
86
+ self.times = s.unpack(str[start:end])
87
+ start = end
88
+ end += 4
89
+ (length,) = _struct_I.unpack(str[start:end])
90
+ pattern = '<%sd'%length
91
+ start = end
92
+ s = struct.Struct(pattern)
93
+ end += s.size
94
+ self.values = s.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
+ length = len(self.times)
108
+ buff.write(_struct_I.pack(length))
109
+ pattern = '<%sd'%length
110
+ buff.write(self.times.tostring())
111
+ length = len(self.values)
112
+ buff.write(_struct_I.pack(length))
113
+ pattern = '<%sd'%length
114
+ buff.write(self.values.tostring())
115
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
116
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
117
+
118
+ def deserialize_numpy(self, str, numpy):
119
+ """
120
+ unpack serialized message in str into this message instance using numpy for array types
121
+ :param str: byte array of serialized message, ``str``
122
+ :param numpy: numpy python module
123
+ """
124
+ if python3:
125
+ codecs.lookup_error("rosmsg").msg_type = self._type
126
+ try:
127
+ end = 0
128
+ start = end
129
+ end += 4
130
+ (length,) = _struct_I.unpack(str[start:end])
131
+ pattern = '<%sd'%length
132
+ start = end
133
+ s = struct.Struct(pattern)
134
+ end += s.size
135
+ self.times = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
136
+ start = end
137
+ end += 4
138
+ (length,) = _struct_I.unpack(str[start:end])
139
+ pattern = '<%sd'%length
140
+ start = end
141
+ s = struct.Struct(pattern)
142
+ end += s.size
143
+ self.values = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
144
+ return self
145
+ except struct.error as e:
146
+ raise genpy.DeserializationError(e) # most likely buffer underfill
147
+
148
+ _struct_I = genpy.struct_I
149
+ def _get_struct_I():
150
+ global _struct_I
151
+ return _struct_I