kuavo-humanoid-sdk 1.2.2__20250922181216-py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kuavo-humanoid-sdk might be problematic. Click here for more details.
- 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 +276 -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 +11 -0
- kuavo_humanoid_sdk/kuavo/core/audio.py +32 -0
- kuavo_humanoid_sdk/kuavo/core/core.py +612 -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/ros/audio.py +92 -0
- kuavo_humanoid_sdk/kuavo/core/ros/control.py +1309 -0
- kuavo_humanoid_sdk/kuavo/core/ros/observation.py +94 -0
- kuavo_humanoid_sdk/kuavo/core/ros/param.py +183 -0
- kuavo_humanoid_sdk/kuavo/core/ros/sat_utils.py +103 -0
- kuavo_humanoid_sdk/kuavo/core/ros/state.py +605 -0
- kuavo_humanoid_sdk/kuavo/core/ros/tools.py +219 -0
- kuavo_humanoid_sdk/kuavo/core/ros/vision.py +234 -0
- kuavo_humanoid_sdk/kuavo/core/ros_env.py +237 -0
- kuavo_humanoid_sdk/kuavo/dexterous_hand.py +201 -0
- kuavo_humanoid_sdk/kuavo/leju_claw.py +235 -0
- kuavo_humanoid_sdk/kuavo/robot.py +465 -0
- kuavo_humanoid_sdk/kuavo/robot_arm.py +210 -0
- kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
- kuavo_humanoid_sdk/kuavo/robot_head.py +50 -0
- kuavo_humanoid_sdk/kuavo/robot_info.py +113 -0
- kuavo_humanoid_sdk/kuavo/robot_observation.py +64 -0
- kuavo_humanoid_sdk/kuavo/robot_state.py +299 -0
- kuavo_humanoid_sdk/kuavo/robot_tool.py +82 -0
- kuavo_humanoid_sdk/kuavo/robot_vision.py +83 -0
- kuavo_humanoid_sdk/kuavo_strategy/__init__.py +2 -0
- kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +1126 -0
- kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +104 -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/_JoySticks.py +191 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -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/__init__.py +48 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +160 -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 +151 -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/_footPoseTargetTrajectories.py +301 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.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/_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/_planArmState.py +120 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_questJoySticks.py +191 -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/_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 +495 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +272 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +315 -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/_ExecuteArmAction.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +29 -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 +394 -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/_handForceLevel.py +330 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +421 -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 +662 -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.2.dist-info/METADATA +291 -0
- kuavo_humanoid_sdk-1.2.2.dist-info/RECORD +137 -0
- kuavo_humanoid_sdk-1.2.2.dist-info/WHEEL +6 -0
- kuavo_humanoid_sdk-1.2.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,716 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/twoArmHandPoseCmdFreeSrvRequest.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
|
+
import std_msgs.msg
|
|
11
|
+
|
|
12
|
+
class twoArmHandPoseCmdFreeSrvRequest(genpy.Message):
|
|
13
|
+
_md5sum = "4c961793a7f64133c21ec394db1fac70"
|
|
14
|
+
_type = "kuavo_msgs/twoArmHandPoseCmdFreeSrvRequest"
|
|
15
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
16
|
+
_full_text = """twoArmHandPoseCmdFree twoArmHandPoseCmdFreeRequest
|
|
17
|
+
|
|
18
|
+
================================================================================
|
|
19
|
+
MSG: kuavo_msgs/twoArmHandPoseCmdFree
|
|
20
|
+
twoArmHandPoseFree hand_poses
|
|
21
|
+
# params for the IK solver
|
|
22
|
+
bool use_custom_ik_param
|
|
23
|
+
bool joint_angles_as_q0
|
|
24
|
+
ikSolveParam ik_param
|
|
25
|
+
================================================================================
|
|
26
|
+
MSG: kuavo_msgs/twoArmHandPoseFree
|
|
27
|
+
Header header
|
|
28
|
+
armHandPoseFree left_pose
|
|
29
|
+
armHandPoseFree right_pose
|
|
30
|
+
================================================================================
|
|
31
|
+
MSG: std_msgs/Header
|
|
32
|
+
# Standard metadata for higher-level stamped data types.
|
|
33
|
+
# This is generally used to communicate timestamped data
|
|
34
|
+
# in a particular coordinate frame.
|
|
35
|
+
#
|
|
36
|
+
# sequence ID: consecutively increasing ID
|
|
37
|
+
uint32 seq
|
|
38
|
+
#Two-integer timestamp that is expressed as:
|
|
39
|
+
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
|
|
40
|
+
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
|
|
41
|
+
# time-handling sugar is provided by the client library
|
|
42
|
+
time stamp
|
|
43
|
+
#Frame this data is associated with
|
|
44
|
+
string frame_id
|
|
45
|
+
|
|
46
|
+
================================================================================
|
|
47
|
+
MSG: kuavo_msgs/armHandPoseFree
|
|
48
|
+
float64[3] pos_xyz
|
|
49
|
+
float64[4] quat_xyzw
|
|
50
|
+
|
|
51
|
+
float64[3] elbow_pos_xyz
|
|
52
|
+
|
|
53
|
+
float64[] joint_angles
|
|
54
|
+
|
|
55
|
+
================================================================================
|
|
56
|
+
MSG: kuavo_msgs/ikSolveParam
|
|
57
|
+
# snopt params
|
|
58
|
+
float64 major_optimality_tol
|
|
59
|
+
float64 major_feasibility_tol
|
|
60
|
+
float64 minor_feasibility_tol
|
|
61
|
+
float64 major_iterations_limit
|
|
62
|
+
# constraint and cost params
|
|
63
|
+
float64 oritation_constraint_tol
|
|
64
|
+
float64 pos_constraint_tol # work when pos_cost_weight > 0.0
|
|
65
|
+
float64 pos_cost_weight"""
|
|
66
|
+
__slots__ = ['twoArmHandPoseCmdFreeRequest']
|
|
67
|
+
_slot_types = ['kuavo_msgs/twoArmHandPoseCmdFree']
|
|
68
|
+
|
|
69
|
+
def __init__(self, *args, **kwds):
|
|
70
|
+
"""
|
|
71
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
72
|
+
set to None will be assigned a default value. The recommend
|
|
73
|
+
use is keyword arguments as this is more robust to future message
|
|
74
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
75
|
+
|
|
76
|
+
The available fields are:
|
|
77
|
+
twoArmHandPoseCmdFreeRequest
|
|
78
|
+
|
|
79
|
+
:param args: complete set of field values, in .msg order
|
|
80
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
81
|
+
to set specific fields.
|
|
82
|
+
"""
|
|
83
|
+
if args or kwds:
|
|
84
|
+
super(twoArmHandPoseCmdFreeSrvRequest, self).__init__(*args, **kwds)
|
|
85
|
+
# message fields cannot be None, assign default values for those that are
|
|
86
|
+
if self.twoArmHandPoseCmdFreeRequest is None:
|
|
87
|
+
self.twoArmHandPoseCmdFreeRequest = kuavo_msgs.msg.twoArmHandPoseCmdFree()
|
|
88
|
+
else:
|
|
89
|
+
self.twoArmHandPoseCmdFreeRequest = kuavo_msgs.msg.twoArmHandPoseCmdFree()
|
|
90
|
+
|
|
91
|
+
def _get_types(self):
|
|
92
|
+
"""
|
|
93
|
+
internal API method
|
|
94
|
+
"""
|
|
95
|
+
return self._slot_types
|
|
96
|
+
|
|
97
|
+
def serialize(self, buff):
|
|
98
|
+
"""
|
|
99
|
+
serialize message into buffer
|
|
100
|
+
:param buff: buffer, ``StringIO``
|
|
101
|
+
"""
|
|
102
|
+
try:
|
|
103
|
+
_x = self
|
|
104
|
+
buff.write(_get_struct_3I().pack(_x.twoArmHandPoseCmdFreeRequest.hand_poses.header.seq, _x.twoArmHandPoseCmdFreeRequest.hand_poses.header.stamp.secs, _x.twoArmHandPoseCmdFreeRequest.hand_poses.header.stamp.nsecs))
|
|
105
|
+
_x = self.twoArmHandPoseCmdFreeRequest.hand_poses.header.frame_id
|
|
106
|
+
length = len(_x)
|
|
107
|
+
if python3 or type(_x) == unicode:
|
|
108
|
+
_x = _x.encode('utf-8')
|
|
109
|
+
length = len(_x)
|
|
110
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
111
|
+
buff.write(_get_struct_3d().pack(*self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.pos_xyz))
|
|
112
|
+
buff.write(_get_struct_4d().pack(*self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.quat_xyzw))
|
|
113
|
+
buff.write(_get_struct_3d().pack(*self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.elbow_pos_xyz))
|
|
114
|
+
length = len(self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.joint_angles)
|
|
115
|
+
buff.write(_struct_I.pack(length))
|
|
116
|
+
pattern = '<%sd'%length
|
|
117
|
+
buff.write(struct.Struct(pattern).pack(*self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.joint_angles))
|
|
118
|
+
buff.write(_get_struct_3d().pack(*self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.pos_xyz))
|
|
119
|
+
buff.write(_get_struct_4d().pack(*self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.quat_xyzw))
|
|
120
|
+
buff.write(_get_struct_3d().pack(*self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.elbow_pos_xyz))
|
|
121
|
+
length = len(self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.joint_angles)
|
|
122
|
+
buff.write(_struct_I.pack(length))
|
|
123
|
+
pattern = '<%sd'%length
|
|
124
|
+
buff.write(struct.Struct(pattern).pack(*self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.joint_angles))
|
|
125
|
+
_x = self
|
|
126
|
+
buff.write(_get_struct_2B7d().pack(_x.twoArmHandPoseCmdFreeRequest.use_custom_ik_param, _x.twoArmHandPoseCmdFreeRequest.joint_angles_as_q0, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_optimality_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_feasibility_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.minor_feasibility_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_iterations_limit, _x.twoArmHandPoseCmdFreeRequest.ik_param.oritation_constraint_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.pos_constraint_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.pos_cost_weight))
|
|
127
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
128
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
129
|
+
|
|
130
|
+
def deserialize(self, str):
|
|
131
|
+
"""
|
|
132
|
+
unpack serialized message in str into this message instance
|
|
133
|
+
:param str: byte array of serialized message, ``str``
|
|
134
|
+
"""
|
|
135
|
+
if python3:
|
|
136
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
137
|
+
try:
|
|
138
|
+
if self.twoArmHandPoseCmdFreeRequest is None:
|
|
139
|
+
self.twoArmHandPoseCmdFreeRequest = kuavo_msgs.msg.twoArmHandPoseCmdFree()
|
|
140
|
+
end = 0
|
|
141
|
+
_x = self
|
|
142
|
+
start = end
|
|
143
|
+
end += 12
|
|
144
|
+
(_x.twoArmHandPoseCmdFreeRequest.hand_poses.header.seq, _x.twoArmHandPoseCmdFreeRequest.hand_poses.header.stamp.secs, _x.twoArmHandPoseCmdFreeRequest.hand_poses.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
|
|
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.twoArmHandPoseCmdFreeRequest.hand_poses.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
152
|
+
else:
|
|
153
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.header.frame_id = str[start:end]
|
|
154
|
+
start = end
|
|
155
|
+
end += 24
|
|
156
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
157
|
+
start = end
|
|
158
|
+
end += 32
|
|
159
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
|
|
160
|
+
start = end
|
|
161
|
+
end += 24
|
|
162
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
163
|
+
start = end
|
|
164
|
+
end += 4
|
|
165
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
166
|
+
pattern = '<%sd'%length
|
|
167
|
+
start = end
|
|
168
|
+
s = struct.Struct(pattern)
|
|
169
|
+
end += s.size
|
|
170
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.joint_angles = s.unpack(str[start:end])
|
|
171
|
+
start = end
|
|
172
|
+
end += 24
|
|
173
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
174
|
+
start = end
|
|
175
|
+
end += 32
|
|
176
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
|
|
177
|
+
start = end
|
|
178
|
+
end += 24
|
|
179
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
180
|
+
start = end
|
|
181
|
+
end += 4
|
|
182
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
183
|
+
pattern = '<%sd'%length
|
|
184
|
+
start = end
|
|
185
|
+
s = struct.Struct(pattern)
|
|
186
|
+
end += s.size
|
|
187
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.joint_angles = s.unpack(str[start:end])
|
|
188
|
+
_x = self
|
|
189
|
+
start = end
|
|
190
|
+
end += 58
|
|
191
|
+
(_x.twoArmHandPoseCmdFreeRequest.use_custom_ik_param, _x.twoArmHandPoseCmdFreeRequest.joint_angles_as_q0, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_optimality_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_feasibility_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.minor_feasibility_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_iterations_limit, _x.twoArmHandPoseCmdFreeRequest.ik_param.oritation_constraint_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.pos_constraint_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.pos_cost_weight,) = _get_struct_2B7d().unpack(str[start:end])
|
|
192
|
+
self.twoArmHandPoseCmdFreeRequest.use_custom_ik_param = bool(self.twoArmHandPoseCmdFreeRequest.use_custom_ik_param)
|
|
193
|
+
self.twoArmHandPoseCmdFreeRequest.joint_angles_as_q0 = bool(self.twoArmHandPoseCmdFreeRequest.joint_angles_as_q0)
|
|
194
|
+
return self
|
|
195
|
+
except struct.error as e:
|
|
196
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def serialize_numpy(self, buff, numpy):
|
|
200
|
+
"""
|
|
201
|
+
serialize message with numpy array types into buffer
|
|
202
|
+
:param buff: buffer, ``StringIO``
|
|
203
|
+
:param numpy: numpy python module
|
|
204
|
+
"""
|
|
205
|
+
try:
|
|
206
|
+
_x = self
|
|
207
|
+
buff.write(_get_struct_3I().pack(_x.twoArmHandPoseCmdFreeRequest.hand_poses.header.seq, _x.twoArmHandPoseCmdFreeRequest.hand_poses.header.stamp.secs, _x.twoArmHandPoseCmdFreeRequest.hand_poses.header.stamp.nsecs))
|
|
208
|
+
_x = self.twoArmHandPoseCmdFreeRequest.hand_poses.header.frame_id
|
|
209
|
+
length = len(_x)
|
|
210
|
+
if python3 or type(_x) == unicode:
|
|
211
|
+
_x = _x.encode('utf-8')
|
|
212
|
+
length = len(_x)
|
|
213
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
214
|
+
buff.write(self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.pos_xyz.tostring())
|
|
215
|
+
buff.write(self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.quat_xyzw.tostring())
|
|
216
|
+
buff.write(self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.elbow_pos_xyz.tostring())
|
|
217
|
+
length = len(self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.joint_angles)
|
|
218
|
+
buff.write(_struct_I.pack(length))
|
|
219
|
+
pattern = '<%sd'%length
|
|
220
|
+
buff.write(self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.joint_angles.tostring())
|
|
221
|
+
buff.write(self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.pos_xyz.tostring())
|
|
222
|
+
buff.write(self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.quat_xyzw.tostring())
|
|
223
|
+
buff.write(self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.elbow_pos_xyz.tostring())
|
|
224
|
+
length = len(self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.joint_angles)
|
|
225
|
+
buff.write(_struct_I.pack(length))
|
|
226
|
+
pattern = '<%sd'%length
|
|
227
|
+
buff.write(self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.joint_angles.tostring())
|
|
228
|
+
_x = self
|
|
229
|
+
buff.write(_get_struct_2B7d().pack(_x.twoArmHandPoseCmdFreeRequest.use_custom_ik_param, _x.twoArmHandPoseCmdFreeRequest.joint_angles_as_q0, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_optimality_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_feasibility_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.minor_feasibility_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_iterations_limit, _x.twoArmHandPoseCmdFreeRequest.ik_param.oritation_constraint_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.pos_constraint_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.pos_cost_weight))
|
|
230
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
231
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
232
|
+
|
|
233
|
+
def deserialize_numpy(self, str, numpy):
|
|
234
|
+
"""
|
|
235
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
236
|
+
:param str: byte array of serialized message, ``str``
|
|
237
|
+
:param numpy: numpy python module
|
|
238
|
+
"""
|
|
239
|
+
if python3:
|
|
240
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
241
|
+
try:
|
|
242
|
+
if self.twoArmHandPoseCmdFreeRequest is None:
|
|
243
|
+
self.twoArmHandPoseCmdFreeRequest = kuavo_msgs.msg.twoArmHandPoseCmdFree()
|
|
244
|
+
end = 0
|
|
245
|
+
_x = self
|
|
246
|
+
start = end
|
|
247
|
+
end += 12
|
|
248
|
+
(_x.twoArmHandPoseCmdFreeRequest.hand_poses.header.seq, _x.twoArmHandPoseCmdFreeRequest.hand_poses.header.stamp.secs, _x.twoArmHandPoseCmdFreeRequest.hand_poses.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
|
|
249
|
+
start = end
|
|
250
|
+
end += 4
|
|
251
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
252
|
+
start = end
|
|
253
|
+
end += length
|
|
254
|
+
if python3:
|
|
255
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
256
|
+
else:
|
|
257
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.header.frame_id = str[start:end]
|
|
258
|
+
start = end
|
|
259
|
+
end += 24
|
|
260
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
261
|
+
start = end
|
|
262
|
+
end += 32
|
|
263
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
|
|
264
|
+
start = end
|
|
265
|
+
end += 24
|
|
266
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
267
|
+
start = end
|
|
268
|
+
end += 4
|
|
269
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
270
|
+
pattern = '<%sd'%length
|
|
271
|
+
start = end
|
|
272
|
+
s = struct.Struct(pattern)
|
|
273
|
+
end += s.size
|
|
274
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.left_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
275
|
+
start = end
|
|
276
|
+
end += 24
|
|
277
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
278
|
+
start = end
|
|
279
|
+
end += 32
|
|
280
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
|
|
281
|
+
start = end
|
|
282
|
+
end += 24
|
|
283
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
284
|
+
start = end
|
|
285
|
+
end += 4
|
|
286
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
287
|
+
pattern = '<%sd'%length
|
|
288
|
+
start = end
|
|
289
|
+
s = struct.Struct(pattern)
|
|
290
|
+
end += s.size
|
|
291
|
+
self.twoArmHandPoseCmdFreeRequest.hand_poses.right_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
292
|
+
_x = self
|
|
293
|
+
start = end
|
|
294
|
+
end += 58
|
|
295
|
+
(_x.twoArmHandPoseCmdFreeRequest.use_custom_ik_param, _x.twoArmHandPoseCmdFreeRequest.joint_angles_as_q0, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_optimality_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_feasibility_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.minor_feasibility_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.major_iterations_limit, _x.twoArmHandPoseCmdFreeRequest.ik_param.oritation_constraint_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.pos_constraint_tol, _x.twoArmHandPoseCmdFreeRequest.ik_param.pos_cost_weight,) = _get_struct_2B7d().unpack(str[start:end])
|
|
296
|
+
self.twoArmHandPoseCmdFreeRequest.use_custom_ik_param = bool(self.twoArmHandPoseCmdFreeRequest.use_custom_ik_param)
|
|
297
|
+
self.twoArmHandPoseCmdFreeRequest.joint_angles_as_q0 = bool(self.twoArmHandPoseCmdFreeRequest.joint_angles_as_q0)
|
|
298
|
+
return self
|
|
299
|
+
except struct.error as e:
|
|
300
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
301
|
+
|
|
302
|
+
_struct_I = genpy.struct_I
|
|
303
|
+
def _get_struct_I():
|
|
304
|
+
global _struct_I
|
|
305
|
+
return _struct_I
|
|
306
|
+
_struct_2B7d = None
|
|
307
|
+
def _get_struct_2B7d():
|
|
308
|
+
global _struct_2B7d
|
|
309
|
+
if _struct_2B7d is None:
|
|
310
|
+
_struct_2B7d = struct.Struct("<2B7d")
|
|
311
|
+
return _struct_2B7d
|
|
312
|
+
_struct_3I = None
|
|
313
|
+
def _get_struct_3I():
|
|
314
|
+
global _struct_3I
|
|
315
|
+
if _struct_3I is None:
|
|
316
|
+
_struct_3I = struct.Struct("<3I")
|
|
317
|
+
return _struct_3I
|
|
318
|
+
_struct_3d = None
|
|
319
|
+
def _get_struct_3d():
|
|
320
|
+
global _struct_3d
|
|
321
|
+
if _struct_3d is None:
|
|
322
|
+
_struct_3d = struct.Struct("<3d")
|
|
323
|
+
return _struct_3d
|
|
324
|
+
_struct_4d = None
|
|
325
|
+
def _get_struct_4d():
|
|
326
|
+
global _struct_4d
|
|
327
|
+
if _struct_4d is None:
|
|
328
|
+
_struct_4d = struct.Struct("<4d")
|
|
329
|
+
return _struct_4d
|
|
330
|
+
# This Python file uses the following encoding: utf-8
|
|
331
|
+
"""autogenerated by genpy from kuavo_msgs/twoArmHandPoseCmdFreeSrvResponse.msg. Do not edit."""
|
|
332
|
+
import codecs
|
|
333
|
+
import sys
|
|
334
|
+
python3 = True if sys.hexversion > 0x03000000 else False
|
|
335
|
+
import genpy
|
|
336
|
+
import struct
|
|
337
|
+
|
|
338
|
+
import kuavo_msgs.msg
|
|
339
|
+
import std_msgs.msg
|
|
340
|
+
|
|
341
|
+
class twoArmHandPoseCmdFreeSrvResponse(genpy.Message):
|
|
342
|
+
_md5sum = "595a805f76743c01c9ebd3b35eca94a0"
|
|
343
|
+
_type = "kuavo_msgs/twoArmHandPoseCmdFreeSrvResponse"
|
|
344
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
345
|
+
_full_text = """bool success
|
|
346
|
+
bool with_torso
|
|
347
|
+
float64[] q_arm
|
|
348
|
+
float64[] q_torso
|
|
349
|
+
|
|
350
|
+
float64 time_cost # unit: ms
|
|
351
|
+
# ik result
|
|
352
|
+
twoArmHandPoseFree hand_poses
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
================================================================================
|
|
356
|
+
MSG: kuavo_msgs/twoArmHandPoseFree
|
|
357
|
+
Header header
|
|
358
|
+
armHandPoseFree left_pose
|
|
359
|
+
armHandPoseFree right_pose
|
|
360
|
+
================================================================================
|
|
361
|
+
MSG: std_msgs/Header
|
|
362
|
+
# Standard metadata for higher-level stamped data types.
|
|
363
|
+
# This is generally used to communicate timestamped data
|
|
364
|
+
# in a particular coordinate frame.
|
|
365
|
+
#
|
|
366
|
+
# sequence ID: consecutively increasing ID
|
|
367
|
+
uint32 seq
|
|
368
|
+
#Two-integer timestamp that is expressed as:
|
|
369
|
+
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
|
|
370
|
+
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
|
|
371
|
+
# time-handling sugar is provided by the client library
|
|
372
|
+
time stamp
|
|
373
|
+
#Frame this data is associated with
|
|
374
|
+
string frame_id
|
|
375
|
+
|
|
376
|
+
================================================================================
|
|
377
|
+
MSG: kuavo_msgs/armHandPoseFree
|
|
378
|
+
float64[3] pos_xyz
|
|
379
|
+
float64[4] quat_xyzw
|
|
380
|
+
|
|
381
|
+
float64[3] elbow_pos_xyz
|
|
382
|
+
|
|
383
|
+
float64[] joint_angles
|
|
384
|
+
"""
|
|
385
|
+
__slots__ = ['success','with_torso','q_arm','q_torso','time_cost','hand_poses']
|
|
386
|
+
_slot_types = ['bool','bool','float64[]','float64[]','float64','kuavo_msgs/twoArmHandPoseFree']
|
|
387
|
+
|
|
388
|
+
def __init__(self, *args, **kwds):
|
|
389
|
+
"""
|
|
390
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
391
|
+
set to None will be assigned a default value. The recommend
|
|
392
|
+
use is keyword arguments as this is more robust to future message
|
|
393
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
394
|
+
|
|
395
|
+
The available fields are:
|
|
396
|
+
success,with_torso,q_arm,q_torso,time_cost,hand_poses
|
|
397
|
+
|
|
398
|
+
:param args: complete set of field values, in .msg order
|
|
399
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
400
|
+
to set specific fields.
|
|
401
|
+
"""
|
|
402
|
+
if args or kwds:
|
|
403
|
+
super(twoArmHandPoseCmdFreeSrvResponse, self).__init__(*args, **kwds)
|
|
404
|
+
# message fields cannot be None, assign default values for those that are
|
|
405
|
+
if self.success is None:
|
|
406
|
+
self.success = False
|
|
407
|
+
if self.with_torso is None:
|
|
408
|
+
self.with_torso = False
|
|
409
|
+
if self.q_arm is None:
|
|
410
|
+
self.q_arm = []
|
|
411
|
+
if self.q_torso is None:
|
|
412
|
+
self.q_torso = []
|
|
413
|
+
if self.time_cost is None:
|
|
414
|
+
self.time_cost = 0.
|
|
415
|
+
if self.hand_poses is None:
|
|
416
|
+
self.hand_poses = kuavo_msgs.msg.twoArmHandPoseFree()
|
|
417
|
+
else:
|
|
418
|
+
self.success = False
|
|
419
|
+
self.with_torso = False
|
|
420
|
+
self.q_arm = []
|
|
421
|
+
self.q_torso = []
|
|
422
|
+
self.time_cost = 0.
|
|
423
|
+
self.hand_poses = kuavo_msgs.msg.twoArmHandPoseFree()
|
|
424
|
+
|
|
425
|
+
def _get_types(self):
|
|
426
|
+
"""
|
|
427
|
+
internal API method
|
|
428
|
+
"""
|
|
429
|
+
return self._slot_types
|
|
430
|
+
|
|
431
|
+
def serialize(self, buff):
|
|
432
|
+
"""
|
|
433
|
+
serialize message into buffer
|
|
434
|
+
:param buff: buffer, ``StringIO``
|
|
435
|
+
"""
|
|
436
|
+
try:
|
|
437
|
+
_x = self
|
|
438
|
+
buff.write(_get_struct_2B().pack(_x.success, _x.with_torso))
|
|
439
|
+
length = len(self.q_arm)
|
|
440
|
+
buff.write(_struct_I.pack(length))
|
|
441
|
+
pattern = '<%sd'%length
|
|
442
|
+
buff.write(struct.Struct(pattern).pack(*self.q_arm))
|
|
443
|
+
length = len(self.q_torso)
|
|
444
|
+
buff.write(_struct_I.pack(length))
|
|
445
|
+
pattern = '<%sd'%length
|
|
446
|
+
buff.write(struct.Struct(pattern).pack(*self.q_torso))
|
|
447
|
+
_x = self
|
|
448
|
+
buff.write(_get_struct_d3I().pack(_x.time_cost, _x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs))
|
|
449
|
+
_x = self.hand_poses.header.frame_id
|
|
450
|
+
length = len(_x)
|
|
451
|
+
if python3 or type(_x) == unicode:
|
|
452
|
+
_x = _x.encode('utf-8')
|
|
453
|
+
length = len(_x)
|
|
454
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
455
|
+
buff.write(_get_struct_3d().pack(*self.hand_poses.left_pose.pos_xyz))
|
|
456
|
+
buff.write(_get_struct_4d().pack(*self.hand_poses.left_pose.quat_xyzw))
|
|
457
|
+
buff.write(_get_struct_3d().pack(*self.hand_poses.left_pose.elbow_pos_xyz))
|
|
458
|
+
length = len(self.hand_poses.left_pose.joint_angles)
|
|
459
|
+
buff.write(_struct_I.pack(length))
|
|
460
|
+
pattern = '<%sd'%length
|
|
461
|
+
buff.write(struct.Struct(pattern).pack(*self.hand_poses.left_pose.joint_angles))
|
|
462
|
+
buff.write(_get_struct_3d().pack(*self.hand_poses.right_pose.pos_xyz))
|
|
463
|
+
buff.write(_get_struct_4d().pack(*self.hand_poses.right_pose.quat_xyzw))
|
|
464
|
+
buff.write(_get_struct_3d().pack(*self.hand_poses.right_pose.elbow_pos_xyz))
|
|
465
|
+
length = len(self.hand_poses.right_pose.joint_angles)
|
|
466
|
+
buff.write(_struct_I.pack(length))
|
|
467
|
+
pattern = '<%sd'%length
|
|
468
|
+
buff.write(struct.Struct(pattern).pack(*self.hand_poses.right_pose.joint_angles))
|
|
469
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
470
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
471
|
+
|
|
472
|
+
def deserialize(self, str):
|
|
473
|
+
"""
|
|
474
|
+
unpack serialized message in str into this message instance
|
|
475
|
+
:param str: byte array of serialized message, ``str``
|
|
476
|
+
"""
|
|
477
|
+
if python3:
|
|
478
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
479
|
+
try:
|
|
480
|
+
if self.hand_poses is None:
|
|
481
|
+
self.hand_poses = kuavo_msgs.msg.twoArmHandPoseFree()
|
|
482
|
+
end = 0
|
|
483
|
+
_x = self
|
|
484
|
+
start = end
|
|
485
|
+
end += 2
|
|
486
|
+
(_x.success, _x.with_torso,) = _get_struct_2B().unpack(str[start:end])
|
|
487
|
+
self.success = bool(self.success)
|
|
488
|
+
self.with_torso = bool(self.with_torso)
|
|
489
|
+
start = end
|
|
490
|
+
end += 4
|
|
491
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
492
|
+
pattern = '<%sd'%length
|
|
493
|
+
start = end
|
|
494
|
+
s = struct.Struct(pattern)
|
|
495
|
+
end += s.size
|
|
496
|
+
self.q_arm = s.unpack(str[start:end])
|
|
497
|
+
start = end
|
|
498
|
+
end += 4
|
|
499
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
500
|
+
pattern = '<%sd'%length
|
|
501
|
+
start = end
|
|
502
|
+
s = struct.Struct(pattern)
|
|
503
|
+
end += s.size
|
|
504
|
+
self.q_torso = s.unpack(str[start:end])
|
|
505
|
+
_x = self
|
|
506
|
+
start = end
|
|
507
|
+
end += 20
|
|
508
|
+
(_x.time_cost, _x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs,) = _get_struct_d3I().unpack(str[start:end])
|
|
509
|
+
start = end
|
|
510
|
+
end += 4
|
|
511
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
512
|
+
start = end
|
|
513
|
+
end += length
|
|
514
|
+
if python3:
|
|
515
|
+
self.hand_poses.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
516
|
+
else:
|
|
517
|
+
self.hand_poses.header.frame_id = str[start:end]
|
|
518
|
+
start = end
|
|
519
|
+
end += 24
|
|
520
|
+
self.hand_poses.left_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
521
|
+
start = end
|
|
522
|
+
end += 32
|
|
523
|
+
self.hand_poses.left_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
|
|
524
|
+
start = end
|
|
525
|
+
end += 24
|
|
526
|
+
self.hand_poses.left_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
527
|
+
start = end
|
|
528
|
+
end += 4
|
|
529
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
530
|
+
pattern = '<%sd'%length
|
|
531
|
+
start = end
|
|
532
|
+
s = struct.Struct(pattern)
|
|
533
|
+
end += s.size
|
|
534
|
+
self.hand_poses.left_pose.joint_angles = s.unpack(str[start:end])
|
|
535
|
+
start = end
|
|
536
|
+
end += 24
|
|
537
|
+
self.hand_poses.right_pose.pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
538
|
+
start = end
|
|
539
|
+
end += 32
|
|
540
|
+
self.hand_poses.right_pose.quat_xyzw = _get_struct_4d().unpack(str[start:end])
|
|
541
|
+
start = end
|
|
542
|
+
end += 24
|
|
543
|
+
self.hand_poses.right_pose.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
544
|
+
start = end
|
|
545
|
+
end += 4
|
|
546
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
547
|
+
pattern = '<%sd'%length
|
|
548
|
+
start = end
|
|
549
|
+
s = struct.Struct(pattern)
|
|
550
|
+
end += s.size
|
|
551
|
+
self.hand_poses.right_pose.joint_angles = s.unpack(str[start:end])
|
|
552
|
+
return self
|
|
553
|
+
except struct.error as e:
|
|
554
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
def serialize_numpy(self, buff, numpy):
|
|
558
|
+
"""
|
|
559
|
+
serialize message with numpy array types into buffer
|
|
560
|
+
:param buff: buffer, ``StringIO``
|
|
561
|
+
:param numpy: numpy python module
|
|
562
|
+
"""
|
|
563
|
+
try:
|
|
564
|
+
_x = self
|
|
565
|
+
buff.write(_get_struct_2B().pack(_x.success, _x.with_torso))
|
|
566
|
+
length = len(self.q_arm)
|
|
567
|
+
buff.write(_struct_I.pack(length))
|
|
568
|
+
pattern = '<%sd'%length
|
|
569
|
+
buff.write(self.q_arm.tostring())
|
|
570
|
+
length = len(self.q_torso)
|
|
571
|
+
buff.write(_struct_I.pack(length))
|
|
572
|
+
pattern = '<%sd'%length
|
|
573
|
+
buff.write(self.q_torso.tostring())
|
|
574
|
+
_x = self
|
|
575
|
+
buff.write(_get_struct_d3I().pack(_x.time_cost, _x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs))
|
|
576
|
+
_x = self.hand_poses.header.frame_id
|
|
577
|
+
length = len(_x)
|
|
578
|
+
if python3 or type(_x) == unicode:
|
|
579
|
+
_x = _x.encode('utf-8')
|
|
580
|
+
length = len(_x)
|
|
581
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
582
|
+
buff.write(self.hand_poses.left_pose.pos_xyz.tostring())
|
|
583
|
+
buff.write(self.hand_poses.left_pose.quat_xyzw.tostring())
|
|
584
|
+
buff.write(self.hand_poses.left_pose.elbow_pos_xyz.tostring())
|
|
585
|
+
length = len(self.hand_poses.left_pose.joint_angles)
|
|
586
|
+
buff.write(_struct_I.pack(length))
|
|
587
|
+
pattern = '<%sd'%length
|
|
588
|
+
buff.write(self.hand_poses.left_pose.joint_angles.tostring())
|
|
589
|
+
buff.write(self.hand_poses.right_pose.pos_xyz.tostring())
|
|
590
|
+
buff.write(self.hand_poses.right_pose.quat_xyzw.tostring())
|
|
591
|
+
buff.write(self.hand_poses.right_pose.elbow_pos_xyz.tostring())
|
|
592
|
+
length = len(self.hand_poses.right_pose.joint_angles)
|
|
593
|
+
buff.write(_struct_I.pack(length))
|
|
594
|
+
pattern = '<%sd'%length
|
|
595
|
+
buff.write(self.hand_poses.right_pose.joint_angles.tostring())
|
|
596
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
597
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
598
|
+
|
|
599
|
+
def deserialize_numpy(self, str, numpy):
|
|
600
|
+
"""
|
|
601
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
602
|
+
:param str: byte array of serialized message, ``str``
|
|
603
|
+
:param numpy: numpy python module
|
|
604
|
+
"""
|
|
605
|
+
if python3:
|
|
606
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
607
|
+
try:
|
|
608
|
+
if self.hand_poses is None:
|
|
609
|
+
self.hand_poses = kuavo_msgs.msg.twoArmHandPoseFree()
|
|
610
|
+
end = 0
|
|
611
|
+
_x = self
|
|
612
|
+
start = end
|
|
613
|
+
end += 2
|
|
614
|
+
(_x.success, _x.with_torso,) = _get_struct_2B().unpack(str[start:end])
|
|
615
|
+
self.success = bool(self.success)
|
|
616
|
+
self.with_torso = bool(self.with_torso)
|
|
617
|
+
start = end
|
|
618
|
+
end += 4
|
|
619
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
620
|
+
pattern = '<%sd'%length
|
|
621
|
+
start = end
|
|
622
|
+
s = struct.Struct(pattern)
|
|
623
|
+
end += s.size
|
|
624
|
+
self.q_arm = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
625
|
+
start = end
|
|
626
|
+
end += 4
|
|
627
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
628
|
+
pattern = '<%sd'%length
|
|
629
|
+
start = end
|
|
630
|
+
s = struct.Struct(pattern)
|
|
631
|
+
end += s.size
|
|
632
|
+
self.q_torso = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
633
|
+
_x = self
|
|
634
|
+
start = end
|
|
635
|
+
end += 20
|
|
636
|
+
(_x.time_cost, _x.hand_poses.header.seq, _x.hand_poses.header.stamp.secs, _x.hand_poses.header.stamp.nsecs,) = _get_struct_d3I().unpack(str[start:end])
|
|
637
|
+
start = end
|
|
638
|
+
end += 4
|
|
639
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
640
|
+
start = end
|
|
641
|
+
end += length
|
|
642
|
+
if python3:
|
|
643
|
+
self.hand_poses.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
644
|
+
else:
|
|
645
|
+
self.hand_poses.header.frame_id = str[start:end]
|
|
646
|
+
start = end
|
|
647
|
+
end += 24
|
|
648
|
+
self.hand_poses.left_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
649
|
+
start = end
|
|
650
|
+
end += 32
|
|
651
|
+
self.hand_poses.left_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
|
|
652
|
+
start = end
|
|
653
|
+
end += 24
|
|
654
|
+
self.hand_poses.left_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
655
|
+
start = end
|
|
656
|
+
end += 4
|
|
657
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
658
|
+
pattern = '<%sd'%length
|
|
659
|
+
start = end
|
|
660
|
+
s = struct.Struct(pattern)
|
|
661
|
+
end += s.size
|
|
662
|
+
self.hand_poses.left_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
663
|
+
start = end
|
|
664
|
+
end += 24
|
|
665
|
+
self.hand_poses.right_pose.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
666
|
+
start = end
|
|
667
|
+
end += 32
|
|
668
|
+
self.hand_poses.right_pose.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
|
|
669
|
+
start = end
|
|
670
|
+
end += 24
|
|
671
|
+
self.hand_poses.right_pose.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
672
|
+
start = end
|
|
673
|
+
end += 4
|
|
674
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
675
|
+
pattern = '<%sd'%length
|
|
676
|
+
start = end
|
|
677
|
+
s = struct.Struct(pattern)
|
|
678
|
+
end += s.size
|
|
679
|
+
self.hand_poses.right_pose.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
680
|
+
return self
|
|
681
|
+
except struct.error as e:
|
|
682
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
683
|
+
|
|
684
|
+
_struct_I = genpy.struct_I
|
|
685
|
+
def _get_struct_I():
|
|
686
|
+
global _struct_I
|
|
687
|
+
return _struct_I
|
|
688
|
+
_struct_2B = None
|
|
689
|
+
def _get_struct_2B():
|
|
690
|
+
global _struct_2B
|
|
691
|
+
if _struct_2B is None:
|
|
692
|
+
_struct_2B = struct.Struct("<2B")
|
|
693
|
+
return _struct_2B
|
|
694
|
+
_struct_3d = None
|
|
695
|
+
def _get_struct_3d():
|
|
696
|
+
global _struct_3d
|
|
697
|
+
if _struct_3d is None:
|
|
698
|
+
_struct_3d = struct.Struct("<3d")
|
|
699
|
+
return _struct_3d
|
|
700
|
+
_struct_4d = None
|
|
701
|
+
def _get_struct_4d():
|
|
702
|
+
global _struct_4d
|
|
703
|
+
if _struct_4d is None:
|
|
704
|
+
_struct_4d = struct.Struct("<4d")
|
|
705
|
+
return _struct_4d
|
|
706
|
+
_struct_d3I = None
|
|
707
|
+
def _get_struct_d3I():
|
|
708
|
+
global _struct_d3I
|
|
709
|
+
if _struct_d3I is None:
|
|
710
|
+
_struct_d3I = struct.Struct("<d3I")
|
|
711
|
+
return _struct_d3I
|
|
712
|
+
class twoArmHandPoseCmdFreeSrv(object):
|
|
713
|
+
_type = 'kuavo_msgs/twoArmHandPoseCmdFreeSrv'
|
|
714
|
+
_md5sum = '9e826e4318978cda947091039c85e59e'
|
|
715
|
+
_request_class = twoArmHandPoseCmdFreeSrvRequest
|
|
716
|
+
_response_class = twoArmHandPoseCmdFreeSrvResponse
|