kuavo-humanoid-sdk 1.1.5__py3-none-any.whl → 1.1.6__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.
- kuavo_humanoid_sdk/__init__.py +0 -2
- kuavo_humanoid_sdk/interfaces/data_types.py +0 -90
- kuavo_humanoid_sdk/kuavo/__init__.py +0 -3
- kuavo_humanoid_sdk/kuavo/core/core.py +20 -238
- kuavo_humanoid_sdk/kuavo/core/ros/control.py +27 -1087
- kuavo_humanoid_sdk/kuavo/core/ros/param.py +4 -142
- kuavo_humanoid_sdk/kuavo/core/ros/state.py +19 -556
- kuavo_humanoid_sdk/kuavo/core/ros_env.py +1 -229
- kuavo_humanoid_sdk/kuavo/dexterous_hand.py +2 -6
- kuavo_humanoid_sdk/kuavo/leju_claw.py +2 -6
- kuavo_humanoid_sdk/kuavo/robot.py +27 -150
- kuavo_humanoid_sdk/kuavo/robot_arm.py +7 -53
- kuavo_humanoid_sdk/kuavo/robot_head.py +0 -10
- kuavo_humanoid_sdk/kuavo/robot_info.py +2 -7
- kuavo_humanoid_sdk/kuavo/robot_state.py +4 -41
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +0 -7
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +0 -5
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +20 -26
- kuavo_humanoid_sdk/msg/motion_capture_ik/msg/__init__.py +9 -0
- kuavo_humanoid_sdk/msg/{kuavo_msgs → motion_capture_ik}/msg/_armHandPose.py +2 -2
- kuavo_humanoid_sdk/msg/{kuavo_msgs → motion_capture_ik}/msg/_handPose.py +2 -2
- kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_headBodyPose.py +145 -0
- kuavo_humanoid_sdk/msg/{kuavo_msgs → motion_capture_ik}/msg/_ikSolveError.py +13 -13
- kuavo_humanoid_sdk/msg/{kuavo_msgs → motion_capture_ik}/msg/_ikSolveParam.py +2 -2
- kuavo_humanoid_sdk/msg/{kuavo_msgs → motion_capture_ik}/msg/_robotArmQVVD.py +2 -2
- kuavo_humanoid_sdk/msg/motion_capture_ik/msg/_robotHandPosition.py +225 -0
- kuavo_humanoid_sdk/msg/{kuavo_msgs → motion_capture_ik}/msg/_twoArmHandPose.py +13 -13
- kuavo_humanoid_sdk/msg/{kuavo_msgs → motion_capture_ik}/msg/_twoArmHandPoseCmd.py +30 -34
- kuavo_humanoid_sdk/msg/motion_capture_ik/srv/__init__.py +4 -0
- kuavo_humanoid_sdk/msg/{kuavo_msgs/srv/_setMmCtrlFrame.py → motion_capture_ik/srv/_changeArmCtrlMode.py} +37 -35
- kuavo_humanoid_sdk/msg/{kuavo_msgs → motion_capture_ik}/srv/_changeArmCtrlModeKuavo.py +5 -5
- kuavo_humanoid_sdk/msg/{kuavo_msgs → motion_capture_ik}/srv/_fkSrv.py +13 -13
- kuavo_humanoid_sdk/msg/{kuavo_msgs → motion_capture_ik}/srv/_twoArmHandPoseCmdSrv.py +37 -38
- {kuavo_humanoid_sdk-1.1.5.dist-info → kuavo_humanoid_sdk-1.1.6.dist-info}/METADATA +1 -2
- {kuavo_humanoid_sdk-1.1.5.dist-info → kuavo_humanoid_sdk-1.1.6.dist-info}/RECORD +37 -46
- kuavo_humanoid_sdk/common/global_config.py +0 -16
- kuavo_humanoid_sdk/common/websocket_kuavo_sdk.py +0 -23
- kuavo_humanoid_sdk/kuavo/core/audio.py +0 -36
- kuavo_humanoid_sdk/kuavo/core/ros/audio.py +0 -176
- kuavo_humanoid_sdk/kuavo/core/ros/tools.py +0 -158
- kuavo_humanoid_sdk/kuavo/core/ros/vision.py +0 -283
- kuavo_humanoid_sdk/kuavo/robot_audio.py +0 -39
- kuavo_humanoid_sdk/kuavo/robot_tool.py +0 -62
- kuavo_humanoid_sdk/kuavo/robot_vision.py +0 -90
- kuavo_humanoid_sdk/kuavo_strategy/__init__.py +0 -2
- kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +0 -418
- kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +0 -63
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +0 -270
- {kuavo_humanoid_sdk-1.1.5.dist-info → kuavo_humanoid_sdk-1.1.6.dist-info}/WHEEL +0 -0
- {kuavo_humanoid_sdk-1.1.5.dist-info → kuavo_humanoid_sdk-1.1.6.dist-info}/top_level.txt +0 -0
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
# coding: utf-8
|
|
3
3
|
from typing import Tuple
|
|
4
4
|
from kuavo_humanoid_sdk.interfaces.robot_info import RobotInfoBase
|
|
5
|
-
from kuavo_humanoid_sdk.kuavo.core.ros.param import RosParameter,
|
|
6
|
-
from kuavo_humanoid_sdk.common.global_config import GlobalConfig
|
|
5
|
+
from kuavo_humanoid_sdk.kuavo.core.ros.param import RosParameter, make_robot_param
|
|
7
6
|
|
|
8
7
|
class KuavoRobotInfo(RobotInfoBase):
|
|
9
8
|
def __init__(self, robot_type: str = "kuavo"):
|
|
@@ -11,11 +10,7 @@ class KuavoRobotInfo(RobotInfoBase):
|
|
|
11
10
|
|
|
12
11
|
# Load robot parameters from ROS parameter server
|
|
13
12
|
kuavo_ros_param = make_robot_param()
|
|
14
|
-
|
|
15
|
-
self._ros_param = RosParamWebsocket()
|
|
16
|
-
else:
|
|
17
|
-
self._ros_param = RosParameter()
|
|
18
|
-
|
|
13
|
+
self._ros_param = RosParameter()
|
|
19
14
|
self._robot_version = kuavo_ros_param['robot_version']
|
|
20
15
|
self._end_effector_type = kuavo_ros_param['end_effector_type']
|
|
21
16
|
self._arm_joint_dof = kuavo_ros_param['arm_dof']
|
|
@@ -3,17 +3,12 @@
|
|
|
3
3
|
import time
|
|
4
4
|
from typing import Tuple
|
|
5
5
|
from kuavo_humanoid_sdk.interfaces.data_types import (
|
|
6
|
-
KuavoImuData, KuavoJointData, KuavoOdometry, KuavoArmCtrlMode,EndEffectorState
|
|
7
|
-
|
|
8
|
-
from kuavo_humanoid_sdk.kuavo.core.ros.state import KuavoRobotStateCore, KuavoRobotStateCoreWebsocket
|
|
9
|
-
from kuavo_humanoid_sdk.common.global_config import GlobalConfig
|
|
6
|
+
KuavoImuData, KuavoJointData, KuavoOdometry, KuavoArmCtrlMode,EndEffectorState)
|
|
7
|
+
from kuavo_humanoid_sdk.kuavo.core.ros.state import KuavoRobotStateCore
|
|
10
8
|
|
|
11
9
|
class KuavoRobotState:
|
|
12
10
|
def __init__(self, robot_type: str = "kuavo"):
|
|
13
|
-
|
|
14
|
-
self._rs_core = KuavoRobotStateCoreWebsocket()
|
|
15
|
-
else:
|
|
16
|
-
self._rs_core = KuavoRobotStateCore()
|
|
11
|
+
self._rs_core = KuavoRobotStateCore()
|
|
17
12
|
|
|
18
13
|
@property
|
|
19
14
|
def imu_data(self) -> KuavoImuData:
|
|
@@ -148,31 +143,6 @@ class KuavoRobotState:
|
|
|
148
143
|
"""
|
|
149
144
|
return self._rs_core.arm_control_mode
|
|
150
145
|
|
|
151
|
-
def manipulation_mpc_ctrl_mode(self) -> KuavoManipulationMpcCtrlMode:
|
|
152
|
-
"""Get the current control mode of the robot manipulation MPC.
|
|
153
|
-
|
|
154
|
-
Returns:
|
|
155
|
-
KuavoManipulationMpcCtrlMode: Current manipulation MPC control mode.
|
|
156
|
-
|
|
157
|
-
"""
|
|
158
|
-
return self._rs_core.manipulation_mpc_ctrl_mode
|
|
159
|
-
|
|
160
|
-
def manipulation_mpc_control_flow(self) -> KuavoManipulationMpcControlFlow:
|
|
161
|
-
"""Get the current control flow of the robot manipulation.
|
|
162
|
-
|
|
163
|
-
Returns:
|
|
164
|
-
KuavoManipulationMpcControlFlow: Current manipulation control flow.
|
|
165
|
-
"""
|
|
166
|
-
return self._rs_core.manipulation_mpc_control_flow
|
|
167
|
-
|
|
168
|
-
def manipulation_mpc_frame(self) -> KuavoManipulationMpcFrame:
|
|
169
|
-
"""Get the current frame of the robot manipulation MPC.
|
|
170
|
-
|
|
171
|
-
Returns:
|
|
172
|
-
KuavoManipulationMpcFrame: Current manipulation MPC frame.
|
|
173
|
-
"""
|
|
174
|
-
return self._rs_core.manipulation_mpc_frame
|
|
175
|
-
|
|
176
146
|
def head_joint_state(self) -> KuavoJointData:
|
|
177
147
|
"""Get the current state of the robot head joints.
|
|
178
148
|
|
|
@@ -296,11 +266,4 @@ class KuavoRobotState:
|
|
|
296
266
|
while not self._rs_core.is_gait('custom_gait') and wait_time < timeout:
|
|
297
267
|
time.sleep(0.1)
|
|
298
268
|
wait_time += 0.1
|
|
299
|
-
return self._rs_core.is_gait('custom_gait')
|
|
300
|
-
|
|
301
|
-
# if __name__ == "__main__":
|
|
302
|
-
# state = KuavoRobotState()
|
|
303
|
-
# print(state.manipulation_mpc_frame())
|
|
304
|
-
# print(state.manipulation_mpc_control_flow())
|
|
305
|
-
# print(state.manipulation_mpc_ctrl_mode())
|
|
306
|
-
# print(state.arm_control_mode())
|
|
269
|
+
return self._rs_core.is_gait('custom_gait')
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from ._AprilTagDetection import *
|
|
2
2
|
from ._AprilTagDetectionArray import *
|
|
3
3
|
from ._Metadata import *
|
|
4
|
-
from ._armHandPose import *
|
|
5
4
|
from ._armPoseWithTimeStamp import *
|
|
6
5
|
from ._armTargetPoses import *
|
|
7
6
|
from ._dexhandCommand import *
|
|
@@ -12,24 +11,18 @@ from ._footPoseTargetTrajectories import *
|
|
|
12
11
|
from ._gaitTimeName import *
|
|
13
12
|
from ._gestureInfo import *
|
|
14
13
|
from ._gestureTask import *
|
|
15
|
-
from ._handPose import *
|
|
16
14
|
from ._headBodyPose import *
|
|
17
|
-
from ._ikSolveError import *
|
|
18
|
-
from ._ikSolveParam import *
|
|
19
15
|
from ._imuData import *
|
|
20
16
|
from ._jointCmd import *
|
|
21
17
|
from ._jointData import *
|
|
22
18
|
from ._lejuClawCommand import *
|
|
23
19
|
from ._lejuClawState import *
|
|
24
20
|
from ._questJoySticks import *
|
|
25
|
-
from ._robotArmQVVD import *
|
|
26
21
|
from ._robotHandPosition import *
|
|
27
22
|
from ._robotHeadMotionData import *
|
|
28
23
|
from ._robotState import *
|
|
29
24
|
from ._sensorsData import *
|
|
30
25
|
from ._switchGaitByName import *
|
|
31
26
|
from ._touchSensorStatus import *
|
|
32
|
-
from ._twoArmHandPose import *
|
|
33
|
-
from ._twoArmHandPoseCmd import *
|
|
34
27
|
from ._yoloDetection import *
|
|
35
28
|
from ._yoloOutputData import *
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
from ._SpeechSynthesis import *
|
|
2
1
|
from ._changeArmCtrlMode import *
|
|
3
|
-
from ._changeArmCtrlModeKuavo import *
|
|
4
2
|
from ._changeTorsoCtrlMode import *
|
|
5
3
|
from ._controlLejuClaw import *
|
|
6
4
|
from ._enableHandTouchSensor import *
|
|
7
|
-
from ._fkSrv import *
|
|
8
5
|
from ._footPoseTargetTrajectoriesSrv import *
|
|
9
6
|
from ._gestureExecute import *
|
|
10
7
|
from ._gestureExecuteState import *
|
|
@@ -14,8 +11,6 @@ from ._handForceLevel import *
|
|
|
14
11
|
from ._jointMoveTo import *
|
|
15
12
|
from ._playmusic import *
|
|
16
13
|
from ._setHwIntialState import *
|
|
17
|
-
from ._setMmCtrlFrame import *
|
|
18
14
|
from ._setMotorEncoderRoundService import *
|
|
19
15
|
from ._setTagId import *
|
|
20
16
|
from ._singleStepControl import *
|
|
21
|
-
from ._twoArmHandPoseCmdSrv import *
|
|
@@ -8,15 +8,14 @@ import struct
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class playmusicRequest(genpy.Message):
|
|
11
|
-
_md5sum = "
|
|
11
|
+
_md5sum = "b4bd61c49344d06e17224a3598f23d8e"
|
|
12
12
|
_type = "kuavo_msgs/playmusicRequest"
|
|
13
13
|
_has_header = False # flag to mark the presence of a Header object
|
|
14
14
|
_full_text = """string music_number
|
|
15
|
-
|
|
16
|
-
float32 speed
|
|
15
|
+
int64 volume
|
|
17
16
|
"""
|
|
18
|
-
__slots__ = ['music_number','volume'
|
|
19
|
-
_slot_types = ['string','
|
|
17
|
+
__slots__ = ['music_number','volume']
|
|
18
|
+
_slot_types = ['string','int64']
|
|
20
19
|
|
|
21
20
|
def __init__(self, *args, **kwds):
|
|
22
21
|
"""
|
|
@@ -26,7 +25,7 @@ float32 speed
|
|
|
26
25
|
changes. You cannot mix in-order arguments and keyword arguments.
|
|
27
26
|
|
|
28
27
|
The available fields are:
|
|
29
|
-
music_number,volume
|
|
28
|
+
music_number,volume
|
|
30
29
|
|
|
31
30
|
:param args: complete set of field values, in .msg order
|
|
32
31
|
:param kwds: use keyword arguments corresponding to message field names
|
|
@@ -38,13 +37,10 @@ float32 speed
|
|
|
38
37
|
if self.music_number is None:
|
|
39
38
|
self.music_number = ''
|
|
40
39
|
if self.volume is None:
|
|
41
|
-
self.volume = 0
|
|
42
|
-
if self.speed is None:
|
|
43
|
-
self.speed = 0.
|
|
40
|
+
self.volume = 0
|
|
44
41
|
else:
|
|
45
42
|
self.music_number = ''
|
|
46
|
-
self.volume = 0
|
|
47
|
-
self.speed = 0.
|
|
43
|
+
self.volume = 0
|
|
48
44
|
|
|
49
45
|
def _get_types(self):
|
|
50
46
|
"""
|
|
@@ -64,8 +60,8 @@ float32 speed
|
|
|
64
60
|
_x = _x.encode('utf-8')
|
|
65
61
|
length = len(_x)
|
|
66
62
|
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
67
|
-
_x = self
|
|
68
|
-
buff.write(
|
|
63
|
+
_x = self.volume
|
|
64
|
+
buff.write(_get_struct_q().pack(_x))
|
|
69
65
|
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
70
66
|
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
71
67
|
|
|
@@ -87,10 +83,9 @@ float32 speed
|
|
|
87
83
|
self.music_number = str[start:end].decode('utf-8', 'rosmsg')
|
|
88
84
|
else:
|
|
89
85
|
self.music_number = str[start:end]
|
|
90
|
-
_x = self
|
|
91
86
|
start = end
|
|
92
87
|
end += 8
|
|
93
|
-
(
|
|
88
|
+
(self.volume,) = _get_struct_q().unpack(str[start:end])
|
|
94
89
|
return self
|
|
95
90
|
except struct.error as e:
|
|
96
91
|
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
@@ -109,8 +104,8 @@ float32 speed
|
|
|
109
104
|
_x = _x.encode('utf-8')
|
|
110
105
|
length = len(_x)
|
|
111
106
|
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
112
|
-
_x = self
|
|
113
|
-
buff.write(
|
|
107
|
+
_x = self.volume
|
|
108
|
+
buff.write(_get_struct_q().pack(_x))
|
|
114
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)))))
|
|
115
110
|
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
116
111
|
|
|
@@ -133,10 +128,9 @@ float32 speed
|
|
|
133
128
|
self.music_number = str[start:end].decode('utf-8', 'rosmsg')
|
|
134
129
|
else:
|
|
135
130
|
self.music_number = str[start:end]
|
|
136
|
-
_x = self
|
|
137
131
|
start = end
|
|
138
132
|
end += 8
|
|
139
|
-
(
|
|
133
|
+
(self.volume,) = _get_struct_q().unpack(str[start:end])
|
|
140
134
|
return self
|
|
141
135
|
except struct.error as e:
|
|
142
136
|
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
@@ -145,12 +139,12 @@ _struct_I = genpy.struct_I
|
|
|
145
139
|
def _get_struct_I():
|
|
146
140
|
global _struct_I
|
|
147
141
|
return _struct_I
|
|
148
|
-
|
|
149
|
-
def
|
|
150
|
-
global
|
|
151
|
-
if
|
|
152
|
-
|
|
153
|
-
return
|
|
142
|
+
_struct_q = None
|
|
143
|
+
def _get_struct_q():
|
|
144
|
+
global _struct_q
|
|
145
|
+
if _struct_q is None:
|
|
146
|
+
_struct_q = struct.Struct("<q")
|
|
147
|
+
return _struct_q
|
|
154
148
|
# This Python file uses the following encoding: utf-8
|
|
155
149
|
"""autogenerated by genpy from kuavo_msgs/playmusicResponse.msg. Do not edit."""
|
|
156
150
|
import codecs
|
|
@@ -269,6 +263,6 @@ def _get_struct_B():
|
|
|
269
263
|
return _struct_B
|
|
270
264
|
class playmusic(object):
|
|
271
265
|
_type = 'kuavo_msgs/playmusic'
|
|
272
|
-
_md5sum = '
|
|
266
|
+
_md5sum = '3d99283888736c5e18f20ac685e5f8bf'
|
|
273
267
|
_request_class = playmusicRequest
|
|
274
268
|
_response_class = playmusicResponse
|
|
@@ -0,0 +1,9 @@
|
|
|
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,5 +1,5 @@
|
|
|
1
1
|
# This Python file uses the following encoding: utf-8
|
|
2
|
-
"""autogenerated by genpy from
|
|
2
|
+
"""autogenerated by genpy from motion_capture_ik/armHandPose.msg. Do not edit."""
|
|
3
3
|
import codecs
|
|
4
4
|
import sys
|
|
5
5
|
python3 = True if sys.hexversion > 0x03000000 else False
|
|
@@ -9,7 +9,7 @@ import struct
|
|
|
9
9
|
|
|
10
10
|
class armHandPose(genpy.Message):
|
|
11
11
|
_md5sum = "4f28a253cb60d59c6491569369f38f4d"
|
|
12
|
-
_type = "
|
|
12
|
+
_type = "motion_capture_ik/armHandPose"
|
|
13
13
|
_has_header = False # flag to mark the presence of a Header object
|
|
14
14
|
_full_text = """float64[3] pos_xyz
|
|
15
15
|
float64[4] quat_xyzw
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This Python file uses the following encoding: utf-8
|
|
2
|
-
"""autogenerated by genpy from
|
|
2
|
+
"""autogenerated by genpy from motion_capture_ik/handPose.msg. Do not edit."""
|
|
3
3
|
import codecs
|
|
4
4
|
import sys
|
|
5
5
|
python3 = True if sys.hexversion > 0x03000000 else False
|
|
@@ -9,7 +9,7 @@ import struct
|
|
|
9
9
|
|
|
10
10
|
class handPose(genpy.Message):
|
|
11
11
|
_md5sum = "1a83f0bdabe750ce0cfb45a14ec63457"
|
|
12
|
-
_type = "
|
|
12
|
+
_type = "motion_capture_ik/handPose"
|
|
13
13
|
_has_header = False # flag to mark the presence of a Header object
|
|
14
14
|
_full_text = """# pos
|
|
15
15
|
float64 x
|
|
@@ -0,0 +1,145 @@
|
|
|
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,22 +1,22 @@
|
|
|
1
1
|
# This Python file uses the following encoding: utf-8
|
|
2
|
-
"""autogenerated by genpy from
|
|
2
|
+
"""autogenerated by genpy from motion_capture_ik/ikSolveError.msg. Do not edit."""
|
|
3
3
|
import codecs
|
|
4
4
|
import sys
|
|
5
5
|
python3 = True if sys.hexversion > 0x03000000 else False
|
|
6
6
|
import genpy
|
|
7
7
|
import struct
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import motion_capture_ik.msg
|
|
10
10
|
|
|
11
11
|
class ikSolveError(genpy.Message):
|
|
12
12
|
_md5sum = "06c12c0e6e08f286627a6f856e26223c"
|
|
13
|
-
_type = "
|
|
13
|
+
_type = "motion_capture_ik/ikSolveError"
|
|
14
14
|
_has_header = False # flag to mark the presence of a Header object
|
|
15
15
|
_full_text = """string ik_type
|
|
16
16
|
handPose left_pose_error
|
|
17
17
|
handPose right_pose_error
|
|
18
18
|
================================================================================
|
|
19
|
-
MSG:
|
|
19
|
+
MSG: motion_capture_ik/handPose
|
|
20
20
|
# pos
|
|
21
21
|
float64 x
|
|
22
22
|
float64 y
|
|
@@ -26,7 +26,7 @@ float64 roll
|
|
|
26
26
|
float64 pitch
|
|
27
27
|
float64 yaw"""
|
|
28
28
|
__slots__ = ['ik_type','left_pose_error','right_pose_error']
|
|
29
|
-
_slot_types = ['string','
|
|
29
|
+
_slot_types = ['string','motion_capture_ik/handPose','motion_capture_ik/handPose']
|
|
30
30
|
|
|
31
31
|
def __init__(self, *args, **kwds):
|
|
32
32
|
"""
|
|
@@ -48,13 +48,13 @@ float64 yaw"""
|
|
|
48
48
|
if self.ik_type is None:
|
|
49
49
|
self.ik_type = ''
|
|
50
50
|
if self.left_pose_error is None:
|
|
51
|
-
self.left_pose_error =
|
|
51
|
+
self.left_pose_error = motion_capture_ik.msg.handPose()
|
|
52
52
|
if self.right_pose_error is None:
|
|
53
|
-
self.right_pose_error =
|
|
53
|
+
self.right_pose_error = motion_capture_ik.msg.handPose()
|
|
54
54
|
else:
|
|
55
55
|
self.ik_type = ''
|
|
56
|
-
self.left_pose_error =
|
|
57
|
-
self.right_pose_error =
|
|
56
|
+
self.left_pose_error = motion_capture_ik.msg.handPose()
|
|
57
|
+
self.right_pose_error = motion_capture_ik.msg.handPose()
|
|
58
58
|
|
|
59
59
|
def _get_types(self):
|
|
60
60
|
"""
|
|
@@ -88,9 +88,9 @@ float64 yaw"""
|
|
|
88
88
|
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
89
89
|
try:
|
|
90
90
|
if self.left_pose_error is None:
|
|
91
|
-
self.left_pose_error =
|
|
91
|
+
self.left_pose_error = motion_capture_ik.msg.handPose()
|
|
92
92
|
if self.right_pose_error is None:
|
|
93
|
-
self.right_pose_error =
|
|
93
|
+
self.right_pose_error = motion_capture_ik.msg.handPose()
|
|
94
94
|
end = 0
|
|
95
95
|
start = end
|
|
96
96
|
end += 4
|
|
@@ -138,9 +138,9 @@ float64 yaw"""
|
|
|
138
138
|
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
139
139
|
try:
|
|
140
140
|
if self.left_pose_error is None:
|
|
141
|
-
self.left_pose_error =
|
|
141
|
+
self.left_pose_error = motion_capture_ik.msg.handPose()
|
|
142
142
|
if self.right_pose_error is None:
|
|
143
|
-
self.right_pose_error =
|
|
143
|
+
self.right_pose_error = motion_capture_ik.msg.handPose()
|
|
144
144
|
end = 0
|
|
145
145
|
start = end
|
|
146
146
|
end += 4
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This Python file uses the following encoding: utf-8
|
|
2
|
-
"""autogenerated by genpy from
|
|
2
|
+
"""autogenerated by genpy from motion_capture_ik/ikSolveParam.msg. Do not edit."""
|
|
3
3
|
import codecs
|
|
4
4
|
import sys
|
|
5
5
|
python3 = True if sys.hexversion > 0x03000000 else False
|
|
@@ -9,7 +9,7 @@ import struct
|
|
|
9
9
|
|
|
10
10
|
class ikSolveParam(genpy.Message):
|
|
11
11
|
_md5sum = "be29d8b02ad14da680464b8c4f590f98"
|
|
12
|
-
_type = "
|
|
12
|
+
_type = "motion_capture_ik/ikSolveParam"
|
|
13
13
|
_has_header = False # flag to mark the presence of a Header object
|
|
14
14
|
_full_text = """# snopt params
|
|
15
15
|
float64 major_optimality_tol
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This Python file uses the following encoding: utf-8
|
|
2
|
-
"""autogenerated by genpy from
|
|
2
|
+
"""autogenerated by genpy from motion_capture_ik/robotArmQVVD.msg. Do not edit."""
|
|
3
3
|
import codecs
|
|
4
4
|
import sys
|
|
5
5
|
python3 = True if sys.hexversion > 0x03000000 else False
|
|
@@ -9,7 +9,7 @@ import struct
|
|
|
9
9
|
|
|
10
10
|
class robotArmQVVD(genpy.Message):
|
|
11
11
|
_md5sum = "f2840165d02c529a8a4e8e04370a219b"
|
|
12
|
-
_type = "
|
|
12
|
+
_type = "motion_capture_ik/robotArmQVVD"
|
|
13
13
|
_has_header = False # flag to mark the presence of a Header object
|
|
14
14
|
_full_text = """float64[] q
|
|
15
15
|
float64[] v
|