kuavo-humanoid-sdk 1.1.2a924__py3-none-any.whl → 1.1.3a1226__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 (45) hide show
  1. kuavo_humanoid_sdk/common/global_config.py +15 -0
  2. kuavo_humanoid_sdk/common/websocket_kuavo_sdk.py +23 -0
  3. kuavo_humanoid_sdk/interfaces/data_types.py +46 -0
  4. kuavo_humanoid_sdk/kuavo/__init__.py +3 -0
  5. kuavo_humanoid_sdk/kuavo/core/audio.py +33 -0
  6. kuavo_humanoid_sdk/kuavo/core/core.py +16 -6
  7. kuavo_humanoid_sdk/kuavo/core/ros/audio.py +87 -0
  8. kuavo_humanoid_sdk/kuavo/core/ros/control.py +645 -19
  9. kuavo_humanoid_sdk/kuavo/core/ros/param.py +142 -4
  10. kuavo_humanoid_sdk/kuavo/core/ros/state.py +329 -15
  11. kuavo_humanoid_sdk/kuavo/core/ros/tools.py +149 -0
  12. kuavo_humanoid_sdk/kuavo/core/ros/vision.py +272 -0
  13. kuavo_humanoid_sdk/kuavo/core/ros_env.py +229 -1
  14. kuavo_humanoid_sdk/kuavo/dexterous_hand.py +6 -2
  15. kuavo_humanoid_sdk/kuavo/leju_claw.py +6 -2
  16. kuavo_humanoid_sdk/kuavo/robot.py +43 -22
  17. kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
  18. kuavo_humanoid_sdk/kuavo/robot_info.py +7 -2
  19. kuavo_humanoid_sdk/kuavo/robot_state.py +6 -2
  20. kuavo_humanoid_sdk/kuavo/robot_tool.py +62 -0
  21. kuavo_humanoid_sdk/kuavo/robot_vision.py +87 -0
  22. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetection.py +306 -0
  23. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetectionArray.py +437 -0
  24. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +9 -0
  25. kuavo_humanoid_sdk/msg/{motion_capture_ik → kuavo_msgs}/msg/_armHandPose.py +2 -2
  26. kuavo_humanoid_sdk/msg/{motion_capture_ik → kuavo_msgs}/msg/_handPose.py +2 -2
  27. kuavo_humanoid_sdk/msg/{motion_capture_ik → kuavo_msgs}/msg/_ikSolveError.py +13 -13
  28. kuavo_humanoid_sdk/msg/{motion_capture_ik → kuavo_msgs}/msg/_ikSolveParam.py +2 -2
  29. kuavo_humanoid_sdk/msg/{motion_capture_ik → kuavo_msgs}/msg/_robotArmQVVD.py +2 -2
  30. kuavo_humanoid_sdk/msg/{motion_capture_ik → kuavo_msgs}/msg/_twoArmHandPose.py +13 -13
  31. kuavo_humanoid_sdk/msg/{motion_capture_ik → kuavo_msgs}/msg/_twoArmHandPoseCmd.py +15 -15
  32. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
  33. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +5 -0
  34. kuavo_humanoid_sdk/msg/{motion_capture_ik → kuavo_msgs}/srv/_changeArmCtrlModeKuavo.py +5 -5
  35. kuavo_humanoid_sdk/msg/{motion_capture_ik → kuavo_msgs}/srv/_fkSrv.py +13 -13
  36. kuavo_humanoid_sdk/msg/{motion_capture_ik/srv/_changeArmCtrlMode.py → kuavo_msgs/srv/_playmusic.py} +97 -98
  37. kuavo_humanoid_sdk/msg/{motion_capture_ik → kuavo_msgs}/srv/_twoArmHandPoseCmdSrv.py +23 -23
  38. {kuavo_humanoid_sdk-1.1.2a924.dist-info → kuavo_humanoid_sdk-1.1.3a1226.dist-info}/METADATA +2 -1
  39. {kuavo_humanoid_sdk-1.1.2a924.dist-info → kuavo_humanoid_sdk-1.1.3a1226.dist-info}/RECORD +41 -33
  40. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/__init__.py +0 -9
  41. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_headBodyPose.py +0 -145
  42. kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_robotHandPosition.py +0 -225
  43. kuavo_humanoid_sdk/msg/motion_capture_ik/srv/__init__.py +0 -4
  44. {kuavo_humanoid_sdk-1.1.2a924.dist-info → kuavo_humanoid_sdk-1.1.3a1226.dist-info}/WHEEL +0 -0
  45. {kuavo_humanoid_sdk-1.1.2a924.dist-info → kuavo_humanoid_sdk-1.1.3a1226.dist-info}/top_level.txt +0 -0
