kuavo-humanoid-sdk 1.2.1b3319__20250917064014-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 +561 -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.1b3319.dist-info/METADATA +297 -0
- kuavo_humanoid_sdk-1.2.1b3319.dist-info/RECORD +186 -0
- kuavo_humanoid_sdk-1.2.1b3319.dist-info/WHEEL +6 -0
- kuavo_humanoid_sdk-1.2.1b3319.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/enableHandTouchSensorRequest.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 enableHandTouchSensorRequest(genpy.Message):
|
|
11
|
+
_md5sum = "0543438552cc194d7406fa44a80edec7"
|
|
12
|
+
_type = "kuavo_msgs/enableHandTouchSensorRequest"
|
|
13
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
14
|
+
_full_text = """# Bit masks for enabling individual touch sensors on the robotic hand
|
|
15
|
+
# Each sensor can be enabled by setting the corresponding bit in the mask
|
|
16
|
+
|
|
17
|
+
# Examples: 0b00000011 enables thumb and index sensors, 0b00000000 disables all sensors
|
|
18
|
+
# ```
|
|
19
|
+
# mask_value = THUMB_SENSOR | INDEX_SENSOR
|
|
20
|
+
# req = enableHandTouchSensorRequest()
|
|
21
|
+
# req.mask = mask_value
|
|
22
|
+
# ```
|
|
23
|
+
|
|
24
|
+
# Thumb finger touch sensor (bit 0)
|
|
25
|
+
uint8 THUMB_SENSOR = 1
|
|
26
|
+
|
|
27
|
+
# Index finger touch sensor (bit 1)
|
|
28
|
+
uint8 INDEX_SENSOR = 2
|
|
29
|
+
|
|
30
|
+
# Middle finger touch sensor (bit 2)
|
|
31
|
+
uint8 MIDDLE_SENSOR = 4
|
|
32
|
+
|
|
33
|
+
# Ring finger touch sensor (bit 3)
|
|
34
|
+
uint8 RING_SENSOR = 8
|
|
35
|
+
|
|
36
|
+
# Pinky finger touch sensor (bit 4)
|
|
37
|
+
uint8 PINKY_SENSOR = 16
|
|
38
|
+
|
|
39
|
+
# Bitmask indicating which sensors to enable
|
|
40
|
+
# Multiple sensors can be enabled by combining masks with bitwise OR
|
|
41
|
+
uint8 mask
|
|
42
|
+
"""
|
|
43
|
+
# Pseudo-constants
|
|
44
|
+
THUMB_SENSOR = 1
|
|
45
|
+
INDEX_SENSOR = 2
|
|
46
|
+
MIDDLE_SENSOR = 4
|
|
47
|
+
RING_SENSOR = 8
|
|
48
|
+
PINKY_SENSOR = 16
|
|
49
|
+
|
|
50
|
+
__slots__ = ['mask']
|
|
51
|
+
_slot_types = ['uint8']
|
|
52
|
+
|
|
53
|
+
def __init__(self, *args, **kwds):
|
|
54
|
+
"""
|
|
55
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
56
|
+
set to None will be assigned a default value. The recommend
|
|
57
|
+
use is keyword arguments as this is more robust to future message
|
|
58
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
59
|
+
|
|
60
|
+
The available fields are:
|
|
61
|
+
mask
|
|
62
|
+
|
|
63
|
+
:param args: complete set of field values, in .msg order
|
|
64
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
65
|
+
to set specific fields.
|
|
66
|
+
"""
|
|
67
|
+
if args or kwds:
|
|
68
|
+
super(enableHandTouchSensorRequest, self).__init__(*args, **kwds)
|
|
69
|
+
# message fields cannot be None, assign default values for those that are
|
|
70
|
+
if self.mask is None:
|
|
71
|
+
self.mask = 0
|
|
72
|
+
else:
|
|
73
|
+
self.mask = 0
|
|
74
|
+
|
|
75
|
+
def _get_types(self):
|
|
76
|
+
"""
|
|
77
|
+
internal API method
|
|
78
|
+
"""
|
|
79
|
+
return self._slot_types
|
|
80
|
+
|
|
81
|
+
def serialize(self, buff):
|
|
82
|
+
"""
|
|
83
|
+
serialize message into buffer
|
|
84
|
+
:param buff: buffer, ``StringIO``
|
|
85
|
+
"""
|
|
86
|
+
try:
|
|
87
|
+
_x = self.mask
|
|
88
|
+
buff.write(_get_struct_B().pack(_x))
|
|
89
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
90
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
91
|
+
|
|
92
|
+
def deserialize(self, str):
|
|
93
|
+
"""
|
|
94
|
+
unpack serialized message in str into this message instance
|
|
95
|
+
:param str: byte array of serialized message, ``str``
|
|
96
|
+
"""
|
|
97
|
+
if python3:
|
|
98
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
99
|
+
try:
|
|
100
|
+
end = 0
|
|
101
|
+
start = end
|
|
102
|
+
end += 1
|
|
103
|
+
(self.mask,) = _get_struct_B().unpack(str[start:end])
|
|
104
|
+
return self
|
|
105
|
+
except struct.error as e:
|
|
106
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def serialize_numpy(self, buff, numpy):
|
|
110
|
+
"""
|
|
111
|
+
serialize message with numpy array types into buffer
|
|
112
|
+
:param buff: buffer, ``StringIO``
|
|
113
|
+
:param numpy: numpy python module
|
|
114
|
+
"""
|
|
115
|
+
try:
|
|
116
|
+
_x = self.mask
|
|
117
|
+
buff.write(_get_struct_B().pack(_x))
|
|
118
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
119
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
120
|
+
|
|
121
|
+
def deserialize_numpy(self, str, numpy):
|
|
122
|
+
"""
|
|
123
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
124
|
+
:param str: byte array of serialized message, ``str``
|
|
125
|
+
:param numpy: numpy python module
|
|
126
|
+
"""
|
|
127
|
+
if python3:
|
|
128
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
129
|
+
try:
|
|
130
|
+
end = 0
|
|
131
|
+
start = end
|
|
132
|
+
end += 1
|
|
133
|
+
(self.mask,) = _get_struct_B().unpack(str[start:end])
|
|
134
|
+
return self
|
|
135
|
+
except struct.error as e:
|
|
136
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
137
|
+
|
|
138
|
+
_struct_I = genpy.struct_I
|
|
139
|
+
def _get_struct_I():
|
|
140
|
+
global _struct_I
|
|
141
|
+
return _struct_I
|
|
142
|
+
_struct_B = None
|
|
143
|
+
def _get_struct_B():
|
|
144
|
+
global _struct_B
|
|
145
|
+
if _struct_B is None:
|
|
146
|
+
_struct_B = struct.Struct("<B")
|
|
147
|
+
return _struct_B
|
|
148
|
+
# This Python file uses the following encoding: utf-8
|
|
149
|
+
"""autogenerated by genpy from kuavo_msgs/enableHandTouchSensorResponse.msg. Do not edit."""
|
|
150
|
+
import codecs
|
|
151
|
+
import sys
|
|
152
|
+
python3 = True if sys.hexversion > 0x03000000 else False
|
|
153
|
+
import genpy
|
|
154
|
+
import struct
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class enableHandTouchSensorResponse(genpy.Message):
|
|
158
|
+
_md5sum = "937c9679a518e3a18d831e57125ea522"
|
|
159
|
+
_type = "kuavo_msgs/enableHandTouchSensorResponse"
|
|
160
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
161
|
+
_full_text = """# Whether the operation was successful
|
|
162
|
+
bool success
|
|
163
|
+
|
|
164
|
+
# Additional status or error message
|
|
165
|
+
string message
|
|
166
|
+
"""
|
|
167
|
+
__slots__ = ['success','message']
|
|
168
|
+
_slot_types = ['bool','string']
|
|
169
|
+
|
|
170
|
+
def __init__(self, *args, **kwds):
|
|
171
|
+
"""
|
|
172
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
173
|
+
set to None will be assigned a default value. The recommend
|
|
174
|
+
use is keyword arguments as this is more robust to future message
|
|
175
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
176
|
+
|
|
177
|
+
The available fields are:
|
|
178
|
+
success,message
|
|
179
|
+
|
|
180
|
+
:param args: complete set of field values, in .msg order
|
|
181
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
182
|
+
to set specific fields.
|
|
183
|
+
"""
|
|
184
|
+
if args or kwds:
|
|
185
|
+
super(enableHandTouchSensorResponse, self).__init__(*args, **kwds)
|
|
186
|
+
# message fields cannot be None, assign default values for those that are
|
|
187
|
+
if self.success is None:
|
|
188
|
+
self.success = False
|
|
189
|
+
if self.message is None:
|
|
190
|
+
self.message = ''
|
|
191
|
+
else:
|
|
192
|
+
self.success = False
|
|
193
|
+
self.message = ''
|
|
194
|
+
|
|
195
|
+
def _get_types(self):
|
|
196
|
+
"""
|
|
197
|
+
internal API method
|
|
198
|
+
"""
|
|
199
|
+
return self._slot_types
|
|
200
|
+
|
|
201
|
+
def serialize(self, buff):
|
|
202
|
+
"""
|
|
203
|
+
serialize message into buffer
|
|
204
|
+
:param buff: buffer, ``StringIO``
|
|
205
|
+
"""
|
|
206
|
+
try:
|
|
207
|
+
_x = self.success
|
|
208
|
+
buff.write(_get_struct_B().pack(_x))
|
|
209
|
+
_x = self.message
|
|
210
|
+
length = len(_x)
|
|
211
|
+
if python3 or type(_x) == unicode:
|
|
212
|
+
_x = _x.encode('utf-8')
|
|
213
|
+
length = len(_x)
|
|
214
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
215
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
216
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
217
|
+
|
|
218
|
+
def deserialize(self, str):
|
|
219
|
+
"""
|
|
220
|
+
unpack serialized message in str into this message instance
|
|
221
|
+
:param str: byte array of serialized message, ``str``
|
|
222
|
+
"""
|
|
223
|
+
if python3:
|
|
224
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
225
|
+
try:
|
|
226
|
+
end = 0
|
|
227
|
+
start = end
|
|
228
|
+
end += 1
|
|
229
|
+
(self.success,) = _get_struct_B().unpack(str[start:end])
|
|
230
|
+
self.success = bool(self.success)
|
|
231
|
+
start = end
|
|
232
|
+
end += 4
|
|
233
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
234
|
+
start = end
|
|
235
|
+
end += length
|
|
236
|
+
if python3:
|
|
237
|
+
self.message = str[start:end].decode('utf-8', 'rosmsg')
|
|
238
|
+
else:
|
|
239
|
+
self.message = str[start:end]
|
|
240
|
+
return self
|
|
241
|
+
except struct.error as e:
|
|
242
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
def serialize_numpy(self, buff, numpy):
|
|
246
|
+
"""
|
|
247
|
+
serialize message with numpy array types into buffer
|
|
248
|
+
:param buff: buffer, ``StringIO``
|
|
249
|
+
:param numpy: numpy python module
|
|
250
|
+
"""
|
|
251
|
+
try:
|
|
252
|
+
_x = self.success
|
|
253
|
+
buff.write(_get_struct_B().pack(_x))
|
|
254
|
+
_x = self.message
|
|
255
|
+
length = len(_x)
|
|
256
|
+
if python3 or type(_x) == unicode:
|
|
257
|
+
_x = _x.encode('utf-8')
|
|
258
|
+
length = len(_x)
|
|
259
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
260
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
261
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
262
|
+
|
|
263
|
+
def deserialize_numpy(self, str, numpy):
|
|
264
|
+
"""
|
|
265
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
266
|
+
:param str: byte array of serialized message, ``str``
|
|
267
|
+
:param numpy: numpy python module
|
|
268
|
+
"""
|
|
269
|
+
if python3:
|
|
270
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
271
|
+
try:
|
|
272
|
+
end = 0
|
|
273
|
+
start = end
|
|
274
|
+
end += 1
|
|
275
|
+
(self.success,) = _get_struct_B().unpack(str[start:end])
|
|
276
|
+
self.success = bool(self.success)
|
|
277
|
+
start = end
|
|
278
|
+
end += 4
|
|
279
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
280
|
+
start = end
|
|
281
|
+
end += length
|
|
282
|
+
if python3:
|
|
283
|
+
self.message = str[start:end].decode('utf-8', 'rosmsg')
|
|
284
|
+
else:
|
|
285
|
+
self.message = str[start:end]
|
|
286
|
+
return self
|
|
287
|
+
except struct.error as e:
|
|
288
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
289
|
+
|
|
290
|
+
_struct_I = genpy.struct_I
|
|
291
|
+
def _get_struct_I():
|
|
292
|
+
global _struct_I
|
|
293
|
+
return _struct_I
|
|
294
|
+
_struct_B = None
|
|
295
|
+
def _get_struct_B():
|
|
296
|
+
global _struct_B
|
|
297
|
+
if _struct_B is None:
|
|
298
|
+
_struct_B = struct.Struct("<B")
|
|
299
|
+
return _struct_B
|
|
300
|
+
class enableHandTouchSensor(object):
|
|
301
|
+
_type = 'kuavo_msgs/enableHandTouchSensor'
|
|
302
|
+
_md5sum = '710f3d70d245856e41b01f7ffef21580'
|
|
303
|
+
_request_class = enableHandTouchSensorRequest
|
|
304
|
+
_response_class = enableHandTouchSensorResponse
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/fkSrvRequest.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 fkSrvRequest(genpy.Message):
|
|
11
|
+
_md5sum = "ab94b9bcaaa12f74def43e4b33992df1"
|
|
12
|
+
_type = "kuavo_msgs/fkSrvRequest"
|
|
13
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
14
|
+
_full_text = """float64[] q # 广义关节角度,如果是虚拟关节ik,则前4维度为躯干虚拟关节的角度,后14维度为手臂关节的角度
|
|
15
|
+
"""
|
|
16
|
+
__slots__ = ['q']
|
|
17
|
+
_slot_types = ['float64[]']
|
|
18
|
+
|
|
19
|
+
def __init__(self, *args, **kwds):
|
|
20
|
+
"""
|
|
21
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
22
|
+
set to None will be assigned a default value. The recommend
|
|
23
|
+
use is keyword arguments as this is more robust to future message
|
|
24
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
25
|
+
|
|
26
|
+
The available fields are:
|
|
27
|
+
q
|
|
28
|
+
|
|
29
|
+
:param args: complete set of field values, in .msg order
|
|
30
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
31
|
+
to set specific fields.
|
|
32
|
+
"""
|
|
33
|
+
if args or kwds:
|
|
34
|
+
super(fkSrvRequest, self).__init__(*args, **kwds)
|
|
35
|
+
# message fields cannot be None, assign default values for those that are
|
|
36
|
+
if self.q is None:
|
|
37
|
+
self.q = []
|
|
38
|
+
else:
|
|
39
|
+
self.q = []
|
|
40
|
+
|
|
41
|
+
def _get_types(self):
|
|
42
|
+
"""
|
|
43
|
+
internal API method
|
|
44
|
+
"""
|
|
45
|
+
return self._slot_types
|
|
46
|
+
|
|
47
|
+
def serialize(self, buff):
|
|
48
|
+
"""
|
|
49
|
+
serialize message into buffer
|
|
50
|
+
:param buff: buffer, ``StringIO``
|
|
51
|
+
"""
|
|
52
|
+
try:
|
|
53
|
+
length = len(self.q)
|
|
54
|
+
buff.write(_struct_I.pack(length))
|
|
55
|
+
pattern = '<%sd'%length
|
|
56
|
+
buff.write(struct.Struct(pattern).pack(*self.q))
|
|
57
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
58
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
59
|
+
|
|
60
|
+
def deserialize(self, str):
|
|
61
|
+
"""
|
|
62
|
+
unpack serialized message in str into this message instance
|
|
63
|
+
:param str: byte array of serialized message, ``str``
|
|
64
|
+
"""
|
|
65
|
+
if python3:
|
|
66
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
67
|
+
try:
|
|
68
|
+
end = 0
|
|
69
|
+
start = end
|
|
70
|
+
end += 4
|
|
71
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
72
|
+
pattern = '<%sd'%length
|
|
73
|
+
start = end
|
|
74
|
+
s = struct.Struct(pattern)
|
|
75
|
+
end += s.size
|
|
76
|
+
self.q = s.unpack(str[start:end])
|
|
77
|
+
return self
|
|
78
|
+
except struct.error as e:
|
|
79
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def serialize_numpy(self, buff, numpy):
|
|
83
|
+
"""
|
|
84
|
+
serialize message with numpy array types into buffer
|
|
85
|
+
:param buff: buffer, ``StringIO``
|
|
86
|
+
:param numpy: numpy python module
|
|
87
|
+
"""
|
|
88
|
+
try:
|
|
89
|
+
length = len(self.q)
|
|
90
|
+
buff.write(_struct_I.pack(length))
|
|
91
|
+
pattern = '<%sd'%length
|
|
92
|
+
buff.write(self.q.tostring())
|
|
93
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
94
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
95
|
+
|
|
96
|
+
def deserialize_numpy(self, str, numpy):
|
|
97
|
+
"""
|
|
98
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
99
|
+
:param str: byte array of serialized message, ``str``
|
|
100
|
+
:param numpy: numpy python module
|
|
101
|
+
"""
|
|
102
|
+
if python3:
|
|
103
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
104
|
+
try:
|
|
105
|
+
end = 0
|
|
106
|
+
start = end
|
|
107
|
+
end += 4
|
|
108
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
109
|
+
pattern = '<%sd'%length
|
|
110
|
+
start = end
|
|
111
|
+
s = struct.Struct(pattern)
|
|
112
|
+
end += s.size
|
|
113
|
+
self.q = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
114
|
+
return self
|
|
115
|
+
except struct.error as e:
|
|
116
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
117
|
+
|
|
118
|
+
_struct_I = genpy.struct_I
|
|
119
|
+
def _get_struct_I():
|
|
120
|
+
global _struct_I
|
|
121
|
+
return _struct_I
|
|
122
|
+
# This Python file uses the following encoding: utf-8
|
|
123
|
+
"""autogenerated by genpy from kuavo_msgs/fkSrvResponse.msg. Do not edit."""
|
|
124
|
+
import codecs
|
|
125
|
+
import sys
|
|
126
|
+
python3 = True if sys.hexversion > 0x03000000 else False
|
|
127
|
+
import genpy
|
|
128
|
+
import struct
|
|
129
|
+
|
|
130
|
+
import kuavo_msgs.msg
|
|
131
|
+
import std_msgs.msg
|
|
132
|
+
|
|
133
|
+
class fkSrvResponse(genpy.Message):
|
|
134
|
+
_md5sum = "0989ef9ed6b7b2e5e8a37c79ae6916d9"
|
|
135
|
+
_type = "kuavo_msgs/fkSrvResponse"
|
|
136
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
137
|
+
_full_text = """bool success
|
|
138
|
+
twoArmHandPose hand_poses
|
|
139
|
+
|
|
140
|
+
================================================================================
|
|
141
|
+
MSG: kuavo_msgs/twoArmHandPose
|
|
142
|
+
Header header
|
|
143
|
+
armHandPose left_pose
|
|
144
|
+
armHandPose right_pose
|
|
145
|
+
================================================================================
|
|
146
|
+
MSG: std_msgs/Header
|
|
147
|
+
# Standard metadata for higher-level stamped data types.
|
|
148
|
+
# This is generally used to communicate timestamped data
|
|
149
|
+
# in a particular coordinate frame.
|
|
150
|
+
#
|
|
151
|
+
# sequence ID: consecutively increasing ID
|
|
152
|
+
uint32 seq
|
|
153
|
+
#Two-integer timestamp that is expressed as:
|
|
154
|
+
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
|
|
155
|
+
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
|
|
156
|
+
# time-handling sugar is provided by the client library
|
|
157
|
+
time stamp
|
|
158
|
+
#Frame this data is associated with
|
|
159
|
+
string frame_id
|
|
160
|
+
|
|
161
|
+
================================================================================
|
|
162
|
+
MSG: kuavo_msgs/armHandPose
|
|
163
|
+
float64[3] pos_xyz
|
|
164
|
+
float64[4] quat_xyzw
|
|
165
|
+
|
|
166
|
+
float64[3] elbow_pos_xyz
|
|
167
|
+
|
|
168
|
+
float64[7] joint_angles
|
|
169
|
+
"""
|
|
170
|
+
__slots__ = ['success','hand_poses']
|
|
171
|
+
_slot_types = ['bool','kuavo_msgs/twoArmHandPose']
|
|
172
|
+
|
|
173
|
+
def __init__(self, *args, **kwds):
|
|
174
|
+
"""
|
|
175
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
176
|
+
set to None will be assigned a default value. The recommend
|
|
177
|
+
use is keyword arguments as this is more robust to future message
|
|
178
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
179
|
+
|
|
180
|
+
The available fields are:
|
|
181
|
+
success,hand_poses
|
|
182
|
+
|
|
183
|
+
:param args: complete set of field values, in .msg order
|
|
184
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
185
|
+
to set specific fields.
|
|
186
|
+
"""
|
|
187
|
+
if args or kwds:
|
|
188
|
+
super(fkSrvResponse, self).__init__(*args, **kwds)
|
|
189
|
+
# message fields cannot be None, assign default values for those that are
|
|
190
|
+
if self.success is None:
|
|
191
|
+
self.success = False
|
|
192
|
+
if self.hand_poses is None:
|
|
193
|
+
self.hand_poses = kuavo_msgs.msg.twoArmHandPose()
|
|
194
|
+
else:
|
|
195
|
+
self.success = False
|
|
196
|
+
self.hand_poses = kuavo_msgs.msg.twoArmHandPose()
|
|
197
|
+
|
|
198
|
+
def _get_types(self):
|
|
199
|
+
"""
|
|
200
|
+
internal API method
|
|
201
|
+
"""
|
|
202
|
+
return self._slot_types
|
|
203
|
+
|
|
204
|
+
def serialize(self, buff):
|
|
205
|
+
"""
|
|
206
|
+
serialize message into buffer
|
|
207
|
+
:param buff: buffer, ``StringIO``
|
|
208
|
+
"""
|
|
209
|
+
try:
|
|
210
|
+
_x = self
|
|
211
|
+
buff.write(_get_struct_B3I().pack(_x.success, _x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs))
|
|
212
|
+
_x = self.hand_poses.header.frame_id
|
|
213
|
+
length = len(_x)
|
|
214
|
+
if python3 or type(_x) == unicode:
|
|
215
|
+
_x = _x.encode('utf-8')
|
|
216
|
+
length = len(_x)
|
|
217
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
218
|
+
buff.write(_get_struct_3d().pack(*self.hand_poses.left_pose.pos_xyz))
|
|
219
|
+
buff.write(_get_struct_4d().pack(*self.hand_poses.left_pose.quat_xyzw))
|
|
220
|
+
buff.write(_get_struct_3d().pack(*self.hand_poses.left_pose.elbow_pos_xyz))
|
|
221
|
+
buff.write(_get_struct_7d().pack(*self.hand_poses.left_pose.joint_angles))
|
|
222
|
+
buff.write(_get_struct_3d().pack(*self.hand_poses.right_pose.pos_xyz))
|
|
223
|
+
buff.write(_get_struct_4d().pack(*self.hand_poses.right_pose.quat_xyzw))
|
|
224
|
+
buff.write(_get_struct_3d().pack(*self.hand_poses.right_pose.elbow_pos_xyz))
|
|
225
|
+
buff.write(_get_struct_7d().pack(*self.hand_poses.right_pose.joint_angles))
|
|
226
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
227
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
228
|
+
|
|
229
|
+
def deserialize(self, str):
|
|
230
|
+
"""
|
|
231
|
+
unpack serialized message in str into this message instance
|
|
232
|
+
:param str: byte array of serialized message, ``str``
|
|
233
|
+
"""
|
|
234
|
+
if python3:
|
|
235
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
236
|
+
try:
|
|
237
|
+
if self.hand_poses is None:
|
|
238
|
+
self.hand_poses = kuavo_msgs.msg.twoArmHandPose()
|
|
239
|
+
end = 0
|
|
240
|
+
_x = self
|
|
241
|
+
start = end
|
|
242
|
+
end += 13
|
|
243
|
+
(_x.success, _x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs,) = _get_struct_B3I().unpack(str[start:end])
|
|
244
|
+
self.success = bool(self.success)
|
|
245
|
+
start = end
|
|
246
|
+
end += 4
|
|
247
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
248
|
+
start = end
|
|
249
|
+
end += length
|
|
250
|
+
if python3:
|
|
251
|
+
self.hand_poses.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
252
|
+
else:
|
|
253
|
+
self.hand_poses.header.frame_id = str[start:end]
|
|
254
|
+
start = end
|
|
255
|
+
end += 24
|
|
256
|
+
self.hand_poses.left_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
257
|
+
start = end
|
|
258
|
+
end += 32
|
|
259
|
+
self.hand_poses.left_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
|
|
260
|
+
start = end
|
|
261
|
+
end += 24
|
|
262
|
+
self.hand_poses.left_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
263
|
+
start = end
|
|
264
|
+
end += 56
|
|
265
|
+
self.hand_poses.left_pose.joint_angles = _get_struct_7d().unpack(str[start:end])
|
|
266
|
+
start = end
|
|
267
|
+
end += 24
|
|
268
|
+
self.hand_poses.right_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
269
|
+
start = end
|
|
270
|
+
end += 32
|
|
271
|
+
self.hand_poses.right_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
|
|
272
|
+
start = end
|
|
273
|
+
end += 24
|
|
274
|
+
self.hand_poses.right_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
275
|
+
start = end
|
|
276
|
+
end += 56
|
|
277
|
+
self.hand_poses.right_pose.joint_angles = _get_struct_7d().unpack(str[start:end])
|
|
278
|
+
return self
|
|
279
|
+
except struct.error as e:
|
|
280
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
def serialize_numpy(self, buff, numpy):
|
|
284
|
+
"""
|
|
285
|
+
serialize message with numpy array types into buffer
|
|
286
|
+
:param buff: buffer, ``StringIO``
|
|
287
|
+
:param numpy: numpy python module
|
|
288
|
+
"""
|
|
289
|
+
try:
|
|
290
|
+
_x = self
|
|
291
|
+
buff.write(_get_struct_B3I().pack(_x.success, _x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs))
|
|
292
|
+
_x = self.hand_poses.header.frame_id
|
|
293
|
+
length = len(_x)
|
|
294
|
+
if python3 or type(_x) == unicode:
|
|
295
|
+
_x = _x.encode('utf-8')
|
|
296
|
+
length = len(_x)
|
|
297
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
298
|
+
buff.write(self.hand_poses.left_pose.pos_xyz.tostring())
|
|
299
|
+
buff.write(self.hand_poses.left_pose.quat_xyzw.tostring())
|
|
300
|
+
buff.write(self.hand_poses.left_pose.elbow_pos_xyz.tostring())
|
|
301
|
+
buff.write(self.hand_poses.left_pose.joint_angles.tostring())
|
|
302
|
+
buff.write(self.hand_poses.right_pose.pos_xyz.tostring())
|
|
303
|
+
buff.write(self.hand_poses.right_pose.quat_xyzw.tostring())
|
|
304
|
+
buff.write(self.hand_poses.right_pose.elbow_pos_xyz.tostring())
|
|
305
|
+
buff.write(self.hand_poses.right_pose.joint_angles.tostring())
|
|
306
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
307
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
308
|
+
|
|
309
|
+
def deserialize_numpy(self, str, numpy):
|
|
310
|
+
"""
|
|
311
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
312
|
+
:param str: byte array of serialized message, ``str``
|
|
313
|
+
:param numpy: numpy python module
|
|
314
|
+
"""
|
|
315
|
+
if python3:
|
|
316
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
317
|
+
try:
|
|
318
|
+
if self.hand_poses is None:
|
|
319
|
+
self.hand_poses = kuavo_msgs.msg.twoArmHandPose()
|
|
320
|
+
end = 0
|
|
321
|
+
_x = self
|
|
322
|
+
start = end
|
|
323
|
+
end += 13
|
|
324
|
+
(_x.success, _x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs,) = _get_struct_B3I().unpack(str[start:end])
|
|
325
|
+
self.success = bool(self.success)
|
|
326
|
+
start = end
|
|
327
|
+
end += 4
|
|
328
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
329
|
+
start = end
|
|
330
|
+
end += length
|
|
331
|
+
if python3:
|
|
332
|
+
self.hand_poses.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
333
|
+
else:
|
|
334
|
+
self.hand_poses.header.frame_id = str[start:end]
|
|
335
|
+
start = end
|
|
336
|
+
end += 24
|
|
337
|
+
self.hand_poses.left_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
338
|
+
start = end
|
|
339
|
+
end += 32
|
|
340
|
+
self.hand_poses.left_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
|
|
341
|
+
start = end
|
|
342
|
+
end += 24
|
|
343
|
+
self.hand_poses.left_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
344
|
+
start = end
|
|
345
|
+
end += 56
|
|
346
|
+
self.hand_poses.left_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=7)
|
|
347
|
+
start = end
|
|
348
|
+
end += 24
|
|
349
|
+
self.hand_poses.right_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
350
|
+
start = end
|
|
351
|
+
end += 32
|
|
352
|
+
self.hand_poses.right_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
|
|
353
|
+
start = end
|
|
354
|
+
end += 24
|
|
355
|
+
self.hand_poses.right_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
356
|
+
start = end
|
|
357
|
+
end += 56
|
|
358
|
+
self.hand_poses.right_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=7)
|
|
359
|
+
return self
|
|
360
|
+
except struct.error as e:
|
|
361
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
362
|
+
|
|
363
|
+
_struct_I = genpy.struct_I
|
|
364
|
+
def _get_struct_I():
|
|
365
|
+
global _struct_I
|
|
366
|
+
return _struct_I
|
|
367
|
+
_struct_3d = None
|
|
368
|
+
def _get_struct_3d():
|
|
369
|
+
global _struct_3d
|
|
370
|
+
if _struct_3d is None:
|
|
371
|
+
_struct_3d = struct.Struct("<3d")
|
|
372
|
+
return _struct_3d
|
|
373
|
+
_struct_4d = None
|
|
374
|
+
def _get_struct_4d():
|
|
375
|
+
global _struct_4d
|
|
376
|
+
if _struct_4d is None:
|
|
377
|
+
_struct_4d = struct.Struct("<4d")
|
|
378
|
+
return _struct_4d
|
|
379
|
+
_struct_7d = None
|
|
380
|
+
def _get_struct_7d():
|
|
381
|
+
global _struct_7d
|
|
382
|
+
if _struct_7d is None:
|
|
383
|
+
_struct_7d = struct.Struct("<7d")
|
|
384
|
+
return _struct_7d
|
|
385
|
+
_struct_B3I = None
|
|
386
|
+
def _get_struct_B3I():
|
|
387
|
+
global _struct_B3I
|
|
388
|
+
if _struct_B3I is None:
|
|
389
|
+
_struct_B3I = struct.Struct("<B3I")
|
|
390
|
+
return _struct_B3I
|
|
391
|
+
class fkSrv(object):
|
|
392
|
+
_type = 'kuavo_msgs/fkSrv'
|
|
393
|
+
_md5sum = 'b89cc987a02b6d1c2a1588d5659bf064'
|
|
394
|
+
_request_class = fkSrvRequest
|
|
395
|
+
_response_class = fkSrvResponse
|