kuavo-humanoid-sdk 1.2.1b3323__20250918212129-py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kuavo-humanoid-sdk might be problematic. Click here for more details.
- kuavo_humanoid_sdk/__init__.py +6 -0
- kuavo_humanoid_sdk/common/logger.py +45 -0
- kuavo_humanoid_sdk/interfaces/__init__.py +4 -0
- kuavo_humanoid_sdk/interfaces/data_types.py +288 -0
- kuavo_humanoid_sdk/interfaces/end_effector.py +62 -0
- kuavo_humanoid_sdk/interfaces/robot.py +22 -0
- kuavo_humanoid_sdk/interfaces/robot_info.py +56 -0
- kuavo_humanoid_sdk/kuavo/__init__.py +16 -0
- kuavo_humanoid_sdk/kuavo/core/audio.py +32 -0
- kuavo_humanoid_sdk/kuavo/core/core.py +666 -0
- kuavo_humanoid_sdk/kuavo/core/dex_hand_control.py +114 -0
- kuavo_humanoid_sdk/kuavo/core/leju_claw_control.py +67 -0
- kuavo_humanoid_sdk/kuavo/core/llm_doubao.py +608 -0
- kuavo_humanoid_sdk/kuavo/core/microphone.py +192 -0
- kuavo_humanoid_sdk/kuavo/core/navigation.py +70 -0
- kuavo_humanoid_sdk/kuavo/core/ros/audio.py +110 -0
- kuavo_humanoid_sdk/kuavo/core/ros/camera.py +105 -0
- kuavo_humanoid_sdk/kuavo/core/ros/control.py +1524 -0
- kuavo_humanoid_sdk/kuavo/core/ros/microphone.py +38 -0
- kuavo_humanoid_sdk/kuavo/core/ros/navigation.py +217 -0
- kuavo_humanoid_sdk/kuavo/core/ros/observation.py +94 -0
- kuavo_humanoid_sdk/kuavo/core/ros/param.py +201 -0
- kuavo_humanoid_sdk/kuavo/core/ros/sat_utils.py +103 -0
- kuavo_humanoid_sdk/kuavo/core/ros/state.py +652 -0
- kuavo_humanoid_sdk/kuavo/core/ros/tools.py +220 -0
- kuavo_humanoid_sdk/kuavo/core/ros/vision.py +234 -0
- kuavo_humanoid_sdk/kuavo/core/ros_env.py +238 -0
- kuavo_humanoid_sdk/kuavo/core/sdk_deprecated.py +41 -0
- kuavo_humanoid_sdk/kuavo/demo_climbstair.py +249 -0
- kuavo_humanoid_sdk/kuavo/dexterous_hand.py +238 -0
- kuavo_humanoid_sdk/kuavo/leju_claw.py +235 -0
- kuavo_humanoid_sdk/kuavo/logger_client.py +80 -0
- kuavo_humanoid_sdk/kuavo/robot.py +646 -0
- kuavo_humanoid_sdk/kuavo/robot_arm.py +411 -0
- kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
- kuavo_humanoid_sdk/kuavo/robot_blockly.py +1154 -0
- kuavo_humanoid_sdk/kuavo/robot_climbstair.py +1607 -0
- kuavo_humanoid_sdk/kuavo/robot_head.py +95 -0
- kuavo_humanoid_sdk/kuavo/robot_info.py +134 -0
- kuavo_humanoid_sdk/kuavo/robot_microphone.py +19 -0
- kuavo_humanoid_sdk/kuavo/robot_navigation.py +135 -0
- kuavo_humanoid_sdk/kuavo/robot_observation.py +64 -0
- kuavo_humanoid_sdk/kuavo/robot_speech.py +24 -0
- kuavo_humanoid_sdk/kuavo/robot_state.py +310 -0
- kuavo_humanoid_sdk/kuavo/robot_tool.py +109 -0
- kuavo_humanoid_sdk/kuavo/robot_vision.py +81 -0
- kuavo_humanoid_sdk/kuavo_strategy/__init__.py +2 -0
- kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +1325 -0
- kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +106 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/common/data_type.py +340 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/common/events/base_event.py +215 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/common/robot_sdk.py +25 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/case.py +331 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/strategy.py +504 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/utils/logger_setup.py +40 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/utils/utils.py +88 -0
- kuavo_humanoid_sdk/msg/__init__.py +4 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetection.py +306 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetectionArray.py +437 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AudioReceiverData.py +122 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_FTsensorData.py +260 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_JoySticks.py +191 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_MmDetectionMsg.py +264 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TaskPoint.py +175 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +62 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armCollisionCheckInfo.py +160 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +161 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +171 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6D.py +123 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6DTargetTrajectories.py +320 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVision.py +136 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVisionArray.py +231 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses6D.py +149 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_kuavoModeSchedule.py +224 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfo.py +143 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfoList.py +220 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotBodyMatrices.py +332 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +655 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_tagDataArray.py +216 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +273 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +316 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_CreatePath.py +581 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetAllMaps.py +241 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetCurrentMap.py +225 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetTargetPartPoseInCamera.py +298 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_InitialPoseWithTaskPoint.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_LoadMap.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_NavigateToTaskPoint.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetInitialPose.py +394 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode.py +468 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode_free.py +289 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_TaskPointOperation.py +536 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +43 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_adjustZeroPoint.py +277 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +395 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPose6DTargetTrajectoriesSrv.py +426 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorZeroPoints.py +286 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +422 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +664 -0
- kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
- kuavo_humanoid_sdk-1.2.1b3323.dist-info/METADATA +297 -0
- kuavo_humanoid_sdk-1.2.1b3323.dist-info/RECORD +186 -0
- kuavo_humanoid_sdk-1.2.1b3323.dist-info/WHEEL +6 -0
- kuavo_humanoid_sdk-1.2.1b3323.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/AprilTagDetectionArray.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 geometry_msgs.msg
|
|
10
|
+
import kuavo_msgs.msg
|
|
11
|
+
import std_msgs.msg
|
|
12
|
+
|
|
13
|
+
class AprilTagDetectionArray(genpy.Message):
|
|
14
|
+
_md5sum = "2b6c03434883a5c9897c13b5594dbd91"
|
|
15
|
+
_type = "kuavo_msgs/AprilTagDetectionArray"
|
|
16
|
+
_has_header = True # flag to mark the presence of a Header object
|
|
17
|
+
_full_text = """std_msgs/Header header
|
|
18
|
+
AprilTagDetection[] detections
|
|
19
|
+
|
|
20
|
+
================================================================================
|
|
21
|
+
MSG: std_msgs/Header
|
|
22
|
+
# Standard metadata for higher-level stamped data types.
|
|
23
|
+
# This is generally used to communicate timestamped data
|
|
24
|
+
# in a particular coordinate frame.
|
|
25
|
+
#
|
|
26
|
+
# sequence ID: consecutively increasing ID
|
|
27
|
+
uint32 seq
|
|
28
|
+
#Two-integer timestamp that is expressed as:
|
|
29
|
+
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
|
|
30
|
+
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
|
|
31
|
+
# time-handling sugar is provided by the client library
|
|
32
|
+
time stamp
|
|
33
|
+
#Frame this data is associated with
|
|
34
|
+
string frame_id
|
|
35
|
+
|
|
36
|
+
================================================================================
|
|
37
|
+
MSG: kuavo_msgs/AprilTagDetection
|
|
38
|
+
# Tag ID(s). If a standalone tag, this is a vector of size 1. If a tag bundle,
|
|
39
|
+
# this is a vector containing the IDs of each tag in the bundle.
|
|
40
|
+
int32[] id
|
|
41
|
+
|
|
42
|
+
# Tag size(s). If a standalone tag, this is a vector of size 1. If a tag bundle,
|
|
43
|
+
# this is a vector containing the sizes of each tag in the bundle, in the same
|
|
44
|
+
# order as the IDs above.
|
|
45
|
+
float64[] size
|
|
46
|
+
|
|
47
|
+
# Pose in the camera frame, obtained from homography transform. If a standalone
|
|
48
|
+
# tag, the homography is from the four tag corners. If a tag bundle, the
|
|
49
|
+
# homography is from at least the four corners of one member tag and at most the
|
|
50
|
+
# four corners of all member tags.
|
|
51
|
+
geometry_msgs/PoseWithCovarianceStamped pose
|
|
52
|
+
================================================================================
|
|
53
|
+
MSG: geometry_msgs/PoseWithCovarianceStamped
|
|
54
|
+
# This expresses an estimated pose with a reference coordinate frame and timestamp
|
|
55
|
+
|
|
56
|
+
Header header
|
|
57
|
+
PoseWithCovariance pose
|
|
58
|
+
|
|
59
|
+
================================================================================
|
|
60
|
+
MSG: geometry_msgs/PoseWithCovariance
|
|
61
|
+
# This represents a pose in free space with uncertainty.
|
|
62
|
+
|
|
63
|
+
Pose pose
|
|
64
|
+
|
|
65
|
+
# Row-major representation of the 6x6 covariance matrix
|
|
66
|
+
# The orientation parameters use a fixed-axis representation.
|
|
67
|
+
# In order, the parameters are:
|
|
68
|
+
# (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
|
|
69
|
+
float64[36] covariance
|
|
70
|
+
|
|
71
|
+
================================================================================
|
|
72
|
+
MSG: geometry_msgs/Pose
|
|
73
|
+
# A representation of pose in free space, composed of position and orientation.
|
|
74
|
+
Point position
|
|
75
|
+
Quaternion orientation
|
|
76
|
+
|
|
77
|
+
================================================================================
|
|
78
|
+
MSG: geometry_msgs/Point
|
|
79
|
+
# This contains the position of a point in free space
|
|
80
|
+
float64 x
|
|
81
|
+
float64 y
|
|
82
|
+
float64 z
|
|
83
|
+
|
|
84
|
+
================================================================================
|
|
85
|
+
MSG: geometry_msgs/Quaternion
|
|
86
|
+
# This represents an orientation in free space in quaternion form.
|
|
87
|
+
|
|
88
|
+
float64 x
|
|
89
|
+
float64 y
|
|
90
|
+
float64 z
|
|
91
|
+
float64 w
|
|
92
|
+
"""
|
|
93
|
+
__slots__ = ['header','detections']
|
|
94
|
+
_slot_types = ['std_msgs/Header','kuavo_msgs/AprilTagDetection[]']
|
|
95
|
+
|
|
96
|
+
def __init__(self, *args, **kwds):
|
|
97
|
+
"""
|
|
98
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
99
|
+
set to None will be assigned a default value. The recommend
|
|
100
|
+
use is keyword arguments as this is more robust to future message
|
|
101
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
102
|
+
|
|
103
|
+
The available fields are:
|
|
104
|
+
header,detections
|
|
105
|
+
|
|
106
|
+
:param args: complete set of field values, in .msg order
|
|
107
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
108
|
+
to set specific fields.
|
|
109
|
+
"""
|
|
110
|
+
if args or kwds:
|
|
111
|
+
super(AprilTagDetectionArray, self).__init__(*args, **kwds)
|
|
112
|
+
# message fields cannot be None, assign default values for those that are
|
|
113
|
+
if self.header is None:
|
|
114
|
+
self.header = std_msgs.msg.Header()
|
|
115
|
+
if self.detections is None:
|
|
116
|
+
self.detections = []
|
|
117
|
+
else:
|
|
118
|
+
self.header = std_msgs.msg.Header()
|
|
119
|
+
self.detections = []
|
|
120
|
+
|
|
121
|
+
def _get_types(self):
|
|
122
|
+
"""
|
|
123
|
+
internal API method
|
|
124
|
+
"""
|
|
125
|
+
return self._slot_types
|
|
126
|
+
|
|
127
|
+
def serialize(self, buff):
|
|
128
|
+
"""
|
|
129
|
+
serialize message into buffer
|
|
130
|
+
:param buff: buffer, ``StringIO``
|
|
131
|
+
"""
|
|
132
|
+
try:
|
|
133
|
+
_x = self
|
|
134
|
+
buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
|
|
135
|
+
_x = self.header.frame_id
|
|
136
|
+
length = len(_x)
|
|
137
|
+
if python3 or type(_x) == unicode:
|
|
138
|
+
_x = _x.encode('utf-8')
|
|
139
|
+
length = len(_x)
|
|
140
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
141
|
+
length = len(self.detections)
|
|
142
|
+
buff.write(_struct_I.pack(length))
|
|
143
|
+
for val1 in self.detections:
|
|
144
|
+
length = len(val1.id)
|
|
145
|
+
buff.write(_struct_I.pack(length))
|
|
146
|
+
pattern = '<%si'%length
|
|
147
|
+
buff.write(struct.Struct(pattern).pack(*val1.id))
|
|
148
|
+
length = len(val1.size)
|
|
149
|
+
buff.write(_struct_I.pack(length))
|
|
150
|
+
pattern = '<%sd'%length
|
|
151
|
+
buff.write(struct.Struct(pattern).pack(*val1.size))
|
|
152
|
+
_v1 = val1.pose
|
|
153
|
+
_v2 = _v1.header
|
|
154
|
+
_x = _v2.seq
|
|
155
|
+
buff.write(_get_struct_I().pack(_x))
|
|
156
|
+
_v3 = _v2.stamp
|
|
157
|
+
_x = _v3
|
|
158
|
+
buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
|
|
159
|
+
_x = _v2.frame_id
|
|
160
|
+
length = len(_x)
|
|
161
|
+
if python3 or type(_x) == unicode:
|
|
162
|
+
_x = _x.encode('utf-8')
|
|
163
|
+
length = len(_x)
|
|
164
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
165
|
+
_v4 = _v1.pose
|
|
166
|
+
_v5 = _v4.pose
|
|
167
|
+
_v6 = _v5.position
|
|
168
|
+
_x = _v6
|
|
169
|
+
buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
|
|
170
|
+
_v7 = _v5.orientation
|
|
171
|
+
_x = _v7
|
|
172
|
+
buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
|
|
173
|
+
buff.write(_get_struct_36d().pack(*_v4.covariance))
|
|
174
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
175
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
176
|
+
|
|
177
|
+
def deserialize(self, str):
|
|
178
|
+
"""
|
|
179
|
+
unpack serialized message in str into this message instance
|
|
180
|
+
:param str: byte array of serialized message, ``str``
|
|
181
|
+
"""
|
|
182
|
+
if python3:
|
|
183
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
184
|
+
try:
|
|
185
|
+
if self.header is None:
|
|
186
|
+
self.header = std_msgs.msg.Header()
|
|
187
|
+
if self.detections is None:
|
|
188
|
+
self.detections = None
|
|
189
|
+
end = 0
|
|
190
|
+
_x = self
|
|
191
|
+
start = end
|
|
192
|
+
end += 12
|
|
193
|
+
(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
|
|
194
|
+
start = end
|
|
195
|
+
end += 4
|
|
196
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
197
|
+
start = end
|
|
198
|
+
end += length
|
|
199
|
+
if python3:
|
|
200
|
+
self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
201
|
+
else:
|
|
202
|
+
self.header.frame_id = str[start:end]
|
|
203
|
+
start = end
|
|
204
|
+
end += 4
|
|
205
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
206
|
+
self.detections = []
|
|
207
|
+
for i in range(0, length):
|
|
208
|
+
val1 = kuavo_msgs.msg.AprilTagDetection()
|
|
209
|
+
start = end
|
|
210
|
+
end += 4
|
|
211
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
212
|
+
pattern = '<%si'%length
|
|
213
|
+
start = end
|
|
214
|
+
s = struct.Struct(pattern)
|
|
215
|
+
end += s.size
|
|
216
|
+
val1.id = s.unpack(str[start:end])
|
|
217
|
+
start = end
|
|
218
|
+
end += 4
|
|
219
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
220
|
+
pattern = '<%sd'%length
|
|
221
|
+
start = end
|
|
222
|
+
s = struct.Struct(pattern)
|
|
223
|
+
end += s.size
|
|
224
|
+
val1.size = s.unpack(str[start:end])
|
|
225
|
+
_v8 = val1.pose
|
|
226
|
+
_v9 = _v8.header
|
|
227
|
+
start = end
|
|
228
|
+
end += 4
|
|
229
|
+
(_v9.seq,) = _get_struct_I().unpack(str[start:end])
|
|
230
|
+
_v10 = _v9.stamp
|
|
231
|
+
_x = _v10
|
|
232
|
+
start = end
|
|
233
|
+
end += 8
|
|
234
|
+
(_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
|
|
235
|
+
start = end
|
|
236
|
+
end += 4
|
|
237
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
238
|
+
start = end
|
|
239
|
+
end += length
|
|
240
|
+
if python3:
|
|
241
|
+
_v9.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
242
|
+
else:
|
|
243
|
+
_v9.frame_id = str[start:end]
|
|
244
|
+
_v11 = _v8.pose
|
|
245
|
+
_v12 = _v11.pose
|
|
246
|
+
_v13 = _v12.position
|
|
247
|
+
_x = _v13
|
|
248
|
+
start = end
|
|
249
|
+
end += 24
|
|
250
|
+
(_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
|
|
251
|
+
_v14 = _v12.orientation
|
|
252
|
+
_x = _v14
|
|
253
|
+
start = end
|
|
254
|
+
end += 32
|
|
255
|
+
(_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
|
|
256
|
+
start = end
|
|
257
|
+
end += 288
|
|
258
|
+
_v11.covariance = _get_struct_36d().unpack(str[start:end])
|
|
259
|
+
self.detections.append(val1)
|
|
260
|
+
return self
|
|
261
|
+
except struct.error as e:
|
|
262
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
def serialize_numpy(self, buff, numpy):
|
|
266
|
+
"""
|
|
267
|
+
serialize message with numpy array types into buffer
|
|
268
|
+
:param buff: buffer, ``StringIO``
|
|
269
|
+
:param numpy: numpy python module
|
|
270
|
+
"""
|
|
271
|
+
try:
|
|
272
|
+
_x = self
|
|
273
|
+
buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
|
|
274
|
+
_x = self.header.frame_id
|
|
275
|
+
length = len(_x)
|
|
276
|
+
if python3 or type(_x) == unicode:
|
|
277
|
+
_x = _x.encode('utf-8')
|
|
278
|
+
length = len(_x)
|
|
279
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
280
|
+
length = len(self.detections)
|
|
281
|
+
buff.write(_struct_I.pack(length))
|
|
282
|
+
for val1 in self.detections:
|
|
283
|
+
length = len(val1.id)
|
|
284
|
+
buff.write(_struct_I.pack(length))
|
|
285
|
+
pattern = '<%si'%length
|
|
286
|
+
buff.write(val1.id.tostring())
|
|
287
|
+
length = len(val1.size)
|
|
288
|
+
buff.write(_struct_I.pack(length))
|
|
289
|
+
pattern = '<%sd'%length
|
|
290
|
+
buff.write(val1.size.tostring())
|
|
291
|
+
_v15 = val1.pose
|
|
292
|
+
_v16 = _v15.header
|
|
293
|
+
_x = _v16.seq
|
|
294
|
+
buff.write(_get_struct_I().pack(_x))
|
|
295
|
+
_v17 = _v16.stamp
|
|
296
|
+
_x = _v17
|
|
297
|
+
buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
|
|
298
|
+
_x = _v16.frame_id
|
|
299
|
+
length = len(_x)
|
|
300
|
+
if python3 or type(_x) == unicode:
|
|
301
|
+
_x = _x.encode('utf-8')
|
|
302
|
+
length = len(_x)
|
|
303
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
304
|
+
_v18 = _v15.pose
|
|
305
|
+
_v19 = _v18.pose
|
|
306
|
+
_v20 = _v19.position
|
|
307
|
+
_x = _v20
|
|
308
|
+
buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
|
|
309
|
+
_v21 = _v19.orientation
|
|
310
|
+
_x = _v21
|
|
311
|
+
buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
|
|
312
|
+
buff.write(_v18.covariance.tostring())
|
|
313
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
314
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
315
|
+
|
|
316
|
+
def deserialize_numpy(self, str, numpy):
|
|
317
|
+
"""
|
|
318
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
319
|
+
:param str: byte array of serialized message, ``str``
|
|
320
|
+
:param numpy: numpy python module
|
|
321
|
+
"""
|
|
322
|
+
if python3:
|
|
323
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
324
|
+
try:
|
|
325
|
+
if self.header is None:
|
|
326
|
+
self.header = std_msgs.msg.Header()
|
|
327
|
+
if self.detections is None:
|
|
328
|
+
self.detections = None
|
|
329
|
+
end = 0
|
|
330
|
+
_x = self
|
|
331
|
+
start = end
|
|
332
|
+
end += 12
|
|
333
|
+
(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
|
|
334
|
+
start = end
|
|
335
|
+
end += 4
|
|
336
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
337
|
+
start = end
|
|
338
|
+
end += length
|
|
339
|
+
if python3:
|
|
340
|
+
self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
341
|
+
else:
|
|
342
|
+
self.header.frame_id = str[start:end]
|
|
343
|
+
start = end
|
|
344
|
+
end += 4
|
|
345
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
346
|
+
self.detections = []
|
|
347
|
+
for i in range(0, length):
|
|
348
|
+
val1 = kuavo_msgs.msg.AprilTagDetection()
|
|
349
|
+
start = end
|
|
350
|
+
end += 4
|
|
351
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
352
|
+
pattern = '<%si'%length
|
|
353
|
+
start = end
|
|
354
|
+
s = struct.Struct(pattern)
|
|
355
|
+
end += s.size
|
|
356
|
+
val1.id = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
|
|
357
|
+
start = end
|
|
358
|
+
end += 4
|
|
359
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
360
|
+
pattern = '<%sd'%length
|
|
361
|
+
start = end
|
|
362
|
+
s = struct.Struct(pattern)
|
|
363
|
+
end += s.size
|
|
364
|
+
val1.size = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
365
|
+
_v22 = val1.pose
|
|
366
|
+
_v23 = _v22.header
|
|
367
|
+
start = end
|
|
368
|
+
end += 4
|
|
369
|
+
(_v23.seq,) = _get_struct_I().unpack(str[start:end])
|
|
370
|
+
_v24 = _v23.stamp
|
|
371
|
+
_x = _v24
|
|
372
|
+
start = end
|
|
373
|
+
end += 8
|
|
374
|
+
(_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
|
|
375
|
+
start = end
|
|
376
|
+
end += 4
|
|
377
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
378
|
+
start = end
|
|
379
|
+
end += length
|
|
380
|
+
if python3:
|
|
381
|
+
_v23.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
382
|
+
else:
|
|
383
|
+
_v23.frame_id = str[start:end]
|
|
384
|
+
_v25 = _v22.pose
|
|
385
|
+
_v26 = _v25.pose
|
|
386
|
+
_v27 = _v26.position
|
|
387
|
+
_x = _v27
|
|
388
|
+
start = end
|
|
389
|
+
end += 24
|
|
390
|
+
(_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
|
|
391
|
+
_v28 = _v26.orientation
|
|
392
|
+
_x = _v28
|
|
393
|
+
start = end
|
|
394
|
+
end += 32
|
|
395
|
+
(_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
|
|
396
|
+
start = end
|
|
397
|
+
end += 288
|
|
398
|
+
_v25.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
|
|
399
|
+
self.detections.append(val1)
|
|
400
|
+
return self
|
|
401
|
+
except struct.error as e:
|
|
402
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
403
|
+
|
|
404
|
+
_struct_I = genpy.struct_I
|
|
405
|
+
def _get_struct_I():
|
|
406
|
+
global _struct_I
|
|
407
|
+
return _struct_I
|
|
408
|
+
_struct_2I = None
|
|
409
|
+
def _get_struct_2I():
|
|
410
|
+
global _struct_2I
|
|
411
|
+
if _struct_2I is None:
|
|
412
|
+
_struct_2I = struct.Struct("<2I")
|
|
413
|
+
return _struct_2I
|
|
414
|
+
_struct_36d = None
|
|
415
|
+
def _get_struct_36d():
|
|
416
|
+
global _struct_36d
|
|
417
|
+
if _struct_36d is None:
|
|
418
|
+
_struct_36d = struct.Struct("<36d")
|
|
419
|
+
return _struct_36d
|
|
420
|
+
_struct_3I = None
|
|
421
|
+
def _get_struct_3I():
|
|
422
|
+
global _struct_3I
|
|
423
|
+
if _struct_3I is None:
|
|
424
|
+
_struct_3I = struct.Struct("<3I")
|
|
425
|
+
return _struct_3I
|
|
426
|
+
_struct_3d = None
|
|
427
|
+
def _get_struct_3d():
|
|
428
|
+
global _struct_3d
|
|
429
|
+
if _struct_3d is None:
|
|
430
|
+
_struct_3d = struct.Struct("<3d")
|
|
431
|
+
return _struct_3d
|
|
432
|
+
_struct_4d = None
|
|
433
|
+
def _get_struct_4d():
|
|
434
|
+
global _struct_4d
|
|
435
|
+
if _struct_4d is None:
|
|
436
|
+
_struct_4d = struct.Struct("<4d")
|
|
437
|
+
return _struct_4d
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/AudioReceiverData.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 AudioReceiverData(genpy.Message):
|
|
11
|
+
_md5sum = "f43a8e1b362b75baa741461b46adc7e0"
|
|
12
|
+
_type = "kuavo_msgs/AudioReceiverData"
|
|
13
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
14
|
+
_full_text = """uint8[] data"""
|
|
15
|
+
__slots__ = ['data']
|
|
16
|
+
_slot_types = ['uint8[]']
|
|
17
|
+
|
|
18
|
+
def __init__(self, *args, **kwds):
|
|
19
|
+
"""
|
|
20
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
21
|
+
set to None will be assigned a default value. The recommend
|
|
22
|
+
use is keyword arguments as this is more robust to future message
|
|
23
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
24
|
+
|
|
25
|
+
The available fields are:
|
|
26
|
+
data
|
|
27
|
+
|
|
28
|
+
:param args: complete set of field values, in .msg order
|
|
29
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
30
|
+
to set specific fields.
|
|
31
|
+
"""
|
|
32
|
+
if args or kwds:
|
|
33
|
+
super(AudioReceiverData, self).__init__(*args, **kwds)
|
|
34
|
+
# message fields cannot be None, assign default values for those that are
|
|
35
|
+
if self.data is None:
|
|
36
|
+
self.data = b''
|
|
37
|
+
else:
|
|
38
|
+
self.data = b''
|
|
39
|
+
|
|
40
|
+
def _get_types(self):
|
|
41
|
+
"""
|
|
42
|
+
internal API method
|
|
43
|
+
"""
|
|
44
|
+
return self._slot_types
|
|
45
|
+
|
|
46
|
+
def serialize(self, buff):
|
|
47
|
+
"""
|
|
48
|
+
serialize message into buffer
|
|
49
|
+
:param buff: buffer, ``StringIO``
|
|
50
|
+
"""
|
|
51
|
+
try:
|
|
52
|
+
_x = self.data
|
|
53
|
+
length = len(_x)
|
|
54
|
+
# - if encoded as a list instead, serialize as bytes instead of string
|
|
55
|
+
if type(_x) in [list, tuple]:
|
|
56
|
+
buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
|
|
57
|
+
else:
|
|
58
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
59
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
60
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
61
|
+
|
|
62
|
+
def deserialize(self, str):
|
|
63
|
+
"""
|
|
64
|
+
unpack serialized message in str into this message instance
|
|
65
|
+
:param str: byte array of serialized message, ``str``
|
|
66
|
+
"""
|
|
67
|
+
if python3:
|
|
68
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
69
|
+
try:
|
|
70
|
+
end = 0
|
|
71
|
+
start = end
|
|
72
|
+
end += 4
|
|
73
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
74
|
+
start = end
|
|
75
|
+
end += length
|
|
76
|
+
self.data = 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
|
+
_x = self.data
|
|
90
|
+
length = len(_x)
|
|
91
|
+
# - if encoded as a list instead, serialize as bytes instead of string
|
|
92
|
+
if type(_x) in [list, tuple]:
|
|
93
|
+
buff.write(struct.Struct('<I%sB'%length).pack(length, *_x))
|
|
94
|
+
else:
|
|
95
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
96
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
97
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
98
|
+
|
|
99
|
+
def deserialize_numpy(self, str, numpy):
|
|
100
|
+
"""
|
|
101
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
102
|
+
:param str: byte array of serialized message, ``str``
|
|
103
|
+
:param numpy: numpy python module
|
|
104
|
+
"""
|
|
105
|
+
if python3:
|
|
106
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
107
|
+
try:
|
|
108
|
+
end = 0
|
|
109
|
+
start = end
|
|
110
|
+
end += 4
|
|
111
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
112
|
+
start = end
|
|
113
|
+
end += length
|
|
114
|
+
self.data = str[start:end]
|
|
115
|
+
return self
|
|
116
|
+
except struct.error as e:
|
|
117
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
118
|
+
|
|
119
|
+
_struct_I = genpy.struct_I
|
|
120
|
+
def _get_struct_I():
|
|
121
|
+
global _struct_I
|
|
122
|
+
return _struct_I
|