kuavo-humanoid-sdk 1.2.1b3319__20250917133850-py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kuavo-humanoid-sdk might be problematic. Click here for more details.
- kuavo_humanoid_sdk/__init__.py +6 -0
- kuavo_humanoid_sdk/common/logger.py +45 -0
- kuavo_humanoid_sdk/interfaces/__init__.py +4 -0
- kuavo_humanoid_sdk/interfaces/data_types.py +288 -0
- kuavo_humanoid_sdk/interfaces/end_effector.py +62 -0
- kuavo_humanoid_sdk/interfaces/robot.py +22 -0
- kuavo_humanoid_sdk/interfaces/robot_info.py +56 -0
- kuavo_humanoid_sdk/kuavo/__init__.py +16 -0
- kuavo_humanoid_sdk/kuavo/core/audio.py +32 -0
- kuavo_humanoid_sdk/kuavo/core/core.py +666 -0
- kuavo_humanoid_sdk/kuavo/core/dex_hand_control.py +114 -0
- kuavo_humanoid_sdk/kuavo/core/leju_claw_control.py +67 -0
- kuavo_humanoid_sdk/kuavo/core/llm_doubao.py +608 -0
- kuavo_humanoid_sdk/kuavo/core/microphone.py +192 -0
- kuavo_humanoid_sdk/kuavo/core/navigation.py +70 -0
- kuavo_humanoid_sdk/kuavo/core/ros/audio.py +110 -0
- kuavo_humanoid_sdk/kuavo/core/ros/camera.py +105 -0
- kuavo_humanoid_sdk/kuavo/core/ros/control.py +1524 -0
- kuavo_humanoid_sdk/kuavo/core/ros/microphone.py +38 -0
- kuavo_humanoid_sdk/kuavo/core/ros/navigation.py +217 -0
- kuavo_humanoid_sdk/kuavo/core/ros/observation.py +94 -0
- kuavo_humanoid_sdk/kuavo/core/ros/param.py +201 -0
- kuavo_humanoid_sdk/kuavo/core/ros/sat_utils.py +103 -0
- kuavo_humanoid_sdk/kuavo/core/ros/state.py +652 -0
- kuavo_humanoid_sdk/kuavo/core/ros/tools.py +220 -0
- kuavo_humanoid_sdk/kuavo/core/ros/vision.py +234 -0
- kuavo_humanoid_sdk/kuavo/core/ros_env.py +238 -0
- kuavo_humanoid_sdk/kuavo/core/sdk_deprecated.py +41 -0
- kuavo_humanoid_sdk/kuavo/demo_climbstair.py +249 -0
- kuavo_humanoid_sdk/kuavo/dexterous_hand.py +238 -0
- kuavo_humanoid_sdk/kuavo/leju_claw.py +235 -0
- kuavo_humanoid_sdk/kuavo/logger_client.py +80 -0
- kuavo_humanoid_sdk/kuavo/robot.py +561 -0
- kuavo_humanoid_sdk/kuavo/robot_arm.py +411 -0
- kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
- kuavo_humanoid_sdk/kuavo/robot_blockly.py +1154 -0
- kuavo_humanoid_sdk/kuavo/robot_climbstair.py +1607 -0
- kuavo_humanoid_sdk/kuavo/robot_head.py +95 -0
- kuavo_humanoid_sdk/kuavo/robot_info.py +134 -0
- kuavo_humanoid_sdk/kuavo/robot_microphone.py +19 -0
- kuavo_humanoid_sdk/kuavo/robot_navigation.py +135 -0
- kuavo_humanoid_sdk/kuavo/robot_observation.py +64 -0
- kuavo_humanoid_sdk/kuavo/robot_speech.py +24 -0
- kuavo_humanoid_sdk/kuavo/robot_state.py +310 -0
- kuavo_humanoid_sdk/kuavo/robot_tool.py +109 -0
- kuavo_humanoid_sdk/kuavo/robot_vision.py +81 -0
- kuavo_humanoid_sdk/kuavo_strategy/__init__.py +2 -0
- kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +1325 -0
- kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +106 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/common/data_type.py +340 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/common/events/base_event.py +215 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/common/robot_sdk.py +25 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/case.py +331 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/strategy.py +504 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/utils/logger_setup.py +40 -0
- kuavo_humanoid_sdk/kuavo_strategy_v2/utils/utils.py +88 -0
- kuavo_humanoid_sdk/msg/__init__.py +4 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetection.py +306 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetectionArray.py +437 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AudioReceiverData.py +122 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_FTsensorData.py +260 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_JoySticks.py +191 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_MmDetectionMsg.py +264 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TaskPoint.py +175 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +62 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armCollisionCheckInfo.py +160 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +161 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +171 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6D.py +123 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6DTargetTrajectories.py +320 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVision.py +136 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVisionArray.py +231 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses6D.py +149 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_kuavoModeSchedule.py +224 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfo.py +143 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfoList.py +220 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotBodyMatrices.py +332 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +655 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_tagDataArray.py +216 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +273 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +316 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_CreatePath.py +581 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetAllMaps.py +241 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetCurrentMap.py +225 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetTargetPartPoseInCamera.py +298 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_InitialPoseWithTaskPoint.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_LoadMap.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_NavigateToTaskPoint.py +281 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetInitialPose.py +394 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode.py +468 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode_free.py +289 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_TaskPointOperation.py +536 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +43 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_adjustZeroPoint.py +277 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +395 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPose6DTargetTrajectoriesSrv.py +426 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorZeroPoints.py +286 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +422 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
- kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +664 -0
- kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
- kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
- kuavo_humanoid_sdk-1.2.1b3319.dist-info/METADATA +297 -0
- kuavo_humanoid_sdk-1.2.1b3319.dist-info/RECORD +186 -0
- kuavo_humanoid_sdk-1.2.1b3319.dist-info/WHEEL +6 -0
- kuavo_humanoid_sdk-1.2.1b3319.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
# This Python file uses the following encoding: utf-8
|
|
2
|
+
"""autogenerated by genpy from kuavo_msgs/sensorsData.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 genpy
|
|
10
|
+
import geometry_msgs.msg
|
|
11
|
+
import kuavo_msgs.msg
|
|
12
|
+
import std_msgs.msg
|
|
13
|
+
|
|
14
|
+
class sensorsData(genpy.Message):
|
|
15
|
+
_md5sum = "f9f437eb06511eb4cb60f115760b94e5"
|
|
16
|
+
_type = "kuavo_msgs/sensorsData"
|
|
17
|
+
_has_header = True # flag to mark the presence of a Header object
|
|
18
|
+
_full_text = """std_msgs/Header header
|
|
19
|
+
time sensor_time
|
|
20
|
+
kuavo_msgs/jointData joint_data
|
|
21
|
+
kuavo_msgs/imuData imu_data
|
|
22
|
+
kuavo_msgs/endEffectorData end_effector_data
|
|
23
|
+
kuavo_msgs/FTsensorData FTsensor_data
|
|
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: kuavo_msgs/jointData
|
|
43
|
+
float64[] joint_q
|
|
44
|
+
float64[] joint_v
|
|
45
|
+
float64[] joint_vd
|
|
46
|
+
float64[] joint_torque
|
|
47
|
+
|
|
48
|
+
================================================================================
|
|
49
|
+
MSG: kuavo_msgs/imuData
|
|
50
|
+
geometry_msgs/Vector3 gyro #陀螺仪数据
|
|
51
|
+
geometry_msgs/Vector3 acc #加速计数据
|
|
52
|
+
geometry_msgs/Vector3 free_acc #无重力加速度数据
|
|
53
|
+
geometry_msgs/Quaternion quat #四元数数据
|
|
54
|
+
|
|
55
|
+
================================================================================
|
|
56
|
+
MSG: geometry_msgs/Vector3
|
|
57
|
+
# This represents a vector in free space.
|
|
58
|
+
# It is only meant to represent a direction. Therefore, it does not
|
|
59
|
+
# make sense to apply a translation to it (e.g., when applying a
|
|
60
|
+
# generic rigid transformation to a Vector3, tf2 will only apply the
|
|
61
|
+
# rotation). If you want your data to be translatable too, use the
|
|
62
|
+
# geometry_msgs/Point message instead.
|
|
63
|
+
|
|
64
|
+
float64 x
|
|
65
|
+
float64 y
|
|
66
|
+
float64 z
|
|
67
|
+
================================================================================
|
|
68
|
+
MSG: geometry_msgs/Quaternion
|
|
69
|
+
# This represents an orientation in free space in quaternion form.
|
|
70
|
+
|
|
71
|
+
float64 x
|
|
72
|
+
float64 y
|
|
73
|
+
float64 z
|
|
74
|
+
float64 w
|
|
75
|
+
|
|
76
|
+
================================================================================
|
|
77
|
+
MSG: kuavo_msgs/endEffectorData
|
|
78
|
+
string[] name
|
|
79
|
+
float64[] position
|
|
80
|
+
float64[] velocity
|
|
81
|
+
float64[] effort
|
|
82
|
+
|
|
83
|
+
================================================================================
|
|
84
|
+
MSG: kuavo_msgs/FTsensorData
|
|
85
|
+
float64[] Fx
|
|
86
|
+
float64[] Fy
|
|
87
|
+
float64[] Fz
|
|
88
|
+
float64[] Mx
|
|
89
|
+
float64[] My
|
|
90
|
+
float64[] Mz """
|
|
91
|
+
__slots__ = ['header','sensor_time','joint_data','imu_data','end_effector_data','FTsensor_data']
|
|
92
|
+
_slot_types = ['std_msgs/Header','time','kuavo_msgs/jointData','kuavo_msgs/imuData','kuavo_msgs/endEffectorData','kuavo_msgs/FTsensorData']
|
|
93
|
+
|
|
94
|
+
def __init__(self, *args, **kwds):
|
|
95
|
+
"""
|
|
96
|
+
Constructor. Any message fields that are implicitly/explicitly
|
|
97
|
+
set to None will be assigned a default value. The recommend
|
|
98
|
+
use is keyword arguments as this is more robust to future message
|
|
99
|
+
changes. You cannot mix in-order arguments and keyword arguments.
|
|
100
|
+
|
|
101
|
+
The available fields are:
|
|
102
|
+
header,sensor_time,joint_data,imu_data,end_effector_data,FTsensor_data
|
|
103
|
+
|
|
104
|
+
:param args: complete set of field values, in .msg order
|
|
105
|
+
:param kwds: use keyword arguments corresponding to message field names
|
|
106
|
+
to set specific fields.
|
|
107
|
+
"""
|
|
108
|
+
if args or kwds:
|
|
109
|
+
super(sensorsData, self).__init__(*args, **kwds)
|
|
110
|
+
# message fields cannot be None, assign default values for those that are
|
|
111
|
+
if self.header is None:
|
|
112
|
+
self.header = std_msgs.msg.Header()
|
|
113
|
+
if self.sensor_time is None:
|
|
114
|
+
self.sensor_time = genpy.Time()
|
|
115
|
+
if self.joint_data is None:
|
|
116
|
+
self.joint_data = kuavo_msgs.msg.jointData()
|
|
117
|
+
if self.imu_data is None:
|
|
118
|
+
self.imu_data = kuavo_msgs.msg.imuData()
|
|
119
|
+
if self.end_effector_data is None:
|
|
120
|
+
self.end_effector_data = kuavo_msgs.msg.endEffectorData()
|
|
121
|
+
if self.FTsensor_data is None:
|
|
122
|
+
self.FTsensor_data = kuavo_msgs.msg.FTsensorData()
|
|
123
|
+
else:
|
|
124
|
+
self.header = std_msgs.msg.Header()
|
|
125
|
+
self.sensor_time = genpy.Time()
|
|
126
|
+
self.joint_data = kuavo_msgs.msg.jointData()
|
|
127
|
+
self.imu_data = kuavo_msgs.msg.imuData()
|
|
128
|
+
self.end_effector_data = kuavo_msgs.msg.endEffectorData()
|
|
129
|
+
self.FTsensor_data = kuavo_msgs.msg.FTsensorData()
|
|
130
|
+
|
|
131
|
+
def _get_types(self):
|
|
132
|
+
"""
|
|
133
|
+
internal API method
|
|
134
|
+
"""
|
|
135
|
+
return self._slot_types
|
|
136
|
+
|
|
137
|
+
def serialize(self, buff):
|
|
138
|
+
"""
|
|
139
|
+
serialize message into buffer
|
|
140
|
+
:param buff: buffer, ``StringIO``
|
|
141
|
+
"""
|
|
142
|
+
try:
|
|
143
|
+
_x = self
|
|
144
|
+
buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
|
|
145
|
+
_x = self.header.frame_id
|
|
146
|
+
length = len(_x)
|
|
147
|
+
if python3 or type(_x) == unicode:
|
|
148
|
+
_x = _x.encode('utf-8')
|
|
149
|
+
length = len(_x)
|
|
150
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
151
|
+
_x = self
|
|
152
|
+
buff.write(_get_struct_2I().pack(_x.sensor_time.secs, _x.sensor_time.nsecs))
|
|
153
|
+
length = len(self.joint_data.joint_q)
|
|
154
|
+
buff.write(_struct_I.pack(length))
|
|
155
|
+
pattern = '<%sd'%length
|
|
156
|
+
buff.write(struct.Struct(pattern).pack(*self.joint_data.joint_q))
|
|
157
|
+
length = len(self.joint_data.joint_v)
|
|
158
|
+
buff.write(_struct_I.pack(length))
|
|
159
|
+
pattern = '<%sd'%length
|
|
160
|
+
buff.write(struct.Struct(pattern).pack(*self.joint_data.joint_v))
|
|
161
|
+
length = len(self.joint_data.joint_vd)
|
|
162
|
+
buff.write(_struct_I.pack(length))
|
|
163
|
+
pattern = '<%sd'%length
|
|
164
|
+
buff.write(struct.Struct(pattern).pack(*self.joint_data.joint_vd))
|
|
165
|
+
length = len(self.joint_data.joint_torque)
|
|
166
|
+
buff.write(_struct_I.pack(length))
|
|
167
|
+
pattern = '<%sd'%length
|
|
168
|
+
buff.write(struct.Struct(pattern).pack(*self.joint_data.joint_torque))
|
|
169
|
+
_x = self
|
|
170
|
+
buff.write(_get_struct_13d().pack(_x.imu_data.gyro.x, _x.imu_data.gyro.y, _x.imu_data.gyro.z, _x.imu_data.acc.x, _x.imu_data.acc.y, _x.imu_data.acc.z, _x.imu_data.free_acc.x, _x.imu_data.free_acc.y, _x.imu_data.free_acc.z, _x.imu_data.quat.x, _x.imu_data.quat.y, _x.imu_data.quat.z, _x.imu_data.quat.w))
|
|
171
|
+
length = len(self.end_effector_data.name)
|
|
172
|
+
buff.write(_struct_I.pack(length))
|
|
173
|
+
for val1 in self.end_effector_data.name:
|
|
174
|
+
length = len(val1)
|
|
175
|
+
if python3 or type(val1) == unicode:
|
|
176
|
+
val1 = val1.encode('utf-8')
|
|
177
|
+
length = len(val1)
|
|
178
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
|
|
179
|
+
length = len(self.end_effector_data.position)
|
|
180
|
+
buff.write(_struct_I.pack(length))
|
|
181
|
+
pattern = '<%sd'%length
|
|
182
|
+
buff.write(struct.Struct(pattern).pack(*self.end_effector_data.position))
|
|
183
|
+
length = len(self.end_effector_data.velocity)
|
|
184
|
+
buff.write(_struct_I.pack(length))
|
|
185
|
+
pattern = '<%sd'%length
|
|
186
|
+
buff.write(struct.Struct(pattern).pack(*self.end_effector_data.velocity))
|
|
187
|
+
length = len(self.end_effector_data.effort)
|
|
188
|
+
buff.write(_struct_I.pack(length))
|
|
189
|
+
pattern = '<%sd'%length
|
|
190
|
+
buff.write(struct.Struct(pattern).pack(*self.end_effector_data.effort))
|
|
191
|
+
length = len(self.FTsensor_data.Fx)
|
|
192
|
+
buff.write(_struct_I.pack(length))
|
|
193
|
+
pattern = '<%sd'%length
|
|
194
|
+
buff.write(struct.Struct(pattern).pack(*self.FTsensor_data.Fx))
|
|
195
|
+
length = len(self.FTsensor_data.Fy)
|
|
196
|
+
buff.write(_struct_I.pack(length))
|
|
197
|
+
pattern = '<%sd'%length
|
|
198
|
+
buff.write(struct.Struct(pattern).pack(*self.FTsensor_data.Fy))
|
|
199
|
+
length = len(self.FTsensor_data.Fz)
|
|
200
|
+
buff.write(_struct_I.pack(length))
|
|
201
|
+
pattern = '<%sd'%length
|
|
202
|
+
buff.write(struct.Struct(pattern).pack(*self.FTsensor_data.Fz))
|
|
203
|
+
length = len(self.FTsensor_data.Mx)
|
|
204
|
+
buff.write(_struct_I.pack(length))
|
|
205
|
+
pattern = '<%sd'%length
|
|
206
|
+
buff.write(struct.Struct(pattern).pack(*self.FTsensor_data.Mx))
|
|
207
|
+
length = len(self.FTsensor_data.My)
|
|
208
|
+
buff.write(_struct_I.pack(length))
|
|
209
|
+
pattern = '<%sd'%length
|
|
210
|
+
buff.write(struct.Struct(pattern).pack(*self.FTsensor_data.My))
|
|
211
|
+
length = len(self.FTsensor_data.Mz)
|
|
212
|
+
buff.write(_struct_I.pack(length))
|
|
213
|
+
pattern = '<%sd'%length
|
|
214
|
+
buff.write(struct.Struct(pattern).pack(*self.FTsensor_data.Mz))
|
|
215
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
216
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
217
|
+
|
|
218
|
+
def deserialize(self, str):
|
|
219
|
+
"""
|
|
220
|
+
unpack serialized message in str into this message instance
|
|
221
|
+
:param str: byte array of serialized message, ``str``
|
|
222
|
+
"""
|
|
223
|
+
if python3:
|
|
224
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
225
|
+
try:
|
|
226
|
+
if self.header is None:
|
|
227
|
+
self.header = std_msgs.msg.Header()
|
|
228
|
+
if self.sensor_time is None:
|
|
229
|
+
self.sensor_time = genpy.Time()
|
|
230
|
+
if self.joint_data is None:
|
|
231
|
+
self.joint_data = kuavo_msgs.msg.jointData()
|
|
232
|
+
if self.imu_data is None:
|
|
233
|
+
self.imu_data = kuavo_msgs.msg.imuData()
|
|
234
|
+
if self.end_effector_data is None:
|
|
235
|
+
self.end_effector_data = kuavo_msgs.msg.endEffectorData()
|
|
236
|
+
if self.FTsensor_data is None:
|
|
237
|
+
self.FTsensor_data = kuavo_msgs.msg.FTsensorData()
|
|
238
|
+
end = 0
|
|
239
|
+
_x = self
|
|
240
|
+
start = end
|
|
241
|
+
end += 12
|
|
242
|
+
(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
|
|
243
|
+
start = end
|
|
244
|
+
end += 4
|
|
245
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
246
|
+
start = end
|
|
247
|
+
end += length
|
|
248
|
+
if python3:
|
|
249
|
+
self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
250
|
+
else:
|
|
251
|
+
self.header.frame_id = str[start:end]
|
|
252
|
+
_x = self
|
|
253
|
+
start = end
|
|
254
|
+
end += 8
|
|
255
|
+
(_x.sensor_time.secs, _x.sensor_time.nsecs,) = _get_struct_2I().unpack(str[start:end])
|
|
256
|
+
start = end
|
|
257
|
+
end += 4
|
|
258
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
259
|
+
pattern = '<%sd'%length
|
|
260
|
+
start = end
|
|
261
|
+
s = struct.Struct(pattern)
|
|
262
|
+
end += s.size
|
|
263
|
+
self.joint_data.joint_q = s.unpack(str[start:end])
|
|
264
|
+
start = end
|
|
265
|
+
end += 4
|
|
266
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
267
|
+
pattern = '<%sd'%length
|
|
268
|
+
start = end
|
|
269
|
+
s = struct.Struct(pattern)
|
|
270
|
+
end += s.size
|
|
271
|
+
self.joint_data.joint_v = s.unpack(str[start:end])
|
|
272
|
+
start = end
|
|
273
|
+
end += 4
|
|
274
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
275
|
+
pattern = '<%sd'%length
|
|
276
|
+
start = end
|
|
277
|
+
s = struct.Struct(pattern)
|
|
278
|
+
end += s.size
|
|
279
|
+
self.joint_data.joint_vd = s.unpack(str[start:end])
|
|
280
|
+
start = end
|
|
281
|
+
end += 4
|
|
282
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
283
|
+
pattern = '<%sd'%length
|
|
284
|
+
start = end
|
|
285
|
+
s = struct.Struct(pattern)
|
|
286
|
+
end += s.size
|
|
287
|
+
self.joint_data.joint_torque = s.unpack(str[start:end])
|
|
288
|
+
_x = self
|
|
289
|
+
start = end
|
|
290
|
+
end += 104
|
|
291
|
+
(_x.imu_data.gyro.x, _x.imu_data.gyro.y, _x.imu_data.gyro.z, _x.imu_data.acc.x, _x.imu_data.acc.y, _x.imu_data.acc.z, _x.imu_data.free_acc.x, _x.imu_data.free_acc.y, _x.imu_data.free_acc.z, _x.imu_data.quat.x, _x.imu_data.quat.y, _x.imu_data.quat.z, _x.imu_data.quat.w,) = _get_struct_13d().unpack(str[start:end])
|
|
292
|
+
start = end
|
|
293
|
+
end += 4
|
|
294
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
295
|
+
self.end_effector_data.name = []
|
|
296
|
+
for i in range(0, length):
|
|
297
|
+
start = end
|
|
298
|
+
end += 4
|
|
299
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
300
|
+
start = end
|
|
301
|
+
end += length
|
|
302
|
+
if python3:
|
|
303
|
+
val1 = str[start:end].decode('utf-8', 'rosmsg')
|
|
304
|
+
else:
|
|
305
|
+
val1 = str[start:end]
|
|
306
|
+
self.end_effector_data.name.append(val1)
|
|
307
|
+
start = end
|
|
308
|
+
end += 4
|
|
309
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
310
|
+
pattern = '<%sd'%length
|
|
311
|
+
start = end
|
|
312
|
+
s = struct.Struct(pattern)
|
|
313
|
+
end += s.size
|
|
314
|
+
self.end_effector_data.position = s.unpack(str[start:end])
|
|
315
|
+
start = end
|
|
316
|
+
end += 4
|
|
317
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
318
|
+
pattern = '<%sd'%length
|
|
319
|
+
start = end
|
|
320
|
+
s = struct.Struct(pattern)
|
|
321
|
+
end += s.size
|
|
322
|
+
self.end_effector_data.velocity = s.unpack(str[start:end])
|
|
323
|
+
start = end
|
|
324
|
+
end += 4
|
|
325
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
326
|
+
pattern = '<%sd'%length
|
|
327
|
+
start = end
|
|
328
|
+
s = struct.Struct(pattern)
|
|
329
|
+
end += s.size
|
|
330
|
+
self.end_effector_data.effort = s.unpack(str[start:end])
|
|
331
|
+
start = end
|
|
332
|
+
end += 4
|
|
333
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
334
|
+
pattern = '<%sd'%length
|
|
335
|
+
start = end
|
|
336
|
+
s = struct.Struct(pattern)
|
|
337
|
+
end += s.size
|
|
338
|
+
self.FTsensor_data.Fx = s.unpack(str[start:end])
|
|
339
|
+
start = end
|
|
340
|
+
end += 4
|
|
341
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
342
|
+
pattern = '<%sd'%length
|
|
343
|
+
start = end
|
|
344
|
+
s = struct.Struct(pattern)
|
|
345
|
+
end += s.size
|
|
346
|
+
self.FTsensor_data.Fy = s.unpack(str[start:end])
|
|
347
|
+
start = end
|
|
348
|
+
end += 4
|
|
349
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
350
|
+
pattern = '<%sd'%length
|
|
351
|
+
start = end
|
|
352
|
+
s = struct.Struct(pattern)
|
|
353
|
+
end += s.size
|
|
354
|
+
self.FTsensor_data.Fz = s.unpack(str[start:end])
|
|
355
|
+
start = end
|
|
356
|
+
end += 4
|
|
357
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
358
|
+
pattern = '<%sd'%length
|
|
359
|
+
start = end
|
|
360
|
+
s = struct.Struct(pattern)
|
|
361
|
+
end += s.size
|
|
362
|
+
self.FTsensor_data.Mx = s.unpack(str[start:end])
|
|
363
|
+
start = end
|
|
364
|
+
end += 4
|
|
365
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
366
|
+
pattern = '<%sd'%length
|
|
367
|
+
start = end
|
|
368
|
+
s = struct.Struct(pattern)
|
|
369
|
+
end += s.size
|
|
370
|
+
self.FTsensor_data.My = s.unpack(str[start:end])
|
|
371
|
+
start = end
|
|
372
|
+
end += 4
|
|
373
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
374
|
+
pattern = '<%sd'%length
|
|
375
|
+
start = end
|
|
376
|
+
s = struct.Struct(pattern)
|
|
377
|
+
end += s.size
|
|
378
|
+
self.FTsensor_data.Mz = s.unpack(str[start:end])
|
|
379
|
+
self.sensor_time.canon()
|
|
380
|
+
return self
|
|
381
|
+
except struct.error as e:
|
|
382
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
def serialize_numpy(self, buff, numpy):
|
|
386
|
+
"""
|
|
387
|
+
serialize message with numpy array types into buffer
|
|
388
|
+
:param buff: buffer, ``StringIO``
|
|
389
|
+
:param numpy: numpy python module
|
|
390
|
+
"""
|
|
391
|
+
try:
|
|
392
|
+
_x = self
|
|
393
|
+
buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
|
|
394
|
+
_x = self.header.frame_id
|
|
395
|
+
length = len(_x)
|
|
396
|
+
if python3 or type(_x) == unicode:
|
|
397
|
+
_x = _x.encode('utf-8')
|
|
398
|
+
length = len(_x)
|
|
399
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
|
|
400
|
+
_x = self
|
|
401
|
+
buff.write(_get_struct_2I().pack(_x.sensor_time.secs, _x.sensor_time.nsecs))
|
|
402
|
+
length = len(self.joint_data.joint_q)
|
|
403
|
+
buff.write(_struct_I.pack(length))
|
|
404
|
+
pattern = '<%sd'%length
|
|
405
|
+
buff.write(self.joint_data.joint_q.tostring())
|
|
406
|
+
length = len(self.joint_data.joint_v)
|
|
407
|
+
buff.write(_struct_I.pack(length))
|
|
408
|
+
pattern = '<%sd'%length
|
|
409
|
+
buff.write(self.joint_data.joint_v.tostring())
|
|
410
|
+
length = len(self.joint_data.joint_vd)
|
|
411
|
+
buff.write(_struct_I.pack(length))
|
|
412
|
+
pattern = '<%sd'%length
|
|
413
|
+
buff.write(self.joint_data.joint_vd.tostring())
|
|
414
|
+
length = len(self.joint_data.joint_torque)
|
|
415
|
+
buff.write(_struct_I.pack(length))
|
|
416
|
+
pattern = '<%sd'%length
|
|
417
|
+
buff.write(self.joint_data.joint_torque.tostring())
|
|
418
|
+
_x = self
|
|
419
|
+
buff.write(_get_struct_13d().pack(_x.imu_data.gyro.x, _x.imu_data.gyro.y, _x.imu_data.gyro.z, _x.imu_data.acc.x, _x.imu_data.acc.y, _x.imu_data.acc.z, _x.imu_data.free_acc.x, _x.imu_data.free_acc.y, _x.imu_data.free_acc.z, _x.imu_data.quat.x, _x.imu_data.quat.y, _x.imu_data.quat.z, _x.imu_data.quat.w))
|
|
420
|
+
length = len(self.end_effector_data.name)
|
|
421
|
+
buff.write(_struct_I.pack(length))
|
|
422
|
+
for val1 in self.end_effector_data.name:
|
|
423
|
+
length = len(val1)
|
|
424
|
+
if python3 or type(val1) == unicode:
|
|
425
|
+
val1 = val1.encode('utf-8')
|
|
426
|
+
length = len(val1)
|
|
427
|
+
buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
|
|
428
|
+
length = len(self.end_effector_data.position)
|
|
429
|
+
buff.write(_struct_I.pack(length))
|
|
430
|
+
pattern = '<%sd'%length
|
|
431
|
+
buff.write(self.end_effector_data.position.tostring())
|
|
432
|
+
length = len(self.end_effector_data.velocity)
|
|
433
|
+
buff.write(_struct_I.pack(length))
|
|
434
|
+
pattern = '<%sd'%length
|
|
435
|
+
buff.write(self.end_effector_data.velocity.tostring())
|
|
436
|
+
length = len(self.end_effector_data.effort)
|
|
437
|
+
buff.write(_struct_I.pack(length))
|
|
438
|
+
pattern = '<%sd'%length
|
|
439
|
+
buff.write(self.end_effector_data.effort.tostring())
|
|
440
|
+
length = len(self.FTsensor_data.Fx)
|
|
441
|
+
buff.write(_struct_I.pack(length))
|
|
442
|
+
pattern = '<%sd'%length
|
|
443
|
+
buff.write(self.FTsensor_data.Fx.tostring())
|
|
444
|
+
length = len(self.FTsensor_data.Fy)
|
|
445
|
+
buff.write(_struct_I.pack(length))
|
|
446
|
+
pattern = '<%sd'%length
|
|
447
|
+
buff.write(self.FTsensor_data.Fy.tostring())
|
|
448
|
+
length = len(self.FTsensor_data.Fz)
|
|
449
|
+
buff.write(_struct_I.pack(length))
|
|
450
|
+
pattern = '<%sd'%length
|
|
451
|
+
buff.write(self.FTsensor_data.Fz.tostring())
|
|
452
|
+
length = len(self.FTsensor_data.Mx)
|
|
453
|
+
buff.write(_struct_I.pack(length))
|
|
454
|
+
pattern = '<%sd'%length
|
|
455
|
+
buff.write(self.FTsensor_data.Mx.tostring())
|
|
456
|
+
length = len(self.FTsensor_data.My)
|
|
457
|
+
buff.write(_struct_I.pack(length))
|
|
458
|
+
pattern = '<%sd'%length
|
|
459
|
+
buff.write(self.FTsensor_data.My.tostring())
|
|
460
|
+
length = len(self.FTsensor_data.Mz)
|
|
461
|
+
buff.write(_struct_I.pack(length))
|
|
462
|
+
pattern = '<%sd'%length
|
|
463
|
+
buff.write(self.FTsensor_data.Mz.tostring())
|
|
464
|
+
except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
|
|
465
|
+
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
|
|
466
|
+
|
|
467
|
+
def deserialize_numpy(self, str, numpy):
|
|
468
|
+
"""
|
|
469
|
+
unpack serialized message in str into this message instance using numpy for array types
|
|
470
|
+
:param str: byte array of serialized message, ``str``
|
|
471
|
+
:param numpy: numpy python module
|
|
472
|
+
"""
|
|
473
|
+
if python3:
|
|
474
|
+
codecs.lookup_error("rosmsg").msg_type = self._type
|
|
475
|
+
try:
|
|
476
|
+
if self.header is None:
|
|
477
|
+
self.header = std_msgs.msg.Header()
|
|
478
|
+
if self.sensor_time is None:
|
|
479
|
+
self.sensor_time = genpy.Time()
|
|
480
|
+
if self.joint_data is None:
|
|
481
|
+
self.joint_data = kuavo_msgs.msg.jointData()
|
|
482
|
+
if self.imu_data is None:
|
|
483
|
+
self.imu_data = kuavo_msgs.msg.imuData()
|
|
484
|
+
if self.end_effector_data is None:
|
|
485
|
+
self.end_effector_data = kuavo_msgs.msg.endEffectorData()
|
|
486
|
+
if self.FTsensor_data is None:
|
|
487
|
+
self.FTsensor_data = kuavo_msgs.msg.FTsensorData()
|
|
488
|
+
end = 0
|
|
489
|
+
_x = self
|
|
490
|
+
start = end
|
|
491
|
+
end += 12
|
|
492
|
+
(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
|
|
493
|
+
start = end
|
|
494
|
+
end += 4
|
|
495
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
496
|
+
start = end
|
|
497
|
+
end += length
|
|
498
|
+
if python3:
|
|
499
|
+
self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
|
|
500
|
+
else:
|
|
501
|
+
self.header.frame_id = str[start:end]
|
|
502
|
+
_x = self
|
|
503
|
+
start = end
|
|
504
|
+
end += 8
|
|
505
|
+
(_x.sensor_time.secs, _x.sensor_time.nsecs,) = _get_struct_2I().unpack(str[start:end])
|
|
506
|
+
start = end
|
|
507
|
+
end += 4
|
|
508
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
509
|
+
pattern = '<%sd'%length
|
|
510
|
+
start = end
|
|
511
|
+
s = struct.Struct(pattern)
|
|
512
|
+
end += s.size
|
|
513
|
+
self.joint_data.joint_q = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
514
|
+
start = end
|
|
515
|
+
end += 4
|
|
516
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
517
|
+
pattern = '<%sd'%length
|
|
518
|
+
start = end
|
|
519
|
+
s = struct.Struct(pattern)
|
|
520
|
+
end += s.size
|
|
521
|
+
self.joint_data.joint_v = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
522
|
+
start = end
|
|
523
|
+
end += 4
|
|
524
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
525
|
+
pattern = '<%sd'%length
|
|
526
|
+
start = end
|
|
527
|
+
s = struct.Struct(pattern)
|
|
528
|
+
end += s.size
|
|
529
|
+
self.joint_data.joint_vd = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
530
|
+
start = end
|
|
531
|
+
end += 4
|
|
532
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
533
|
+
pattern = '<%sd'%length
|
|
534
|
+
start = end
|
|
535
|
+
s = struct.Struct(pattern)
|
|
536
|
+
end += s.size
|
|
537
|
+
self.joint_data.joint_torque = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
538
|
+
_x = self
|
|
539
|
+
start = end
|
|
540
|
+
end += 104
|
|
541
|
+
(_x.imu_data.gyro.x, _x.imu_data.gyro.y, _x.imu_data.gyro.z, _x.imu_data.acc.x, _x.imu_data.acc.y, _x.imu_data.acc.z, _x.imu_data.free_acc.x, _x.imu_data.free_acc.y, _x.imu_data.free_acc.z, _x.imu_data.quat.x, _x.imu_data.quat.y, _x.imu_data.quat.z, _x.imu_data.quat.w,) = _get_struct_13d().unpack(str[start:end])
|
|
542
|
+
start = end
|
|
543
|
+
end += 4
|
|
544
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
545
|
+
self.end_effector_data.name = []
|
|
546
|
+
for i in range(0, length):
|
|
547
|
+
start = end
|
|
548
|
+
end += 4
|
|
549
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
550
|
+
start = end
|
|
551
|
+
end += length
|
|
552
|
+
if python3:
|
|
553
|
+
val1 = str[start:end].decode('utf-8', 'rosmsg')
|
|
554
|
+
else:
|
|
555
|
+
val1 = str[start:end]
|
|
556
|
+
self.end_effector_data.name.append(val1)
|
|
557
|
+
start = end
|
|
558
|
+
end += 4
|
|
559
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
560
|
+
pattern = '<%sd'%length
|
|
561
|
+
start = end
|
|
562
|
+
s = struct.Struct(pattern)
|
|
563
|
+
end += s.size
|
|
564
|
+
self.end_effector_data.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
565
|
+
start = end
|
|
566
|
+
end += 4
|
|
567
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
568
|
+
pattern = '<%sd'%length
|
|
569
|
+
start = end
|
|
570
|
+
s = struct.Struct(pattern)
|
|
571
|
+
end += s.size
|
|
572
|
+
self.end_effector_data.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
573
|
+
start = end
|
|
574
|
+
end += 4
|
|
575
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
576
|
+
pattern = '<%sd'%length
|
|
577
|
+
start = end
|
|
578
|
+
s = struct.Struct(pattern)
|
|
579
|
+
end += s.size
|
|
580
|
+
self.end_effector_data.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
581
|
+
start = end
|
|
582
|
+
end += 4
|
|
583
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
584
|
+
pattern = '<%sd'%length
|
|
585
|
+
start = end
|
|
586
|
+
s = struct.Struct(pattern)
|
|
587
|
+
end += s.size
|
|
588
|
+
self.FTsensor_data.Fx = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
589
|
+
start = end
|
|
590
|
+
end += 4
|
|
591
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
592
|
+
pattern = '<%sd'%length
|
|
593
|
+
start = end
|
|
594
|
+
s = struct.Struct(pattern)
|
|
595
|
+
end += s.size
|
|
596
|
+
self.FTsensor_data.Fy = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
597
|
+
start = end
|
|
598
|
+
end += 4
|
|
599
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
600
|
+
pattern = '<%sd'%length
|
|
601
|
+
start = end
|
|
602
|
+
s = struct.Struct(pattern)
|
|
603
|
+
end += s.size
|
|
604
|
+
self.FTsensor_data.Fz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
605
|
+
start = end
|
|
606
|
+
end += 4
|
|
607
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
608
|
+
pattern = '<%sd'%length
|
|
609
|
+
start = end
|
|
610
|
+
s = struct.Struct(pattern)
|
|
611
|
+
end += s.size
|
|
612
|
+
self.FTsensor_data.Mx = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
613
|
+
start = end
|
|
614
|
+
end += 4
|
|
615
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
616
|
+
pattern = '<%sd'%length
|
|
617
|
+
start = end
|
|
618
|
+
s = struct.Struct(pattern)
|
|
619
|
+
end += s.size
|
|
620
|
+
self.FTsensor_data.My = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
621
|
+
start = end
|
|
622
|
+
end += 4
|
|
623
|
+
(length,) = _struct_I.unpack(str[start:end])
|
|
624
|
+
pattern = '<%sd'%length
|
|
625
|
+
start = end
|
|
626
|
+
s = struct.Struct(pattern)
|
|
627
|
+
end += s.size
|
|
628
|
+
self.FTsensor_data.Mz = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
|
|
629
|
+
self.sensor_time.canon()
|
|
630
|
+
return self
|
|
631
|
+
except struct.error as e:
|
|
632
|
+
raise genpy.DeserializationError(e) # most likely buffer underfill
|
|
633
|
+
|
|
634
|
+
_struct_I = genpy.struct_I
|
|
635
|
+
def _get_struct_I():
|
|
636
|
+
global _struct_I
|
|
637
|
+
return _struct_I
|
|
638
|
+
_struct_13d = None
|
|
639
|
+
def _get_struct_13d():
|
|
640
|
+
global _struct_13d
|
|
641
|
+
if _struct_13d is None:
|
|
642
|
+
_struct_13d = struct.Struct("<13d")
|
|
643
|
+
return _struct_13d
|
|
644
|
+
_struct_2I = None
|
|
645
|
+
def _get_struct_2I():
|
|
646
|
+
global _struct_2I
|
|
647
|
+
if _struct_2I is None:
|
|
648
|
+
_struct_2I = struct.Struct("<2I")
|
|
649
|
+
return _struct_2I
|
|
650
|
+
_struct_3I = None
|
|
651
|
+
def _get_struct_3I():
|
|
652
|
+
global _struct_3I
|
|
653
|
+
if _struct_3I is None:
|
|
654
|
+
_struct_3I = struct.Struct("<3I")
|
|
655
|
+
return _struct_3I
|