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,394 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/SetInitialPoseRequest.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 std_msgs.msg
|
|
11
|
+
|
|
12
|
+
class SetInitialPoseRequest(genpy.Message):
|
|
13
|
+
_md5sum = "dffe26c7a7fc1afbac8d0dc3f208f368"
|
|
14
|
+
_type = "kuavo_msgs/SetInitialPoseRequest"
|
|
15
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
16
|
+
_full_text = """geometry_msgs/PoseWithCovarianceStamped initial_pose
|
|
17
|
+
|
|
18
|
+
================================================================================
|
|
19
|
+
MSG: geometry_msgs/PoseWithCovarianceStamped
|
|
20
|
+
# This expresses an estimated pose with a reference coordinate frame and timestamp
|
|
21
|
+
|
|
22
|
+
Header header
|
|
23
|
+
PoseWithCovariance pose
|
|
24
|
+
|
|
25
|
+
================================================================================
|
|
26
|
+
MSG: std_msgs/Header
|
|
27
|
+
# Standard metadata for higher-level stamped data types.
|
|
28
|
+
# This is generally used to communicate timestamped data
|
|
29
|
+
# in a particular coordinate frame.
|
|
30
|
+
#
|
|
31
|
+
# sequence ID: consecutively increasing ID
|
|
32
|
+
uint32 seq
|
|
33
|
+
#Two-integer timestamp that is expressed as:
|
|
34
|
+
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
|
|
35
|
+
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
|
|
36
|
+
# time-handling sugar is provided by the client library
|
|
37
|
+
time stamp
|
|
38
|
+
#Frame this data is associated with
|
|
39
|
+
string frame_id
|
|
40
|
+
|
|
41
|
+
================================================================================
|
|
42
|
+
MSG: geometry_msgs/PoseWithCovariance
|
|
43
|
+
# This represents a pose in free space with uncertainty.
|
|
44
|
+
|
|
45
|
+
Pose pose
|
|
46
|
+
|
|
47
|
+
# Row-major representation of the 6x6 covariance matrix
|
|
48
|
+
# The orientation parameters use a fixed-axis representation.
|
|
49
|
+
# In order, the parameters are:
|
|
50
|
+
# (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
|
|
51
|
+
float64[36] covariance
|
|
52
|
+
|
|
53
|
+
================================================================================
|
|
54
|
+
MSG: geometry_msgs/Pose
|
|
55
|
+
# A representation of pose in free space, composed of position and orientation.
|
|
56
|
+
Point position
|
|
57
|
+
Quaternion orientation
|
|
58
|
+
|
|
59
|
+
================================================================================
|
|
60
|
+
MSG: geometry_msgs/Point
|
|
61
|
+
# This contains the position of a point in free space
|
|
62
|
+
float64 x
|
|
63
|
+
float64 y
|
|
64
|
+
float64 z
|
|
65
|
+
|
|
66
|
+
================================================================================
|
|
67
|
+
MSG: geometry_msgs/Quaternion
|
|
68
|
+
# This represents an orientation in free space in quaternion form.
|
|
69
|
+
|
|
70
|
+
float64 x
|
|
71
|
+
float64 y
|
|
72
|
+
float64 z
|
|
73
|
+
float64 w
|
|
74
|
+
"""
|
|
75
|
+
__slots__ = ['initial_pose']
|
|
76
|
+
_slot_types = ['geometry_msgs/PoseWithCovarianceStamped']
|
|
77
|
+
|
|
78
|
+
def __init__(self, *args, **kwds):
|
|
79
|
+
"""
|
|
80
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
81
|
+
set to None will be assigned a default value. The recommend
|
|
82
|
+
use is keyword arguments as this is more robust to future message
|
|
83
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
84
|
+
|
|
85
|
+
The available fields are:
|
|
86
|
+
initial_pose
|
|
87
|
+
|
|
88
|
+
:param args: complete set of field values, in .msg order
|
|
89
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
90
|
+
to set specific fields.
|
|
91
|
+
"""
|
|
92
|
+
if args or kwds:
|
|
93
|
+
super(SetInitialPoseRequest, self).__init__(*args, **kwds)
|
|
94
|
+
# message fields cannot be None, assign default values for those that are
|
|
95
|
+
if self.initial_pose is None:
|
|
96
|
+
self.initial_pose = geometry_msgs.msg.PoseWithCovarianceStamped()
|
|
97
|
+
else:
|
|
98
|
+
self.initial_pose = geometry_msgs.msg.PoseWithCovarianceStamped()
|
|
99
|
+
|
|
100
|
+
def _get_types(self):
|
|
101
|
+
"""
|
|
102
|
+
internal API method
|
|
103
|
+
"""
|
|
104
|
+
return self._slot_types
|
|
105
|
+
|
|
106
|
+
def serialize(self, buff):
|
|
107
|
+
"""
|
|
108
|
+
serialize message into buffer
|
|
109
|
+
:param buff: buffer, ``StringIO``
|
|
110
|
+
"""
|
|
111
|
+
try:
|
|
112
|
+
_x = self
|
|
113
|
+
buff.write(_get_struct_3I().pack(_x.initial_pose.header.seq, _x.initial_pose.header.stamp.secs, _x.initial_pose.header.stamp.nsecs))
|
|
114
|
+
_x = self.initial_pose.header.frame_id
|
|
115
|
+
length = len(_x)
|
|
116
|
+
if python3 or type(_x) == unicode:
|
|
117
|
+
_x = _x.encode('utf-8')
|
|
118
|
+
length = len(_x)
|
|
119
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
120
|
+
_x = self
|
|
121
|
+
buff.write(_get_struct_7d().pack(_x.initial_pose.pose.pose.position.x, _x.initial_pose.pose.pose.position.y, _x.initial_pose.pose.pose.position.z, _x.initial_pose.pose.pose.orientation.x, _x.initial_pose.pose.pose.orientation.y, _x.initial_pose.pose.pose.orientation.z, _x.initial_pose.pose.pose.orientation.w))
|
|
122
|
+
buff.write(_get_struct_36d().pack(*self.initial_pose.pose.covariance))
|
|
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(self, str):
|
|
127
|
+
"""
|
|
128
|
+
unpack serialized message in str into this message instance
|
|
129
|
+
:param str: byte array of serialized message, ``str``
|
|
130
|
+
"""
|
|
131
|
+
if python3:
|
|
132
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
133
|
+
try:
|
|
134
|
+
if self.initial_pose is None:
|
|
135
|
+
self.initial_pose = geometry_msgs.msg.PoseWithCovarianceStamped()
|
|
136
|
+
end = 0
|
|
137
|
+
_x = self
|
|
138
|
+
start = end
|
|
139
|
+
end += 12
|
|
140
|
+
(_x.initial_pose.header.seq, _x.initial_pose.header.stamp.secs, _x.initial_pose.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
|
|
141
|
+
start = end
|
|
142
|
+
end += 4
|
|
143
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
144
|
+
start = end
|
|
145
|
+
end += length
|
|
146
|
+
if python3:
|
|
147
|
+
self.initial_pose.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
148
|
+
else:
|
|
149
|
+
self.initial_pose.header.frame_id = str[start:end]
|
|
150
|
+
_x = self
|
|
151
|
+
start = end
|
|
152
|
+
end += 56
|
|
153
|
+
(_x.initial_pose.pose.pose.position.x, _x.initial_pose.pose.pose.position.y, _x.initial_pose.pose.pose.position.z, _x.initial_pose.pose.pose.orientation.x, _x.initial_pose.pose.pose.orientation.y, _x.initial_pose.pose.pose.orientation.z, _x.initial_pose.pose.pose.orientation.w,) = _get_struct_7d().unpack(str[start:end])
|
|
154
|
+
start = end
|
|
155
|
+
end += 288
|
|
156
|
+
self.initial_pose.pose.covariance = _get_struct_36d().unpack(str[start:end])
|
|
157
|
+
return self
|
|
158
|
+
except struct.error as e:
|
|
159
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
def serialize_numpy(self, buff, numpy):
|
|
163
|
+
"""
|
|
164
|
+
serialize message with numpy array types into buffer
|
|
165
|
+
:param buff: buffer, ``StringIO``
|
|
166
|
+
:param numpy: numpy python module
|
|
167
|
+
"""
|
|
168
|
+
try:
|
|
169
|
+
_x = self
|
|
170
|
+
buff.write(_get_struct_3I().pack(_x.initial_pose.header.seq, _x.initial_pose.header.stamp.secs, _x.initial_pose.header.stamp.nsecs))
|
|
171
|
+
_x = self.initial_pose.header.frame_id
|
|
172
|
+
length = len(_x)
|
|
173
|
+
if python3 or type(_x) == unicode:
|
|
174
|
+
_x = _x.encode('utf-8')
|
|
175
|
+
length = len(_x)
|
|
176
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
177
|
+
_x = self
|
|
178
|
+
buff.write(_get_struct_7d().pack(_x.initial_pose.pose.pose.position.x, _x.initial_pose.pose.pose.position.y, _x.initial_pose.pose.pose.position.z, _x.initial_pose.pose.pose.orientation.x, _x.initial_pose.pose.pose.orientation.y, _x.initial_pose.pose.pose.orientation.z, _x.initial_pose.pose.pose.orientation.w))
|
|
179
|
+
buff.write(self.initial_pose.pose.covariance.tostring())
|
|
180
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
181
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
182
|
+
|
|
183
|
+
def deserialize_numpy(self, str, numpy):
|
|
184
|
+
"""
|
|
185
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
186
|
+
:param str: byte array of serialized message, ``str``
|
|
187
|
+
:param numpy: numpy python module
|
|
188
|
+
"""
|
|
189
|
+
if python3:
|
|
190
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
191
|
+
try:
|
|
192
|
+
if self.initial_pose is None:
|
|
193
|
+
self.initial_pose = geometry_msgs.msg.PoseWithCovarianceStamped()
|
|
194
|
+
end = 0
|
|
195
|
+
_x = self
|
|
196
|
+
start = end
|
|
197
|
+
end += 12
|
|
198
|
+
(_x.initial_pose.header.seq, _x.initial_pose.header.stamp.secs, _x.initial_pose.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
|
|
199
|
+
start = end
|
|
200
|
+
end += 4
|
|
201
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
202
|
+
start = end
|
|
203
|
+
end += length
|
|
204
|
+
if python3:
|
|
205
|
+
self.initial_pose.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
206
|
+
else:
|
|
207
|
+
self.initial_pose.header.frame_id = str[start:end]
|
|
208
|
+
_x = self
|
|
209
|
+
start = end
|
|
210
|
+
end += 56
|
|
211
|
+
(_x.initial_pose.pose.pose.position.x, _x.initial_pose.pose.pose.position.y, _x.initial_pose.pose.pose.position.z, _x.initial_pose.pose.pose.orientation.x, _x.initial_pose.pose.pose.orientation.y, _x.initial_pose.pose.pose.orientation.z, _x.initial_pose.pose.pose.orientation.w,) = _get_struct_7d().unpack(str[start:end])
|
|
212
|
+
start = end
|
|
213
|
+
end += 288
|
|
214
|
+
self.initial_pose.pose.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
|
|
215
|
+
return self
|
|
216
|
+
except struct.error as e:
|
|
217
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
218
|
+
|
|
219
|
+
_struct_I = genpy.struct_I
|
|
220
|
+
def _get_struct_I():
|
|
221
|
+
global _struct_I
|
|
222
|
+
return _struct_I
|
|
223
|
+
_struct_36d = None
|
|
224
|
+
def _get_struct_36d():
|
|
225
|
+
global _struct_36d
|
|
226
|
+
if _struct_36d is None:
|
|
227
|
+
_struct_36d = struct.Struct("<36d")
|
|
228
|
+
return _struct_36d
|
|
229
|
+
_struct_3I = None
|
|
230
|
+
def _get_struct_3I():
|
|
231
|
+
global _struct_3I
|
|
232
|
+
if _struct_3I is None:
|
|
233
|
+
_struct_3I = struct.Struct("<3I")
|
|
234
|
+
return _struct_3I
|
|
235
|
+
_struct_7d = None
|
|
236
|
+
def _get_struct_7d():
|
|
237
|
+
global _struct_7d
|
|
238
|
+
if _struct_7d is None:
|
|
239
|
+
_struct_7d = struct.Struct("<7d")
|
|
240
|
+
return _struct_7d
|
|
241
|
+
# This Python file uses the following encoding: utf-8
|
|
242
|
+
"""autogenerated by genpy from kuavo_msgs/SetInitialPoseResponse.msg. Do not edit."""
|
|
243
|
+
import codecs
|
|
244
|
+
import sys
|
|
245
|
+
python3 = True if sys.hexversion > 0x03000000 else False
|
|
246
|
+
import genpy
|
|
247
|
+
import struct
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class SetInitialPoseResponse(genpy.Message):
|
|
251
|
+
_md5sum = "937c9679a518e3a18d831e57125ea522"
|
|
252
|
+
_type = "kuavo_msgs/SetInitialPoseResponse"
|
|
253
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
254
|
+
_full_text = """bool success
|
|
255
|
+
string message
|
|
256
|
+
"""
|
|
257
|
+
__slots__ = ['success','message']
|
|
258
|
+
_slot_types = ['bool','string']
|
|
259
|
+
|
|
260
|
+
def __init__(self, *args, **kwds):
|
|
261
|
+
"""
|
|
262
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
263
|
+
set to None will be assigned a default value. The recommend
|
|
264
|
+
use is keyword arguments as this is more robust to future message
|
|
265
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
266
|
+
|
|
267
|
+
The available fields are:
|
|
268
|
+
success,message
|
|
269
|
+
|
|
270
|
+
:param args: complete set of field values, in .msg order
|
|
271
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
272
|
+
to set specific fields.
|
|
273
|
+
"""
|
|
274
|
+
if args or kwds:
|
|
275
|
+
super(SetInitialPoseResponse, self).__init__(*args, **kwds)
|
|
276
|
+
# message fields cannot be None, assign default values for those that are
|
|
277
|
+
if self.success is None:
|
|
278
|
+
self.success = False
|
|
279
|
+
if self.message is None:
|
|
280
|
+
self.message = ''
|
|
281
|
+
else:
|
|
282
|
+
self.success = False
|
|
283
|
+
self.message = ''
|
|
284
|
+
|
|
285
|
+
def _get_types(self):
|
|
286
|
+
"""
|
|
287
|
+
internal API method
|
|
288
|
+
"""
|
|
289
|
+
return self._slot_types
|
|
290
|
+
|
|
291
|
+
def serialize(self, buff):
|
|
292
|
+
"""
|
|
293
|
+
serialize message into buffer
|
|
294
|
+
:param buff: buffer, ``StringIO``
|
|
295
|
+
"""
|
|
296
|
+
try:
|
|
297
|
+
_x = self.success
|
|
298
|
+
buff.write(_get_struct_B().pack(_x))
|
|
299
|
+
_x = self.message
|
|
300
|
+
length = len(_x)
|
|
301
|
+
if python3 or type(_x) == unicode:
|
|
302
|
+
_x = _x.encode('utf-8')
|
|
303
|
+
length = len(_x)
|
|
304
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
305
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
306
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
307
|
+
|
|
308
|
+
def deserialize(self, str):
|
|
309
|
+
"""
|
|
310
|
+
unpack serialized message in str into this message instance
|
|
311
|
+
:param str: byte array of serialized message, ``str``
|
|
312
|
+
"""
|
|
313
|
+
if python3:
|
|
314
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
315
|
+
try:
|
|
316
|
+
end = 0
|
|
317
|
+
start = end
|
|
318
|
+
end += 1
|
|
319
|
+
(self.success,) = _get_struct_B().unpack(str[start:end])
|
|
320
|
+
self.success = bool(self.success)
|
|
321
|
+
start = end
|
|
322
|
+
end += 4
|
|
323
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
324
|
+
start = end
|
|
325
|
+
end += length
|
|
326
|
+
if python3:
|
|
327
|
+
self.message = str[start:end].decode('utf-8', 'rosmsg')
|
|
328
|
+
else:
|
|
329
|
+
self.message = str[start:end]
|
|
330
|
+
return self
|
|
331
|
+
except struct.error as e:
|
|
332
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
def serialize_numpy(self, buff, numpy):
|
|
336
|
+
"""
|
|
337
|
+
serialize message with numpy array types into buffer
|
|
338
|
+
:param buff: buffer, ``StringIO``
|
|
339
|
+
:param numpy: numpy python module
|
|
340
|
+
"""
|
|
341
|
+
try:
|
|
342
|
+
_x = self.success
|
|
343
|
+
buff.write(_get_struct_B().pack(_x))
|
|
344
|
+
_x = self.message
|
|
345
|
+
length = len(_x)
|
|
346
|
+
if python3 or type(_x) == unicode:
|
|
347
|
+
_x = _x.encode('utf-8')
|
|
348
|
+
length = len(_x)
|
|
349
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
350
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
351
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
352
|
+
|
|
353
|
+
def deserialize_numpy(self, str, numpy):
|
|
354
|
+
"""
|
|
355
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
356
|
+
:param str: byte array of serialized message, ``str``
|
|
357
|
+
:param numpy: numpy python module
|
|
358
|
+
"""
|
|
359
|
+
if python3:
|
|
360
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
361
|
+
try:
|
|
362
|
+
end = 0
|
|
363
|
+
start = end
|
|
364
|
+
end += 1
|
|
365
|
+
(self.success,) = _get_struct_B().unpack(str[start:end])
|
|
366
|
+
self.success = bool(self.success)
|
|
367
|
+
start = end
|
|
368
|
+
end += 4
|
|
369
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
370
|
+
start = end
|
|
371
|
+
end += length
|
|
372
|
+
if python3:
|
|
373
|
+
self.message = str[start:end].decode('utf-8', 'rosmsg')
|
|
374
|
+
else:
|
|
375
|
+
self.message = str[start:end]
|
|
376
|
+
return self
|
|
377
|
+
except struct.error as e:
|
|
378
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
379
|
+
|
|
380
|
+
_struct_I = genpy.struct_I
|
|
381
|
+
def _get_struct_I():
|
|
382
|
+
global _struct_I
|
|
383
|
+
return _struct_I
|
|
384
|
+
_struct_B = None
|
|
385
|
+
def _get_struct_B():
|
|
386
|
+
global _struct_B
|
|
387
|
+
if _struct_B is None:
|
|
388
|
+
_struct_B = struct.Struct("<B")
|
|
389
|
+
return _struct_B
|
|
390
|
+
class SetInitialPose(object):
|
|
391
|
+
_type = 'kuavo_msgs/SetInitialPose'
|
|
392
|
+
_md5sum = '98a523960b63e9314e253d909eed7c2a'
|
|
393
|
+
_request_class = SetInitialPoseRequest
|
|
394
|
+
_response_class = SetInitialPoseResponse
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/SetJoyTopicRequest.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 SetJoyTopicRequest(genpy.Message):
|
|
11
|
+
_md5sum = "b38cc2f19f45368c2db7867751ce95a9"
|
|
12
|
+
_type = "kuavo_msgs/SetJoyTopicRequest"
|
|
13
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
14
|
+
_full_text = """string topic_name # 新的Joy话题名称
|
|
15
|
+
"""
|
|
16
|
+
__slots__ = ['topic_name']
|
|
17
|
+
_slot_types = ['string']
|
|
18
|
+
|
|
19
|
+
def __init__(self, *args, **kwds):
|
|
20
|
+
"""
|
|
21
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
22
|
+
set to None will be assigned a default value. The recommend
|
|
23
|
+
use is keyword arguments as this is more robust to future message
|
|
24
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
25
|
+
|
|
26
|
+
The available fields are:
|
|
27
|
+
topic_name
|
|
28
|
+
|
|
29
|
+
:param args: complete set of field values, in .msg order
|
|
30
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
31
|
+
to set specific fields.
|
|
32
|
+
"""
|
|
33
|
+
if args or kwds:
|
|
34
|
+
super(SetJoyTopicRequest, self).__init__(*args, **kwds)
|
|
35
|
+
# message fields cannot be None, assign default values for those that are
|
|
36
|
+
if self.topic_name is None:
|
|
37
|
+
self.topic_name = ''
|
|
38
|
+
else:
|
|
39
|
+
self.topic_name = ''
|
|
40
|
+
|
|
41
|
+
def _get_types(self):
|
|
42
|
+
"""
|
|
43
|
+
internal API method
|
|
44
|
+
"""
|
|
45
|
+
return self._slot_types
|
|
46
|
+
|
|
47
|
+
def serialize(self, buff):
|
|
48
|
+
"""
|
|
49
|
+
serialize message into buffer
|
|
50
|
+
:param buff: buffer, ``StringIO``
|
|
51
|
+
"""
|
|
52
|
+
try:
|
|
53
|
+
_x = self.topic_name
|
|
54
|
+
length = len(_x)
|
|
55
|
+
if python3 or type(_x) == unicode:
|
|
56
|
+
_x = _x.encode('utf-8')
|
|
57
|
+
length = len(_x)
|
|
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
|
+
if python3:
|
|
77
|
+
self.topic_name = str[start:end].decode('utf-8', 'rosmsg')
|
|
78
|
+
else:
|
|
79
|
+
self.topic_name = str[start:end]
|
|
80
|
+
return self
|
|
81
|
+
except struct.error as e:
|
|
82
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def serialize_numpy(self, buff, numpy):
|
|
86
|
+
"""
|
|
87
|
+
serialize message with numpy array types into buffer
|
|
88
|
+
:param buff: buffer, ``StringIO``
|
|
89
|
+
:param numpy: numpy python module
|
|
90
|
+
"""
|
|
91
|
+
try:
|
|
92
|
+
_x = self.topic_name
|
|
93
|
+
length = len(_x)
|
|
94
|
+
if python3 or type(_x) == unicode:
|
|
95
|
+
_x = _x.encode('utf-8')
|
|
96
|
+
length = len(_x)
|
|
97
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
98
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
99
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
100
|
+
|
|
101
|
+
def deserialize_numpy(self, str, numpy):
|
|
102
|
+
"""
|
|
103
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
104
|
+
:param str: byte array of serialized message, ``str``
|
|
105
|
+
:param numpy: numpy python module
|
|
106
|
+
"""
|
|
107
|
+
if python3:
|
|
108
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
109
|
+
try:
|
|
110
|
+
end = 0
|
|
111
|
+
start = end
|
|
112
|
+
end += 4
|
|
113
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
114
|
+
start = end
|
|
115
|
+
end += length
|
|
116
|
+
if python3:
|
|
117
|
+
self.topic_name = str[start:end].decode('utf-8', 'rosmsg')
|
|
118
|
+
else:
|
|
119
|
+
self.topic_name = str[start:end]
|
|
120
|
+
return self
|
|
121
|
+
except struct.error as e:
|
|
122
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
123
|
+
|
|
124
|
+
_struct_I = genpy.struct_I
|
|
125
|
+
def _get_struct_I():
|
|
126
|
+
global _struct_I
|
|
127
|
+
return _struct_I
|
|
128
|
+
# This Python file uses the following encoding: utf-8
|
|
129
|
+
"""autogenerated by genpy from kuavo_msgs/SetJoyTopicResponse.msg. Do not edit."""
|
|
130
|
+
import codecs
|
|
131
|
+
import sys
|
|
132
|
+
python3 = True if sys.hexversion > 0x03000000 else False
|
|
133
|
+
import genpy
|
|
134
|
+
import struct
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
class SetJoyTopicResponse(genpy.Message):
|
|
138
|
+
_md5sum = "937c9679a518e3a18d831e57125ea522"
|
|
139
|
+
_type = "kuavo_msgs/SetJoyTopicResponse"
|
|
140
|
+
_has_header = False # flag to mark the presence of a Header object
|
|
141
|
+
_full_text = """bool success # 是否成功切换话题
|
|
142
|
+
string message # 详细信息
|
|
143
|
+
|
|
144
|
+
"""
|
|
145
|
+
__slots__ = ['success','message']
|
|
146
|
+
_slot_types = ['bool','string']
|
|
147
|
+
|
|
148
|
+
def __init__(self, *args, **kwds):
|
|
149
|
+
"""
|
|
150
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
151
|
+
set to None will be assigned a default value. The recommend
|
|
152
|
+
use is keyword arguments as this is more robust to future message
|
|
153
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
154
|
+
|
|
155
|
+
The available fields are:
|
|
156
|
+
success,message
|
|
157
|
+
|
|
158
|
+
:param args: complete set of field values, in .msg order
|
|
159
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
160
|
+
to set specific fields.
|
|
161
|
+
"""
|
|
162
|
+
if args or kwds:
|
|
163
|
+
super(SetJoyTopicResponse, self).__init__(*args, **kwds)
|
|
164
|
+
# message fields cannot be None, assign default values for those that are
|
|
165
|
+
if self.success is None:
|
|
166
|
+
self.success = False
|
|
167
|
+
if self.message is None:
|
|
168
|
+
self.message = ''
|
|
169
|
+
else:
|
|
170
|
+
self.success = False
|
|
171
|
+
self.message = ''
|
|
172
|
+
|
|
173
|
+
def _get_types(self):
|
|
174
|
+
"""
|
|
175
|
+
internal API method
|
|
176
|
+
"""
|
|
177
|
+
return self._slot_types
|
|
178
|
+
|
|
179
|
+
def serialize(self, buff):
|
|
180
|
+
"""
|
|
181
|
+
serialize message into buffer
|
|
182
|
+
:param buff: buffer, ``StringIO``
|
|
183
|
+
"""
|
|
184
|
+
try:
|
|
185
|
+
_x = self.success
|
|
186
|
+
buff.write(_get_struct_B().pack(_x))
|
|
187
|
+
_x = self.message
|
|
188
|
+
length = len(_x)
|
|
189
|
+
if python3 or type(_x) == unicode:
|
|
190
|
+
_x = _x.encode('utf-8')
|
|
191
|
+
length = len(_x)
|
|
192
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
193
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
194
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
195
|
+
|
|
196
|
+
def deserialize(self, str):
|
|
197
|
+
"""
|
|
198
|
+
unpack serialized message in str into this message instance
|
|
199
|
+
:param str: byte array of serialized message, ``str``
|
|
200
|
+
"""
|
|
201
|
+
if python3:
|
|
202
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
203
|
+
try:
|
|
204
|
+
end = 0
|
|
205
|
+
start = end
|
|
206
|
+
end += 1
|
|
207
|
+
(self.success,) = _get_struct_B().unpack(str[start:end])
|
|
208
|
+
self.success = bool(self.success)
|
|
209
|
+
start = end
|
|
210
|
+
end += 4
|
|
211
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
212
|
+
start = end
|
|
213
|
+
end += length
|
|
214
|
+
if python3:
|
|
215
|
+
self.message = str[start:end].decode('utf-8', 'rosmsg')
|
|
216
|
+
else:
|
|
217
|
+
self.message = str[start:end]
|
|
218
|
+
return self
|
|
219
|
+
except struct.error as e:
|
|
220
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def serialize_numpy(self, buff, numpy):
|
|
224
|
+
"""
|
|
225
|
+
serialize message with numpy array types into buffer
|
|
226
|
+
:param buff: buffer, ``StringIO``
|
|
227
|
+
:param numpy: numpy python module
|
|
228
|
+
"""
|
|
229
|
+
try:
|
|
230
|
+
_x = self.success
|
|
231
|
+
buff.write(_get_struct_B().pack(_x))
|
|
232
|
+
_x = self.message
|
|
233
|
+
length = len(_x)
|
|
234
|
+
if python3 or type(_x) == unicode:
|
|
235
|
+
_x = _x.encode('utf-8')
|
|
236
|
+
length = len(_x)
|
|
237
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
238
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
239
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
240
|
+
|
|
241
|
+
def deserialize_numpy(self, str, numpy):
|
|
242
|
+
"""
|
|
243
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
244
|
+
:param str: byte array of serialized message, ``str``
|
|
245
|
+
:param numpy: numpy python module
|
|
246
|
+
"""
|
|
247
|
+
if python3:
|
|
248
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
249
|
+
try:
|
|
250
|
+
end = 0
|
|
251
|
+
start = end
|
|
252
|
+
end += 1
|
|
253
|
+
(self.success,) = _get_struct_B().unpack(str[start:end])
|
|
254
|
+
self.success = bool(self.success)
|
|
255
|
+
start = end
|
|
256
|
+
end += 4
|
|
257
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
258
|
+
start = end
|
|
259
|
+
end += length
|
|
260
|
+
if python3:
|
|
261
|
+
self.message = str[start:end].decode('utf-8', 'rosmsg')
|
|
262
|
+
else:
|
|
263
|
+
self.message = str[start:end]
|
|
264
|
+
return self
|
|
265
|
+
except struct.error as e:
|
|
266
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
267
|
+
|
|
268
|
+
_struct_I = genpy.struct_I
|
|
269
|
+
def _get_struct_I():
|
|
270
|
+
global _struct_I
|
|
271
|
+
return _struct_I
|
|
272
|
+
_struct_B = None
|
|
273
|
+
def _get_struct_B():
|
|
274
|
+
global _struct_B
|
|
275
|
+
if _struct_B is None:
|
|
276
|
+
_struct_B = struct.Struct("<B")
|
|
277
|
+
return _struct_B
|
|
278
|
+
class SetJoyTopic(object):
|
|
279
|
+
_type = 'kuavo_msgs/SetJoyTopic'
|
|
280
|
+
_md5sum = 'cb13deef17f444c30700175c1a250230'
|
|
281
|
+
_request_class = SetJoyTopicRequest
|
|
282
|
+
_response_class = SetJoyTopicResponse
|