kuavo-humanoid-sdk 1.2.2b3208__20250922170818-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 +6 -0
- kuavo_humanoid_sdk/common/logger.py +45 -0
- kuavo_humanoid_sdk/interfaces/__init__.py +4 -0
- kuavo_humanoid_sdk/interfaces/data_types.py +288 -0
- kuavo_humanoid_sdk/interfaces/end_effector.py +62 -0
- kuavo_humanoid_sdk/interfaces/robot.py +22 -0
- kuavo_humanoid_sdk/interfaces/robot_info.py +56 -0
- kuavo_humanoid_sdk/kuavo/__init__.py +16 -0
- kuavo_humanoid_sdk/kuavo/core/audio.py +32 -0
- kuavo_humanoid_sdk/kuavo/core/core.py +666 -0
- kuavo_humanoid_sdk/kuavo/core/dex_hand_control.py +114 -0
- kuavo_humanoid_sdk/kuavo/core/leju_claw_control.py +67 -0
- kuavo_humanoid_sdk/kuavo/core/llm_doubao.py +608 -0
- kuavo_humanoid_sdk/kuavo/core/microphone.py +192 -0
- kuavo_humanoid_sdk/kuavo/core/navigation.py +70 -0
- kuavo_humanoid_sdk/kuavo/core/ros/audio.py +110 -0
- kuavo_humanoid_sdk/kuavo/core/ros/camera.py +105 -0
- kuavo_humanoid_sdk/kuavo/core/ros/control.py +1524 -0
- kuavo_humanoid_sdk/kuavo/core/ros/microphone.py +38 -0
- kuavo_humanoid_sdk/kuavo/core/ros/navigation.py +217 -0
- kuavo_humanoid_sdk/kuavo/core/ros/observation.py +94 -0
- kuavo_humanoid_sdk/kuavo/core/ros/param.py +201 -0
- kuavo_humanoid_sdk/kuavo/core/ros/sat_utils.py +103 -0
- kuavo_humanoid_sdk/kuavo/core/ros/state.py +652 -0
- kuavo_humanoid_sdk/kuavo/core/ros/tools.py +220 -0
- kuavo_humanoid_sdk/kuavo/core/ros/vision.py +234 -0
- kuavo_humanoid_sdk/kuavo/core/ros_env.py +238 -0
- kuavo_humanoid_sdk/kuavo/core/sdk_deprecated.py +41 -0
- kuavo_humanoid_sdk/kuavo/demo_climbstair.py +249 -0
- kuavo_humanoid_sdk/kuavo/dexterous_hand.py +238 -0
- kuavo_humanoid_sdk/kuavo/leju_claw.py +235 -0
- kuavo_humanoid_sdk/kuavo/logger_client.py +80 -0
- kuavo_humanoid_sdk/kuavo/robot.py +646 -0
- kuavo_humanoid_sdk/kuavo/robot_arm.py +411 -0
- kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
- kuavo_humanoid_sdk/kuavo/robot_blockly.py +1154 -0
- kuavo_humanoid_sdk/kuavo/robot_climbstair.py +1607 -0
- kuavo_humanoid_sdk/kuavo/robot_head.py +95 -0
- kuavo_humanoid_sdk/kuavo/robot_info.py +134 -0
- kuavo_humanoid_sdk/kuavo/robot_microphone.py +19 -0
- kuavo_humanoid_sdk/kuavo/robot_navigation.py +135 -0
- kuavo_humanoid_sdk/kuavo/robot_observation.py +64 -0
- kuavo_humanoid_sdk/kuavo/robot_speech.py +24 -0
- kuavo_humanoid_sdk/kuavo/robot_state.py +310 -0
- kuavo_humanoid_sdk/kuavo/robot_tool.py +109 -0
- kuavo_humanoid_sdk/kuavo/robot_vision.py +81 -0
- kuavo_humanoid_sdk/kuavo_strategy/__init__.py +2 -0
- kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +1325 -0
- kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +106 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/common/data_type.py +340 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/common/events/base_event.py +215 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/common/robot_sdk.py +25 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/case.py +331 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/strategy.py +504 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/utils/logger_setup.py +40 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/utils/utils.py +88 -0
- kuavo_humanoid_sdk/msg/__init__.py +4 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetection.py +306 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetectionArray.py +437 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AudioReceiverData.py +122 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_FTsensorData.py +260 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_JoySticks.py +191 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_MmDetectionMsg.py +264 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TaskPoint.py +175 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +62 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armCollisionCheckInfo.py +160 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +161 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +171 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6D.py +123 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6DTargetTrajectories.py +320 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVision.py +136 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVisionArray.py +231 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses6D.py +149 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_kuavoModeSchedule.py +224 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfo.py +143 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfoList.py +220 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotBodyMatrices.py +332 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +655 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_tagDataArray.py +216 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +273 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +316 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_CreatePath.py +581 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetAllMaps.py +241 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetCurrentMap.py +225 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetTargetPartPoseInCamera.py +298 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_InitialPoseWithTaskPoint.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_LoadMap.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_NavigateToTaskPoint.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetInitialPose.py +394 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode.py +468 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode_free.py +289 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_TaskPointOperation.py +536 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +43 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_adjustZeroPoint.py +277 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +395 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPose6DTargetTrajectoriesSrv.py +426 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorZeroPoints.py +286 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +422 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +664 -0
- kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
- kuavo_humanoid_sdk-1.2.2b3208.dist-info/METADATA +297 -0
- kuavo_humanoid_sdk-1.2.2b3208.dist-info/RECORD +186 -0
- kuavo_humanoid_sdk-1.2.2b3208.dist-info/WHEEL +6 -0
- kuavo_humanoid_sdk-1.2.2b3208.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/gestureTask.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 gestureTask(genpy.Message):
|
|
11
|
+
_md5sum = "be7fe1eba1df13c392c3a5d13b9f3dae"
|
|
12
|
+
_type = "kuavo_msgs/gestureTask"
|
|
13
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
14
|
+
_full_text = """# This message is used to specify a gesture to execute.
|
|
15
|
+
# The gesture is triggered by providing its name and the side of the hand(s) to use.
|
|
16
|
+
|
|
17
|
+
string gesture_name # Name of the gesture to execute
|
|
18
|
+
int8 hand_side # Side of the hand to use (e.g., 0 for left, 1 for right, 2 for both)"""
|
|
19
|
+
__slots__ = ['gesture_name','hand_side']
|
|
20
|
+
_slot_types = ['string','int8']
|
|
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
|
+
gesture_name,hand_side
|
|
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(gestureTask, self).__init__(*args, **kwds)
|
|
38
|
+
# message fields cannot be None, assign default values for those that are
|
|
39
|
+
if self.gesture_name is None:
|
|
40
|
+
self.gesture_name = ''
|
|
41
|
+
if self.hand_side is None:
|
|
42
|
+
self.hand_side = 0
|
|
43
|
+
else:
|
|
44
|
+
self.gesture_name = ''
|
|
45
|
+
self.hand_side = 0
|
|
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
|
+
_x = self.gesture_name
|
|
60
|
+
length = len(_x)
|
|
61
|
+
if python3 or type(_x) == unicode:
|
|
62
|
+
_x = _x.encode('utf-8')
|
|
63
|
+
length = len(_x)
|
|
64
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
65
|
+
_x = self.hand_side
|
|
66
|
+
buff.write(_get_struct_b().pack(_x))
|
|
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
|
+
start = end
|
|
83
|
+
end += length
|
|
84
|
+
if python3:
|
|
85
|
+
self.gesture_name = str[start:end].decode('utf-8', 'rosmsg')
|
|
86
|
+
else:
|
|
87
|
+
self.gesture_name = str[start:end]
|
|
88
|
+
start = end
|
|
89
|
+
end += 1
|
|
90
|
+
(self.hand_side,) = _get_struct_b().unpack(str[start:end])
|
|
91
|
+
return self
|
|
92
|
+
except struct.error as e:
|
|
93
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def serialize_numpy(self, buff, numpy):
|
|
97
|
+
"""
|
|
98
|
+
serialize message with numpy array types into buffer
|
|
99
|
+
:param buff: buffer, ``StringIO``
|
|
100
|
+
:param numpy: numpy python module
|
|
101
|
+
"""
|
|
102
|
+
try:
|
|
103
|
+
_x = self.gesture_name
|
|
104
|
+
length = len(_x)
|
|
105
|
+
if python3 or type(_x) == unicode:
|
|
106
|
+
_x = _x.encode('utf-8')
|
|
107
|
+
length = len(_x)
|
|
108
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
109
|
+
_x = self.hand_side
|
|
110
|
+
buff.write(_get_struct_b().pack(_x))
|
|
111
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
112
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
113
|
+
|
|
114
|
+
def deserialize_numpy(self, str, numpy):
|
|
115
|
+
"""
|
|
116
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
117
|
+
:param str: byte array of serialized message, ``str``
|
|
118
|
+
:param numpy: numpy python module
|
|
119
|
+
"""
|
|
120
|
+
if python3:
|
|
121
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
122
|
+
try:
|
|
123
|
+
end = 0
|
|
124
|
+
start = end
|
|
125
|
+
end += 4
|
|
126
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
127
|
+
start = end
|
|
128
|
+
end += length
|
|
129
|
+
if python3:
|
|
130
|
+
self.gesture_name = str[start:end].decode('utf-8', 'rosmsg')
|
|
131
|
+
else:
|
|
132
|
+
self.gesture_name = str[start:end]
|
|
133
|
+
start = end
|
|
134
|
+
end += 1
|
|
135
|
+
(self.hand_side,) = _get_struct_b().unpack(str[start:end])
|
|
136
|
+
return self
|
|
137
|
+
except struct.error as e:
|
|
138
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
139
|
+
|
|
140
|
+
_struct_I = genpy.struct_I
|
|
141
|
+
def _get_struct_I():
|
|
142
|
+
global _struct_I
|
|
143
|
+
return _struct_I
|
|
144
|
+
_struct_b = None
|
|
145
|
+
def _get_struct_b():
|
|
146
|
+
global _struct_b
|
|
147
|
+
if _struct_b is None:
|
|
148
|
+
_struct_b = struct.Struct("<b")
|
|
149
|
+
return _struct_b
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/handPose.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 handPose(genpy.Message):
|
|
11
|
+
_md5sum = "1a83f0bdabe750ce0cfb45a14ec63457"
|
|
12
|
+
_type = "kuavo_msgs/handPose"
|
|
13
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
14
|
+
_full_text = """# pos
|
|
15
|
+
float64 x
|
|
16
|
+
float64 y
|
|
17
|
+
float64 z
|
|
18
|
+
# rpy
|
|
19
|
+
float64 roll
|
|
20
|
+
float64 pitch
|
|
21
|
+
float64 yaw"""
|
|
22
|
+
__slots__ = ['x','y','z','roll','pitch','yaw']
|
|
23
|
+
_slot_types = ['float64','float64','float64','float64','float64','float64']
|
|
24
|
+
|
|
25
|
+
def __init__(self, *args, **kwds):
|
|
26
|
+
"""
|
|
27
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
28
|
+
set to None will be assigned a default value. The recommend
|
|
29
|
+
use is keyword arguments as this is more robust to future message
|
|
30
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
31
|
+
|
|
32
|
+
The available fields are:
|
|
33
|
+
x,y,z,roll,pitch,yaw
|
|
34
|
+
|
|
35
|
+
:param args: complete set of field values, in .msg order
|
|
36
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
37
|
+
to set specific fields.
|
|
38
|
+
"""
|
|
39
|
+
if args or kwds:
|
|
40
|
+
super(handPose, self).__init__(*args, **kwds)
|
|
41
|
+
# message fields cannot be None, assign default values for those that are
|
|
42
|
+
if self.x is None:
|
|
43
|
+
self.x = 0.
|
|
44
|
+
if self.y is None:
|
|
45
|
+
self.y = 0.
|
|
46
|
+
if self.z is None:
|
|
47
|
+
self.z = 0.
|
|
48
|
+
if self.roll is None:
|
|
49
|
+
self.roll = 0.
|
|
50
|
+
if self.pitch is None:
|
|
51
|
+
self.pitch = 0.
|
|
52
|
+
if self.yaw is None:
|
|
53
|
+
self.yaw = 0.
|
|
54
|
+
else:
|
|
55
|
+
self.x = 0.
|
|
56
|
+
self.y = 0.
|
|
57
|
+
self.z = 0.
|
|
58
|
+
self.roll = 0.
|
|
59
|
+
self.pitch = 0.
|
|
60
|
+
self.yaw = 0.
|
|
61
|
+
|
|
62
|
+
def _get_types(self):
|
|
63
|
+
"""
|
|
64
|
+
internal API method
|
|
65
|
+
"""
|
|
66
|
+
return self._slot_types
|
|
67
|
+
|
|
68
|
+
def serialize(self, buff):
|
|
69
|
+
"""
|
|
70
|
+
serialize message into buffer
|
|
71
|
+
:param buff: buffer, ``StringIO``
|
|
72
|
+
"""
|
|
73
|
+
try:
|
|
74
|
+
_x = self
|
|
75
|
+
buff.write(_get_struct_6d().pack(_x.x, _x.y, _x.z, _x.roll, _x.pitch, _x.yaw))
|
|
76
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
77
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
78
|
+
|
|
79
|
+
def deserialize(self, str):
|
|
80
|
+
"""
|
|
81
|
+
unpack serialized message in str into this message instance
|
|
82
|
+
:param str: byte array of serialized message, ``str``
|
|
83
|
+
"""
|
|
84
|
+
if python3:
|
|
85
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
86
|
+
try:
|
|
87
|
+
end = 0
|
|
88
|
+
_x = self
|
|
89
|
+
start = end
|
|
90
|
+
end += 48
|
|
91
|
+
(_x.x, _x.y, _x.z, _x.roll, _x.pitch, _x.yaw,) = _get_struct_6d().unpack(str[start:end])
|
|
92
|
+
return self
|
|
93
|
+
except struct.error as e:
|
|
94
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def serialize_numpy(self, buff, numpy):
|
|
98
|
+
"""
|
|
99
|
+
serialize message with numpy array types into buffer
|
|
100
|
+
:param buff: buffer, ``StringIO``
|
|
101
|
+
:param numpy: numpy python module
|
|
102
|
+
"""
|
|
103
|
+
try:
|
|
104
|
+
_x = self
|
|
105
|
+
buff.write(_get_struct_6d().pack(_x.x, _x.y, _x.z, _x.roll, _x.pitch, _x.yaw))
|
|
106
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
107
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
108
|
+
|
|
109
|
+
def deserialize_numpy(self, str, numpy):
|
|
110
|
+
"""
|
|
111
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
112
|
+
:param str: byte array of serialized message, ``str``
|
|
113
|
+
:param numpy: numpy python module
|
|
114
|
+
"""
|
|
115
|
+
if python3:
|
|
116
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
117
|
+
try:
|
|
118
|
+
end = 0
|
|
119
|
+
_x = self
|
|
120
|
+
start = end
|
|
121
|
+
end += 48
|
|
122
|
+
(_x.x, _x.y, _x.z, _x.roll, _x.pitch, _x.yaw,) = _get_struct_6d().unpack(str[start:end])
|
|
123
|
+
return self
|
|
124
|
+
except struct.error as e:
|
|
125
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
126
|
+
|
|
127
|
+
_struct_I = genpy.struct_I
|
|
128
|
+
def _get_struct_I():
|
|
129
|
+
global _struct_I
|
|
130
|
+
return _struct_I
|
|
131
|
+
_struct_6d = None
|
|
132
|
+
def _get_struct_6d():
|
|
133
|
+
global _struct_6d
|
|
134
|
+
if _struct_6d is None:
|
|
135
|
+
_struct_6d = struct.Struct("<6d")
|
|
136
|
+
return _struct_6d
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/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 = "kuavo_msgs/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
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/ikSolveError.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 kuavo_msgs.msg
|
|
10
|
+
|
|
11
|
+
class ikSolveError(genpy.Message):
|
|
12
|
+
_md5sum = "06c12c0e6e08f286627a6f856e26223c"
|
|
13
|
+
_type = "kuavo_msgs/ikSolveError"
|
|
14
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
15
|
+
_full_text = """string ik_type
|
|
16
|
+
handPose left_pose_error
|
|
17
|
+
handPose right_pose_error
|
|
18
|
+
================================================================================
|
|
19
|
+
MSG: kuavo_msgs/handPose
|
|
20
|
+
# pos
|
|
21
|
+
float64 x
|
|
22
|
+
float64 y
|
|
23
|
+
float64 z
|
|
24
|
+
# rpy
|
|
25
|
+
float64 roll
|
|
26
|
+
float64 pitch
|
|
27
|
+
float64 yaw"""
|
|
28
|
+
__slots__ = ['ik_type','left_pose_error','right_pose_error']
|
|
29
|
+
_slot_types = ['string','kuavo_msgs/handPose','kuavo_msgs/handPose']
|
|
30
|
+
|
|
31
|
+
def __init__(self, *args, **kwds):
|
|
32
|
+
"""
|
|
33
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
34
|
+
set to None will be assigned a default value. The recommend
|
|
35
|
+
use is keyword arguments as this is more robust to future message
|
|
36
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
37
|
+
|
|
38
|
+
The available fields are:
|
|
39
|
+
ik_type,left_pose_error,right_pose_error
|
|
40
|
+
|
|
41
|
+
:param args: complete set of field values, in .msg order
|
|
42
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
43
|
+
to set specific fields.
|
|
44
|
+
"""
|
|
45
|
+
if args or kwds:
|
|
46
|
+
super(ikSolveError, self).__init__(*args, **kwds)
|
|
47
|
+
# message fields cannot be None, assign default values for those that are
|
|
48
|
+
if self.ik_type is None:
|
|
49
|
+
self.ik_type = ''
|
|
50
|
+
if self.left_pose_error is None:
|
|
51
|
+
self.left_pose_error = kuavo_msgs.msg.handPose()
|
|
52
|
+
if self.right_pose_error is None:
|
|
53
|
+
self.right_pose_error = kuavo_msgs.msg.handPose()
|
|
54
|
+
else:
|
|
55
|
+
self.ik_type = ''
|
|
56
|
+
self.left_pose_error = kuavo_msgs.msg.handPose()
|
|
57
|
+
self.right_pose_error = kuavo_msgs.msg.handPose()
|
|
58
|
+
|
|
59
|
+
def _get_types(self):
|
|
60
|
+
"""
|
|
61
|
+
internal API method
|
|
62
|
+
"""
|
|
63
|
+
return self._slot_types
|
|
64
|
+
|
|
65
|
+
def serialize(self, buff):
|
|
66
|
+
"""
|
|
67
|
+
serialize message into buffer
|
|
68
|
+
:param buff: buffer, ``StringIO``
|
|
69
|
+
"""
|
|
70
|
+
try:
|
|
71
|
+
_x = self.ik_type
|
|
72
|
+
length = len(_x)
|
|
73
|
+
if python3 or type(_x) == unicode:
|
|
74
|
+
_x = _x.encode('utf-8')
|
|
75
|
+
length = len(_x)
|
|
76
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
77
|
+
_x = self
|
|
78
|
+
buff.write(_get_struct_12d().pack(_x.left_pose_error.x, _x.left_pose_error.y, _x.left_pose_error.z, _x.left_pose_error.roll, _x.left_pose_error.pitch, _x.left_pose_error.yaw, _x.right_pose_error.x, _x.right_pose_error.y, _x.right_pose_error.z, _x.right_pose_error.roll, _x.right_pose_error.pitch, _x.right_pose_error.yaw))
|
|
79
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
80
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
81
|
+
|
|
82
|
+
def deserialize(self, str):
|
|
83
|
+
"""
|
|
84
|
+
unpack serialized message in str into this message instance
|
|
85
|
+
:param str: byte array of serialized message, ``str``
|
|
86
|
+
"""
|
|
87
|
+
if python3:
|
|
88
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
89
|
+
try:
|
|
90
|
+
if self.left_pose_error is None:
|
|
91
|
+
self.left_pose_error = kuavo_msgs.msg.handPose()
|
|
92
|
+
if self.right_pose_error is None:
|
|
93
|
+
self.right_pose_error = kuavo_msgs.msg.handPose()
|
|
94
|
+
end = 0
|
|
95
|
+
start = end
|
|
96
|
+
end += 4
|
|
97
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
98
|
+
start = end
|
|
99
|
+
end += length
|
|
100
|
+
if python3:
|
|
101
|
+
self.ik_type = str[start:end].decode('utf-8', 'rosmsg')
|
|
102
|
+
else:
|
|
103
|
+
self.ik_type = str[start:end]
|
|
104
|
+
_x = self
|
|
105
|
+
start = end
|
|
106
|
+
end += 96
|
|
107
|
+
(_x.left_pose_error.x, _x.left_pose_error.y, _x.left_pose_error.z, _x.left_pose_error.roll, _x.left_pose_error.pitch, _x.left_pose_error.yaw, _x.right_pose_error.x, _x.right_pose_error.y, _x.right_pose_error.z, _x.right_pose_error.roll, _x.right_pose_error.pitch, _x.right_pose_error.yaw,) = _get_struct_12d().unpack(str[start:end])
|
|
108
|
+
return self
|
|
109
|
+
except struct.error as e:
|
|
110
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def serialize_numpy(self, buff, numpy):
|
|
114
|
+
"""
|
|
115
|
+
serialize message with numpy array types into buffer
|
|
116
|
+
:param buff: buffer, ``StringIO``
|
|
117
|
+
:param numpy: numpy python module
|
|
118
|
+
"""
|
|
119
|
+
try:
|
|
120
|
+
_x = self.ik_type
|
|
121
|
+
length = len(_x)
|
|
122
|
+
if python3 or type(_x) == unicode:
|
|
123
|
+
_x = _x.encode('utf-8')
|
|
124
|
+
length = len(_x)
|
|
125
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
126
|
+
_x = self
|
|
127
|
+
buff.write(_get_struct_12d().pack(_x.left_pose_error.x, _x.left_pose_error.y, _x.left_pose_error.z, _x.left_pose_error.roll, _x.left_pose_error.pitch, _x.left_pose_error.yaw, _x.right_pose_error.x, _x.right_pose_error.y, _x.right_pose_error.z, _x.right_pose_error.roll, _x.right_pose_error.pitch, _x.right_pose_error.yaw))
|
|
128
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
129
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
130
|
+
|
|
131
|
+
def deserialize_numpy(self, str, numpy):
|
|
132
|
+
"""
|
|
133
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
134
|
+
:param str: byte array of serialized message, ``str``
|
|
135
|
+
:param numpy: numpy python module
|
|
136
|
+
"""
|
|
137
|
+
if python3:
|
|
138
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
139
|
+
try:
|
|
140
|
+
if self.left_pose_error is None:
|
|
141
|
+
self.left_pose_error = kuavo_msgs.msg.handPose()
|
|
142
|
+
if self.right_pose_error is None:
|
|
143
|
+
self.right_pose_error = kuavo_msgs.msg.handPose()
|
|
144
|
+
end = 0
|
|
145
|
+
start = end
|
|
146
|
+
end += 4
|
|
147
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
148
|
+
start = end
|
|
149
|
+
end += length
|
|
150
|
+
if python3:
|
|
151
|
+
self.ik_type = str[start:end].decode('utf-8', 'rosmsg')
|
|
152
|
+
else:
|
|
153
|
+
self.ik_type = str[start:end]
|
|
154
|
+
_x = self
|
|
155
|
+
start = end
|
|
156
|
+
end += 96
|
|
157
|
+
(_x.left_pose_error.x, _x.left_pose_error.y, _x.left_pose_error.z, _x.left_pose_error.roll, _x.left_pose_error.pitch, _x.left_pose_error.yaw, _x.right_pose_error.x, _x.right_pose_error.y, _x.right_pose_error.z, _x.right_pose_error.roll, _x.right_pose_error.pitch, _x.right_pose_error.yaw,) = _get_struct_12d().unpack(str[start:end])
|
|
158
|
+
return self
|
|
159
|
+
except struct.error as e:
|
|
160
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
161
|
+
|
|
162
|
+
_struct_I = genpy.struct_I
|
|
163
|
+
def _get_struct_I():
|
|
164
|
+
global _struct_I
|
|
165
|
+
return _struct_I
|
|
166
|
+
_struct_12d = None
|
|
167
|
+
def _get_struct_12d():
|
|
168
|
+
global _struct_12d
|
|
169
|
+
if _struct_12d is None:
|
|
170
|
+
_struct_12d = struct.Struct("<12d")
|
|
171
|
+
return _struct_12d
|