@@ -1,9 +0,0 @@
1
- from ._armHandPose import *
2
- from ._handPose import *
3
- from ._headBodyPose import *
4
- from ._ikSolveError import *
5
- from ._ikSolveParam import *
6
- from ._robotArmQVVD import *
7
- from ._robotHandPosition import *
8
- from ._twoArmHandPose import *
9
- from ._twoArmHandPoseCmd import *
@@ -1,145 +0,0 @@
1
- # This Python file uses the following encoding: utf-8
2
- """autogenerated by genpy from motion_capture_ik/headBodyPose.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 headBodyPose(genpy.Message):
11
- _md5sum = "86a58d9f885335d8a0b389ace07ba692"
12
- _type = "motion_capture_ik/headBodyPose"
13
- _has_header = False # flag to mark the presence of a Header object
14
- _full_text = """# head (rad)
15
- float64 head_pitch
16
- float64 head_yaw
17
- # body (rad)
18
- float64 body_roll
19
- float64 body_pitch
20
- float64 body_yaw
21
-
22
- float64 body_x
23
- float64 body_y
24
- float64 body_height"""
25
- __slots__ = ['head_pitch','head_yaw','body_roll','body_pitch','body_yaw','body_x','body_y','body_height']
26
- _slot_types = ['float64','float64','float64','float64','float64','float64','float64','float64']
27
-
28
- def __init__(self, *args, **kwds):
29
- """
30
- Constructor. Any message fields that are implicitly/explicitly
31
- set to None will be assigned a default value. The recommend
32
- use is keyword arguments as this is more robust to future message
33
- changes. You cannot mix in-order arguments and keyword arguments.
34
-
35
- The available fields are:
36
- head_pitch,head_yaw,body_roll,body_pitch,body_yaw,body_x,body_y,body_height
37
-
38
- :param args: complete set of field values, in .msg order
39
- :param kwds: use keyword arguments corresponding to message field names
40
- to set specific fields.
41
- """
42
- if args or kwds:
43
- super(headBodyPose, self).__init__(*args, **kwds)
44
- # message fields cannot be None, assign default values for those that are
45
- if self.head_pitch is None:
46
- self.head_pitch = 0.
47
- if self.head_yaw is None:
48
- self.head_yaw = 0.
49
- if self.body_roll is None:
50
- self.body_roll = 0.
51
- if self.body_pitch is None:
52
- self.body_pitch = 0.
53
- if self.body_yaw is None:
54
- self.body_yaw = 0.
55
- if self.body_x is None:
56
- self.body_x = 0.
57
- if self.body_y is None:
58
- self.body_y = 0.
59
- if self.body_height is None:
60
- self.body_height = 0.
61
- else:
62
- self.head_pitch = 0.
63
- self.head_yaw = 0.
64
- self.body_roll = 0.
65
- self.body_pitch = 0.
66
- self.body_yaw = 0.
67
- self.body_x = 0.
68
- self.body_y = 0.
69
- self.body_height = 0.
70
-
71
- def _get_types(self):
72
- """
73
- internal API method
74
- """
75
- return self._slot_types
76
-
77
- def serialize(self, buff):
78
- """
79
- serialize message into buffer
80
- :param buff: buffer, ``StringIO``
81
- """
82
- try:
83
- _x = self
84
- buff.write(_get_struct_8d().pack(_x.head_pitch, _x.head_yaw, _x.body_roll, _x.body_pitch, _x.body_yaw, _x.body_x, _x.body_y, _x.body_height))
85
- except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
86
- except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
87
-
88
- def deserialize(self, str):
89
- """
90
- unpack serialized message in str into this message instance
91
- :param str: byte array of serialized message, ``str``
92
- """
93
- if python3:
94
- codecs.lookup_error("rosmsg").msg_type = self._type
95
- try:
96
- end = 0
97
- _x = self
98
- start = end
99
- end += 64
100
- (_x.head_pitch, _x.head_yaw, _x.body_roll, _x.body_pitch, _x.body_yaw, _x.body_x, _x.body_y, _x.body_height,) = _get_struct_8d().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
114
- buff.write(_get_struct_8d().pack(_x.head_pitch, _x.head_yaw, _x.body_roll, _x.body_pitch, _x.body_yaw, _x.body_x, _x.body_y, _x.body_height))
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
- _x = self
129
- start = end
130
- end += 64
131
- (_x.head_pitch, _x.head_yaw, _x.body_roll, _x.body_pitch, _x.body_yaw, _x.body_x, _x.body_y, _x.body_height,) = _get_struct_8d().unpack(str[start:end])
132
- return self
133
- except struct.error as e:
134
- raise genpy.DeserializationError(e) # most likely buffer underfill
135
-
136
- _struct_I = genpy.struct_I
137
- def _get_struct_I():
138
- global _struct_I
139
- return _struct_I
140
- _struct_8d = None
141
- def _get_struct_8d():
142
- global _struct_8d
143
- if _struct_8d is None:
144
- _struct_8d = struct.Struct("<8d")
145
- return _struct_8d
@@ -1,225 +0,0 @@
1
- # This Python file uses the following encoding: utf-8
2
- """autogenerated by genpy from motion_capture_ik/robotHandPosition.msg. Do not edit."""
3
- import codecs
4
- import sys
5
- python3 = True if sys.hexversion > 0x03000000 else False
6
- import genpy
7
- import struct
8
-
9
- import std_msgs.msg
10
-
11
- class robotHandPosition(genpy.Message):
12
- _md5sum = "ee45ac8dfb6e0c9a4c7712025fd69d4f"
13
- _type = "motion_capture_ik/robotHandPosition"
14
- _has_header = True # flag to mark the presence of a Header object
15
- _full_text = """Header header
16
- uint8[] left_hand_position
17
- uint8[] right_hand_position
18
- ================================================================================
19
- MSG: std_msgs/Header
20
- # Standard metadata for higher-level stamped data types.
21
- # This is generally used to communicate timestamped data
22
- # in a particular coordinate frame.
23
- #
24
- # sequence ID: consecutively increasing ID
25
- uint32 seq
26
- #Two-integer timestamp that is expressed as:
27
- # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
28
- # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
29
- # time-handling sugar is provided by the client library
30
- time stamp
31
- #Frame this data is associated with
32
- string frame_id
33
- """
34
- __slots__ = ['header','left_hand_position','right_hand_position']
35
- _slot_types = ['std_msgs/Header','uint8[]','uint8[]']
36
-
37
- def __init__(self, *args, **kwds):
38
- """
39
- Constructor. Any message fields that are implicitly/explicitly
40
- set to None will be assigned a default value. The recommend
41
- use is keyword arguments as this is more robust to future message
42
- changes. You cannot mix in-order arguments and keyword arguments.
43
-
44
- The available fields are:
45
- header,left_hand_position,right_hand_position
46
-
47
- :param args: complete set of field values, in .msg order
48
- :param kwds: use keyword arguments corresponding to message field names
49
- to set specific fields.
50
- """
51
- if args or kwds:
52
- super(robotHandPosition, self).__init__(*args, **kwds)
53
- # message fields cannot be None, assign default values for those that are
54
- if self.header is None:
55
- self.header = std_msgs.msg.Header()
56
- if self.left_hand_position is None:
57
- self.left_hand_position = b''
58
- if self.right_hand_position is None:
59
- self.right_hand_position = b''
60
- else:
61
- self.header = std_msgs.msg.Header()
62
- self.left_hand_position = b''
63
- self.right_hand_position = b''
64
-
65
- def _get_types(self):
66
- """
67
- internal API method
68
- """
69
- return self._slot_types
70
-
71
- def serialize(self, buff):
72
- """
73
- serialize message into buffer
74
- :param buff: buffer, ``StringIO``
75
- """
76
- try:
77
- _x = self
78
- buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
79
- _x = self.header.frame_id
80
- length = len(_x)
81
- if python3 or type(_x) == unicode:
82
- _x = _x.encode('utf-8')
83
- length = len(_x)
84
- buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
85
- _x = self.left_hand_position
86
- length = len(_x)
87
- # - if encoded as a list instead, serialize as bytes instead of string
88
- if type(_x) in [list, tuple]:
89
- buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
90
- else:
91
- buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
92
- _x = self.right_hand_position
93
- length = len(_x)
94
- # - if encoded as a list instead, serialize as bytes instead of string
95
- if type(_x) in [list, tuple]:
96
- buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
97
- else:
98
- buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
99
- except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
100
- except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
101
-
102
- def deserialize(self, str):
103
- """
104
- unpack serialized message in str into this message instance
105
- :param str: byte array of serialized message, ``str``
106
- """
107
- if python3:
108
- codecs.lookup_error("rosmsg").msg_type = self._type
109
- try:
110
- if self.header is None:
111
- self.header = std_msgs.msg.Header()
112
- end = 0
113
- _x = self
114
- start = end
115
- end += 12
116
- (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
117
- start = end
118
- end += 4
119
- (length,) = _struct_I.unpack(str[start:end])
120
- start = end
121
- end += length
122
- if python3:
123
- self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
124
- else:
125
- self.header.frame_id = str[start:end]
126
- start = end
127
- end += 4
128
- (length,) = _struct_I.unpack(str[start:end])
129
- start = end
130
- end += length
131
- self.left_hand_position = str[start:end]
132
- start = end
133
- end += 4
134
- (length,) = _struct_I.unpack(str[start:end])
135
- start = end
136
- end += length
137
- self.right_hand_position = str[start:end]
138
- return self
139
- except struct.error as e:
140
- raise genpy.DeserializationError(e) # most likely buffer underfill
141
-
142
-
143
- def serialize_numpy(self, buff, numpy):
144
- """
145
- serialize message with numpy array types into buffer
146
- :param buff: buffer, ``StringIO``
147
- :param numpy: numpy python module
148
- """
149
- try:
150
- _x = self
151
- buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
152
- _x = self.header.frame_id
153
- length = len(_x)
154
- if python3 or type(_x) == unicode:
155
- _x = _x.encode('utf-8')
156
- length = len(_x)
157
- buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
158
- _x = self.left_hand_position
159
- length = len(_x)
160
- # - if encoded as a list instead, serialize as bytes instead of string
161
- if type(_x) in [list, tuple]:
162
- buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
163
- else:
164
- buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
165
- _x = self.right_hand_position
166
- length = len(_x)
167
- # - if encoded as a list instead, serialize as bytes instead of string
168
- if type(_x) in [list, tuple]:
169
- buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
170
- else:
171
- buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
172
- except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
173
- except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
174
-
175
- def deserialize_numpy(self, str, numpy):
176
- """
177
- unpack serialized message in str into this message instance using numpy for array types
178
- :param str: byte array of serialized message, ``str``
179
- :param numpy: numpy python module
180
- """
181
- if python3:
182
- codecs.lookup_error("rosmsg").msg_type = self._type
183
- try:
184
- if self.header is None:
185
- self.header = std_msgs.msg.Header()
186
- end = 0
187
- _x = self
188
- start = end
189
- end += 12
190
- (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
191
- start = end
192
- end += 4
193
- (length,) = _struct_I.unpack(str[start:end])
194
- start = end
195
- end += length
196
- if python3:
197
- self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
198
- else:
199
- self.header.frame_id = str[start:end]
200
- start = end
201
- end += 4
202
- (length,) = _struct_I.unpack(str[start:end])
203
- start = end
204
- end += length
205
- self.left_hand_position = str[start:end]
206
- start = end
207
- end += 4
208
- (length,) = _struct_I.unpack(str[start:end])
209
- start = end
210
- end += length
211
- self.right_hand_position = str[start:end]
212
- return self
213
- except struct.error as e:
214
- raise genpy.DeserializationError(e) # most likely buffer underfill
215
-
216
- _struct_I = genpy.struct_I
217
- def _get_struct_I():
218
- global _struct_I
219
- return _struct_I
220
- _struct_3I = None
221
- def _get_struct_3I():
222
- global _struct_3I
223
- if _struct_3I is None:
224
- _struct_3I = struct.Struct("<3I")
225
- return _struct_3I
@@ -1,4 +0,0 @@
1
- from ._changeArmCtrlMode import *
2
- from ._changeArmCtrlModeKuavo import *
3
- from ._fkSrv import *
4
- from ._twoArmHandPoseCmdSrv import *