kuavo-humanoid-sdk 1.2.1b3269__20250911204115-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/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/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 +299 -0
- kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
- kuavo_humanoid_sdk/kuavo/robot_blockly.py +1162 -0
- kuavo_humanoid_sdk/kuavo/robot_climbstair.py +1607 -0
- kuavo_humanoid_sdk/kuavo/robot_head.py +74 -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.1b3269.dist-info/METADATA +296 -0
- kuavo_humanoid_sdk-1.2.1b3269.dist-info/RECORD +184 -0
- kuavo_humanoid_sdk-1.2.1b3269.dist-info/WHEEL +6 -0
- kuavo_humanoid_sdk-1.2.1b3269.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/armHandPoseFree.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 armHandPoseFree(genpy.Message):
|
|
11
|
+
_md5sum = "db2a990bc43e189bf12bc1b55df612a8"
|
|
12
|
+
_type = "kuavo_msgs/armHandPoseFree"
|
|
13
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
14
|
+
_full_text = """float64[3] pos_xyz
|
|
15
|
+
float64[4] quat_xyzw
|
|
16
|
+
|
|
17
|
+
float64[3] elbow_pos_xyz
|
|
18
|
+
|
|
19
|
+
float64[] joint_angles
|
|
20
|
+
"""
|
|
21
|
+
__slots__ = ['pos_xyz','quat_xyzw','elbow_pos_xyz','joint_angles']
|
|
22
|
+
_slot_types = ['float64[3]','float64[4]','float64[3]','float64[]']
|
|
23
|
+
|
|
24
|
+
def __init__(self, *args, **kwds):
|
|
25
|
+
"""
|
|
26
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
27
|
+
set to None will be assigned a default value. The recommend
|
|
28
|
+
use is keyword arguments as this is more robust to future message
|
|
29
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
30
|
+
|
|
31
|
+
The available fields are:
|
|
32
|
+
pos_xyz,quat_xyzw,elbow_pos_xyz,joint_angles
|
|
33
|
+
|
|
34
|
+
:param args: complete set of field values, in .msg order
|
|
35
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
36
|
+
to set specific fields.
|
|
37
|
+
"""
|
|
38
|
+
if args or kwds:
|
|
39
|
+
super(armHandPoseFree, self).__init__(*args, **kwds)
|
|
40
|
+
# message fields cannot be None, assign default values for those that are
|
|
41
|
+
if self.pos_xyz is None:
|
|
42
|
+
self.pos_xyz = [0.] * 3
|
|
43
|
+
if self.quat_xyzw is None:
|
|
44
|
+
self.quat_xyzw = [0.] * 4
|
|
45
|
+
if self.elbow_pos_xyz is None:
|
|
46
|
+
self.elbow_pos_xyz = [0.] * 3
|
|
47
|
+
if self.joint_angles is None:
|
|
48
|
+
self.joint_angles = []
|
|
49
|
+
else:
|
|
50
|
+
self.pos_xyz = [0.] * 3
|
|
51
|
+
self.quat_xyzw = [0.] * 4
|
|
52
|
+
self.elbow_pos_xyz = [0.] * 3
|
|
53
|
+
self.joint_angles = []
|
|
54
|
+
|
|
55
|
+
def _get_types(self):
|
|
56
|
+
"""
|
|
57
|
+
internal API method
|
|
58
|
+
"""
|
|
59
|
+
return self._slot_types
|
|
60
|
+
|
|
61
|
+
def serialize(self, buff):
|
|
62
|
+
"""
|
|
63
|
+
serialize message into buffer
|
|
64
|
+
:param buff: buffer, ``StringIO``
|
|
65
|
+
"""
|
|
66
|
+
try:
|
|
67
|
+
buff.write(_get_struct_3d().pack(*self.pos_xyz))
|
|
68
|
+
buff.write(_get_struct_4d().pack(*self.quat_xyzw))
|
|
69
|
+
buff.write(_get_struct_3d().pack(*self.elbow_pos_xyz))
|
|
70
|
+
length = len(self.joint_angles)
|
|
71
|
+
buff.write(_struct_I.pack(length))
|
|
72
|
+
pattern = '<%sd'%length
|
|
73
|
+
buff.write(struct.Struct(pattern).pack(*self.joint_angles))
|
|
74
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
75
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
76
|
+
|
|
77
|
+
def deserialize(self, str):
|
|
78
|
+
"""
|
|
79
|
+
unpack serialized message in str into this message instance
|
|
80
|
+
:param str: byte array of serialized message, ``str``
|
|
81
|
+
"""
|
|
82
|
+
if python3:
|
|
83
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
84
|
+
try:
|
|
85
|
+
end = 0
|
|
86
|
+
start = end
|
|
87
|
+
end += 24
|
|
88
|
+
self.pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
89
|
+
start = end
|
|
90
|
+
end += 32
|
|
91
|
+
self.quat_xyzw = _get_struct_4d().unpack(str[start:end])
|
|
92
|
+
start = end
|
|
93
|
+
end += 24
|
|
94
|
+
self.elbow_pos_xyz = _get_struct_3d().unpack(str[start:end])
|
|
95
|
+
start = end
|
|
96
|
+
end += 4
|
|
97
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
98
|
+
pattern = '<%sd'%length
|
|
99
|
+
start = end
|
|
100
|
+
s = struct.Struct(pattern)
|
|
101
|
+
end += s.size
|
|
102
|
+
self.joint_angles = s.unpack(str[start:end])
|
|
103
|
+
return self
|
|
104
|
+
except struct.error as e:
|
|
105
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def serialize_numpy(self, buff, numpy):
|
|
109
|
+
"""
|
|
110
|
+
serialize message with numpy array types into buffer
|
|
111
|
+
:param buff: buffer, ``StringIO``
|
|
112
|
+
:param numpy: numpy python module
|
|
113
|
+
"""
|
|
114
|
+
try:
|
|
115
|
+
buff.write(self.pos_xyz.tostring())
|
|
116
|
+
buff.write(self.quat_xyzw.tostring())
|
|
117
|
+
buff.write(self.elbow_pos_xyz.tostring())
|
|
118
|
+
length = len(self.joint_angles)
|
|
119
|
+
buff.write(_struct_I.pack(length))
|
|
120
|
+
pattern = '<%sd'%length
|
|
121
|
+
buff.write(self.joint_angles.tostring())
|
|
122
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
123
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
124
|
+
|
|
125
|
+
def deserialize_numpy(self, str, numpy):
|
|
126
|
+
"""
|
|
127
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
128
|
+
:param str: byte array of serialized message, ``str``
|
|
129
|
+
:param numpy: numpy python module
|
|
130
|
+
"""
|
|
131
|
+
if python3:
|
|
132
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
133
|
+
try:
|
|
134
|
+
end = 0
|
|
135
|
+
start = end
|
|
136
|
+
end += 24
|
|
137
|
+
self.pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
138
|
+
start = end
|
|
139
|
+
end += 32
|
|
140
|
+
self.quat_xyzw = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
|
|
141
|
+
start = end
|
|
142
|
+
end += 24
|
|
143
|
+
self.elbow_pos_xyz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=3)
|
|
144
|
+
start = end
|
|
145
|
+
end += 4
|
|
146
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
147
|
+
pattern = '<%sd'%length
|
|
148
|
+
start = end
|
|
149
|
+
s = struct.Struct(pattern)
|
|
150
|
+
end += s.size
|
|
151
|
+
self.joint_angles = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
152
|
+
return self
|
|
153
|
+
except struct.error as e:
|
|
154
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
155
|
+
|
|
156
|
+
_struct_I = genpy.struct_I
|
|
157
|
+
def _get_struct_I():
|
|
158
|
+
global _struct_I
|
|
159
|
+
return _struct_I
|
|
160
|
+
_struct_3d = None
|
|
161
|
+
def _get_struct_3d():
|
|
162
|
+
global _struct_3d
|
|
163
|
+
if _struct_3d is None:
|
|
164
|
+
_struct_3d = struct.Struct("<3d")
|
|
165
|
+
return _struct_3d
|
|
166
|
+
_struct_4d = None
|
|
167
|
+
def _get_struct_4d():
|
|
168
|
+
global _struct_4d
|
|
169
|
+
if _struct_4d is None:
|
|
170
|
+
_struct_4d = struct.Struct("<4d")
|
|
171
|
+
return _struct_4d
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/armPoseWithTimeStamp.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 armPoseWithTimeStamp(genpy.Message):
|
|
11
|
+
_md5sum = "3404338b5cb042ac3b3cf3de3f0fcb4f"
|
|
12
|
+
_type = "kuavo_msgs/armPoseWithTimeStamp"
|
|
13
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
14
|
+
_full_text = """int32 offset
|
|
15
|
+
float64[] left_hand_pose
|
|
16
|
+
float64[] right_hand_pose"""
|
|
17
|
+
__slots__ = ['offset','left_hand_pose','right_hand_pose']
|
|
18
|
+
_slot_types = ['int32','float64[]','float64[]']
|
|
19
|
+
|
|
20
|
+
def __init__(self, *args, **kwds):
|
|
21
|
+
"""
|
|
22
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
23
|
+
set to None will be assigned a default value. The recommend
|
|
24
|
+
use is keyword arguments as this is more robust to future message
|
|
25
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
26
|
+
|
|
27
|
+
The available fields are:
|
|
28
|
+
offset,left_hand_pose,right_hand_pose
|
|
29
|
+
|
|
30
|
+
:param args: complete set of field values, in .msg order
|
|
31
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
32
|
+
to set specific fields.
|
|
33
|
+
"""
|
|
34
|
+
if args or kwds:
|
|
35
|
+
super(armPoseWithTimeStamp, self).__init__(*args, **kwds)
|
|
36
|
+
# message fields cannot be None, assign default values for those that are
|
|
37
|
+
if self.offset is None:
|
|
38
|
+
self.offset = 0
|
|
39
|
+
if self.left_hand_pose is None:
|
|
40
|
+
self.left_hand_pose = []
|
|
41
|
+
if self.right_hand_pose is None:
|
|
42
|
+
self.right_hand_pose = []
|
|
43
|
+
else:
|
|
44
|
+
self.offset = 0
|
|
45
|
+
self.left_hand_pose = []
|
|
46
|
+
self.right_hand_pose = []
|
|
47
|
+
|
|
48
|
+
def _get_types(self):
|
|
49
|
+
"""
|
|
50
|
+
internal API method
|
|
51
|
+
"""
|
|
52
|
+
return self._slot_types
|
|
53
|
+
|
|
54
|
+
def serialize(self, buff):
|
|
55
|
+
"""
|
|
56
|
+
serialize message into buffer
|
|
57
|
+
:param buff: buffer, ``StringIO``
|
|
58
|
+
"""
|
|
59
|
+
try:
|
|
60
|
+
_x = self.offset
|
|
61
|
+
buff.write(_get_struct_i().pack(_x))
|
|
62
|
+
length = len(self.left_hand_pose)
|
|
63
|
+
buff.write(_struct_I.pack(length))
|
|
64
|
+
pattern = '<%sd'%length
|
|
65
|
+
buff.write(struct.Struct(pattern).pack(*self.left_hand_pose))
|
|
66
|
+
length = len(self.right_hand_pose)
|
|
67
|
+
buff.write(_struct_I.pack(length))
|
|
68
|
+
pattern = '<%sd'%length
|
|
69
|
+
buff.write(struct.Struct(pattern).pack(*self.right_hand_pose))
|
|
70
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
71
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
72
|
+
|
|
73
|
+
def deserialize(self, str):
|
|
74
|
+
"""
|
|
75
|
+
unpack serialized message in str into this message instance
|
|
76
|
+
:param str: byte array of serialized message, ``str``
|
|
77
|
+
"""
|
|
78
|
+
if python3:
|
|
79
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
80
|
+
try:
|
|
81
|
+
end = 0
|
|
82
|
+
start = end
|
|
83
|
+
end += 4
|
|
84
|
+
(self.offset,) = _get_struct_i().unpack(str[start:end])
|
|
85
|
+
start = end
|
|
86
|
+
end += 4
|
|
87
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
88
|
+
pattern = '<%sd'%length
|
|
89
|
+
start = end
|
|
90
|
+
s = struct.Struct(pattern)
|
|
91
|
+
end += s.size
|
|
92
|
+
self.left_hand_pose = s.unpack(str[start:end])
|
|
93
|
+
start = end
|
|
94
|
+
end += 4
|
|
95
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
96
|
+
pattern = '<%sd'%length
|
|
97
|
+
start = end
|
|
98
|
+
s = struct.Struct(pattern)
|
|
99
|
+
end += s.size
|
|
100
|
+
self.right_hand_pose = s.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.offset
|
|
114
|
+
buff.write(_get_struct_i().pack(_x))
|
|
115
|
+
length = len(self.left_hand_pose)
|
|
116
|
+
buff.write(_struct_I.pack(length))
|
|
117
|
+
pattern = '<%sd'%length
|
|
118
|
+
buff.write(self.left_hand_pose.tostring())
|
|
119
|
+
length = len(self.right_hand_pose)
|
|
120
|
+
buff.write(_struct_I.pack(length))
|
|
121
|
+
pattern = '<%sd'%length
|
|
122
|
+
buff.write(self.right_hand_pose.tostring())
|
|
123
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
124
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
125
|
+
|
|
126
|
+
def deserialize_numpy(self, str, numpy):
|
|
127
|
+
"""
|
|
128
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
129
|
+
:param str: byte array of serialized message, ``str``
|
|
130
|
+
:param numpy: numpy python module
|
|
131
|
+
"""
|
|
132
|
+
if python3:
|
|
133
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
134
|
+
try:
|
|
135
|
+
end = 0
|
|
136
|
+
start = end
|
|
137
|
+
end += 4
|
|
138
|
+
(self.offset,) = _get_struct_i().unpack(str[start:end])
|
|
139
|
+
start = end
|
|
140
|
+
end += 4
|
|
141
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
142
|
+
pattern = '<%sd'%length
|
|
143
|
+
start = end
|
|
144
|
+
s = struct.Struct(pattern)
|
|
145
|
+
end += s.size
|
|
146
|
+
self.left_hand_pose = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
147
|
+
start = end
|
|
148
|
+
end += 4
|
|
149
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
150
|
+
pattern = '<%sd'%length
|
|
151
|
+
start = end
|
|
152
|
+
s = struct.Struct(pattern)
|
|
153
|
+
end += s.size
|
|
154
|
+
self.right_hand_pose = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
155
|
+
return self
|
|
156
|
+
except struct.error as e:
|
|
157
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
158
|
+
|
|
159
|
+
_struct_I = genpy.struct_I
|
|
160
|
+
def _get_struct_I():
|
|
161
|
+
global _struct_I
|
|
162
|
+
return _struct_I
|
|
163
|
+
_struct_i = None
|
|
164
|
+
def _get_struct_i():
|
|
165
|
+
global _struct_i
|
|
166
|
+
if _struct_i is None:
|
|
167
|
+
_struct_i = struct.Struct("<i")
|
|
168
|
+
return _struct_i
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/armTargetPoses.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 armTargetPoses(genpy.Message):
|
|
11
|
+
_md5sum = "97c6c0404ab3600c77900903cc956f79"
|
|
12
|
+
_type = "kuavo_msgs/armTargetPoses"
|
|
13
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
14
|
+
_full_text = """# times: times series
|
|
15
|
+
# values: values matrix
|
|
16
|
+
float64[] times
|
|
17
|
+
float64[] values
|
|
18
|
+
int32 frame # 0 keep current frame 1 world frame (based on odom) 2 local frame 3 VRFrame 4 manipulation world frame
|
|
19
|
+
"""
|
|
20
|
+
__slots__ = ['times','values','frame']
|
|
21
|
+
_slot_types = ['float64[]','float64[]','int32']
|
|
22
|
+
|
|
23
|
+
def __init__(self, *args, **kwds):
|
|
24
|
+
"""
|
|
25
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
26
|
+
set to None will be assigned a default value. The recommend
|
|
27
|
+
use is keyword arguments as this is more robust to future message
|
|
28
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
29
|
+
|
|
30
|
+
The available fields are:
|
|
31
|
+
times,values,frame
|
|
32
|
+
|
|
33
|
+
:param args: complete set of field values, in .msg order
|
|
34
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
35
|
+
to set specific fields.
|
|
36
|
+
"""
|
|
37
|
+
if args or kwds:
|
|
38
|
+
super(armTargetPoses, self).__init__(*args, **kwds)
|
|
39
|
+
# message fields cannot be None, assign default values for those that are
|
|
40
|
+
if self.times is None:
|
|
41
|
+
self.times = []
|
|
42
|
+
if self.values is None:
|
|
43
|
+
self.values = []
|
|
44
|
+
if self.frame is None:
|
|
45
|
+
self.frame = 0
|
|
46
|
+
else:
|
|
47
|
+
self.times = []
|
|
48
|
+
self.values = []
|
|
49
|
+
self.frame = 0
|
|
50
|
+
|
|
51
|
+
def _get_types(self):
|
|
52
|
+
"""
|
|
53
|
+
internal API method
|
|
54
|
+
"""
|
|
55
|
+
return self._slot_types
|
|
56
|
+
|
|
57
|
+
def serialize(self, buff):
|
|
58
|
+
"""
|
|
59
|
+
serialize message into buffer
|
|
60
|
+
:param buff: buffer, ``StringIO``
|
|
61
|
+
"""
|
|
62
|
+
try:
|
|
63
|
+
length = len(self.times)
|
|
64
|
+
buff.write(_struct_I.pack(length))
|
|
65
|
+
pattern = '<%sd'%length
|
|
66
|
+
buff.write(struct.Struct(pattern).pack(*self.times))
|
|
67
|
+
length = len(self.values)
|
|
68
|
+
buff.write(_struct_I.pack(length))
|
|
69
|
+
pattern = '<%sd'%length
|
|
70
|
+
buff.write(struct.Struct(pattern).pack(*self.values))
|
|
71
|
+
_x = self.frame
|
|
72
|
+
buff.write(_get_struct_i().pack(_x))
|
|
73
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
74
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
75
|
+
|
|
76
|
+
def deserialize(self, str):
|
|
77
|
+
"""
|
|
78
|
+
unpack serialized message in str into this message instance
|
|
79
|
+
:param str: byte array of serialized message, ``str``
|
|
80
|
+
"""
|
|
81
|
+
if python3:
|
|
82
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
83
|
+
try:
|
|
84
|
+
end = 0
|
|
85
|
+
start = end
|
|
86
|
+
end += 4
|
|
87
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
88
|
+
pattern = '<%sd'%length
|
|
89
|
+
start = end
|
|
90
|
+
s = struct.Struct(pattern)
|
|
91
|
+
end += s.size
|
|
92
|
+
self.times = s.unpack(str[start:end])
|
|
93
|
+
start = end
|
|
94
|
+
end += 4
|
|
95
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
96
|
+
pattern = '<%sd'%length
|
|
97
|
+
start = end
|
|
98
|
+
s = struct.Struct(pattern)
|
|
99
|
+
end += s.size
|
|
100
|
+
self.values = s.unpack(str[start:end])
|
|
101
|
+
start = end
|
|
102
|
+
end += 4
|
|
103
|
+
(self.frame,) = _get_struct_i().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
|
+
length = len(self.times)
|
|
117
|
+
buff.write(_struct_I.pack(length))
|
|
118
|
+
pattern = '<%sd'%length
|
|
119
|
+
buff.write(self.times.tostring())
|
|
120
|
+
length = len(self.values)
|
|
121
|
+
buff.write(_struct_I.pack(length))
|
|
122
|
+
pattern = '<%sd'%length
|
|
123
|
+
buff.write(self.values.tostring())
|
|
124
|
+
_x = self.frame
|
|
125
|
+
buff.write(_get_struct_i().pack(_x))
|
|
126
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
127
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
128
|
+
|
|
129
|
+
def deserialize_numpy(self, str, numpy):
|
|
130
|
+
"""
|
|
131
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
132
|
+
:param str: byte array of serialized message, ``str``
|
|
133
|
+
:param numpy: numpy python module
|
|
134
|
+
"""
|
|
135
|
+
if python3:
|
|
136
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
137
|
+
try:
|
|
138
|
+
end = 0
|
|
139
|
+
start = end
|
|
140
|
+
end += 4
|
|
141
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
142
|
+
pattern = '<%sd'%length
|
|
143
|
+
start = end
|
|
144
|
+
s = struct.Struct(pattern)
|
|
145
|
+
end += s.size
|
|
146
|
+
self.times = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
147
|
+
start = end
|
|
148
|
+
end += 4
|
|
149
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
150
|
+
pattern = '<%sd'%length
|
|
151
|
+
start = end
|
|
152
|
+
s = struct.Struct(pattern)
|
|
153
|
+
end += s.size
|
|
154
|
+
self.values = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
155
|
+
start = end
|
|
156
|
+
end += 4
|
|
157
|
+
(self.frame,) = _get_struct_i().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_i = None
|
|
167
|
+
def _get_struct_i():
|
|
168
|
+
global _struct_i
|
|
169
|
+
if _struct_i is None:
|
|
170
|
+
_struct_i = struct.Struct("<i")
|
|
171
|
+
return _struct_i
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/bezierCurveCubicPoint.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 bezierCurveCubicPoint(genpy.Message):
|
|
11
|
+
_md5sum = "4262726b7e41e02a58fb5df3475aa027"
|
|
12
|
+
_type = "kuavo_msgs/bezierCurveCubicPoint"
|
|
13
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
14
|
+
_full_text = """# [x, y] x is time, y is value
|
|
15
|
+
|
|
16
|
+
float64[] end_point
|
|
17
|
+
float64[] left_control_point
|
|
18
|
+
float64[] right_control_point"""
|
|
19
|
+
__slots__ = ['end_point','left_control_point','right_control_point']
|
|
20
|
+
_slot_types = ['float64[]','float64[]','float64[]']
|
|
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
|
+
end_point,left_control_point,right_control_point
|
|
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(bezierCurveCubicPoint, self).__init__(*args, **kwds)
|
|
38
|
+
# message fields cannot be None, assign default values for those that are
|
|
39
|
+
if self.end_point is None:
|
|
40
|
+
self.end_point = []
|
|
41
|
+
if self.left_control_point is None:
|
|
42
|
+
self.left_control_point = []
|
|
43
|
+
if self.right_control_point is None:
|
|
44
|
+
self.right_control_point = []
|
|
45
|
+
else:
|
|
46
|
+
self.end_point = []
|
|
47
|
+
self.left_control_point = []
|
|
48
|
+
self.right_control_point = []
|
|
49
|
+
|
|
50
|
+
def _get_types(self):
|
|
51
|
+
"""
|
|
52
|
+
internal API method
|
|
53
|
+
"""
|
|
54
|
+
return self._slot_types
|
|
55
|
+
|
|
56
|
+
def serialize(self, buff):
|
|
57
|
+
"""
|
|
58
|
+
serialize message into buffer
|
|
59
|
+
:param buff: buffer, ``StringIO``
|
|
60
|
+
"""
|
|
61
|
+
try:
|
|
62
|
+
length = len(self.end_point)
|
|
63
|
+
buff.write(_struct_I.pack(length))
|
|
64
|
+
pattern = '<%sd'%length
|
|
65
|
+
buff.write(struct.Struct(pattern).pack(*self.end_point))
|
|
66
|
+
length = len(self.left_control_point)
|
|
67
|
+
buff.write(_struct_I.pack(length))
|
|
68
|
+
pattern = '<%sd'%length
|
|
69
|
+
buff.write(struct.Struct(pattern).pack(*self.left_control_point))
|
|
70
|
+
length = len(self.right_control_point)
|
|
71
|
+
buff.write(_struct_I.pack(length))
|
|
72
|
+
pattern = '<%sd'%length
|
|
73
|
+
buff.write(struct.Struct(pattern).pack(*self.right_control_point))
|
|
74
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
75
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
76
|
+
|
|
77
|
+
def deserialize(self, str):
|
|
78
|
+
"""
|
|
79
|
+
unpack serialized message in str into this message instance
|
|
80
|
+
:param str: byte array of serialized message, ``str``
|
|
81
|
+
"""
|
|
82
|
+
if python3:
|
|
83
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
84
|
+
try:
|
|
85
|
+
end = 0
|
|
86
|
+
start = end
|
|
87
|
+
end += 4
|
|
88
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
89
|
+
pattern = '<%sd'%length
|
|
90
|
+
start = end
|
|
91
|
+
s = struct.Struct(pattern)
|
|
92
|
+
end += s.size
|
|
93
|
+
self.end_point = s.unpack(str[start:end])
|
|
94
|
+
start = end
|
|
95
|
+
end += 4
|
|
96
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
97
|
+
pattern = '<%sd'%length
|
|
98
|
+
start = end
|
|
99
|
+
s = struct.Struct(pattern)
|
|
100
|
+
end += s.size
|
|
101
|
+
self.left_control_point = s.unpack(str[start:end])
|
|
102
|
+
start = end
|
|
103
|
+
end += 4
|
|
104
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
105
|
+
pattern = '<%sd'%length
|
|
106
|
+
start = end
|
|
107
|
+
s = struct.Struct(pattern)
|
|
108
|
+
end += s.size
|
|
109
|
+
self.right_control_point = s.unpack(str[start:end])
|
|
110
|
+
return self
|
|
111
|
+
except struct.error as e:
|
|
112
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def serialize_numpy(self, buff, numpy):
|
|
116
|
+
"""
|
|
117
|
+
serialize message with numpy array types into buffer
|
|
118
|
+
:param buff: buffer, ``StringIO``
|
|
119
|
+
:param numpy: numpy python module
|
|
120
|
+
"""
|
|
121
|
+
try:
|
|
122
|
+
length = len(self.end_point)
|
|
123
|
+
buff.write(_struct_I.pack(length))
|
|
124
|
+
pattern = '<%sd'%length
|
|
125
|
+
buff.write(self.end_point.tostring())
|
|
126
|
+
length = len(self.left_control_point)
|
|
127
|
+
buff.write(_struct_I.pack(length))
|
|
128
|
+
pattern = '<%sd'%length
|
|
129
|
+
buff.write(self.left_control_point.tostring())
|
|
130
|
+
length = len(self.right_control_point)
|
|
131
|
+
buff.write(_struct_I.pack(length))
|
|
132
|
+
pattern = '<%sd'%length
|
|
133
|
+
buff.write(self.right_control_point.tostring())
|
|
134
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
135
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
136
|
+
|
|
137
|
+
def deserialize_numpy(self, str, numpy):
|
|
138
|
+
"""
|
|
139
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
140
|
+
:param str: byte array of serialized message, ``str``
|
|
141
|
+
:param numpy: numpy python module
|
|
142
|
+
"""
|
|
143
|
+
if python3:
|
|
144
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
145
|
+
try:
|
|
146
|
+
end = 0
|
|
147
|
+
start = end
|
|
148
|
+
end += 4
|
|
149
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
150
|
+
pattern = '<%sd'%length
|
|
151
|
+
start = end
|
|
152
|
+
s = struct.Struct(pattern)
|
|
153
|
+
end += s.size
|
|
154
|
+
self.end_point = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
155
|
+
start = end
|
|
156
|
+
end += 4
|
|
157
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
158
|
+
pattern = '<%sd'%length
|
|
159
|
+
start = end
|
|
160
|
+
s = struct.Struct(pattern)
|
|
161
|
+
end += s.size
|
|
162
|
+
self.left_control_point = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
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.right_control_point = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
171
|
+
return self
|
|
172
|
+
except struct.error as e:
|
|
173
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
174
|
+
|
|
175
|
+
_struct_I = genpy.struct_I
|
|
176
|
+
def _get_struct_I():
|
|
177
|
+
global _struct_I
|
|
178
|
+
return _struct_I
|