kuavo-humanoid-sdk 1.2.1b1675__20250811222936-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.

Files changed (158) hide show
  1. kuavo_humanoid_sdk/__init__.py +6 -0
  2. kuavo_humanoid_sdk/common/logger.py +45 -0
  3. kuavo_humanoid_sdk/interfaces/__init__.py +4 -0
  4. kuavo_humanoid_sdk/interfaces/data_types.py +288 -0
  5. kuavo_humanoid_sdk/interfaces/end_effector.py +62 -0
  6. kuavo_humanoid_sdk/interfaces/robot.py +22 -0
  7. kuavo_humanoid_sdk/interfaces/robot_info.py +56 -0
  8. kuavo_humanoid_sdk/kuavo/__init__.py +11 -0
  9. kuavo_humanoid_sdk/kuavo/core/audio.py +32 -0
  10. kuavo_humanoid_sdk/kuavo/core/core.py +634 -0
  11. kuavo_humanoid_sdk/kuavo/core/dex_hand_control.py +114 -0
  12. kuavo_humanoid_sdk/kuavo/core/leju_claw_control.py +67 -0
  13. kuavo_humanoid_sdk/kuavo/core/ros/audio.py +92 -0
  14. kuavo_humanoid_sdk/kuavo/core/ros/control.py +1453 -0
  15. kuavo_humanoid_sdk/kuavo/core/ros/observation.py +94 -0
  16. kuavo_humanoid_sdk/kuavo/core/ros/param.py +183 -0
  17. kuavo_humanoid_sdk/kuavo/core/ros/sat_utils.py +103 -0
  18. kuavo_humanoid_sdk/kuavo/core/ros/state.py +634 -0
  19. kuavo_humanoid_sdk/kuavo/core/ros/tools.py +220 -0
  20. kuavo_humanoid_sdk/kuavo/core/ros/vision.py +234 -0
  21. kuavo_humanoid_sdk/kuavo/core/ros_env.py +238 -0
  22. kuavo_humanoid_sdk/kuavo/dexterous_hand.py +201 -0
  23. kuavo_humanoid_sdk/kuavo/leju_claw.py +235 -0
  24. kuavo_humanoid_sdk/kuavo/robot.py +514 -0
  25. kuavo_humanoid_sdk/kuavo/robot_arm.py +248 -0
  26. kuavo_humanoid_sdk/kuavo/robot_audio.py +39 -0
  27. kuavo_humanoid_sdk/kuavo/robot_head.py +50 -0
  28. kuavo_humanoid_sdk/kuavo/robot_info.py +113 -0
  29. kuavo_humanoid_sdk/kuavo/robot_observation.py +64 -0
  30. kuavo_humanoid_sdk/kuavo/robot_state.py +307 -0
  31. kuavo_humanoid_sdk/kuavo/robot_tool.py +109 -0
  32. kuavo_humanoid_sdk/kuavo/robot_vision.py +81 -0
  33. kuavo_humanoid_sdk/kuavo_strategy/__init__.py +2 -0
  34. kuavo_humanoid_sdk/kuavo_strategy/grasp_box/grasp_box_strategy.py +1325 -0
  35. kuavo_humanoid_sdk/kuavo_strategy/kuavo_strategy.py +106 -0
  36. kuavo_humanoid_sdk/kuavo_strategy_v2/common/data_type.py +340 -0
  37. kuavo_humanoid_sdk/kuavo_strategy_v2/common/events/base_event.py +215 -0
  38. kuavo_humanoid_sdk/kuavo_strategy_v2/common/robot_sdk.py +25 -0
  39. kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/case.py +331 -0
  40. kuavo_humanoid_sdk/kuavo_strategy_v2/pick_place_box/strategy.py +504 -0
  41. kuavo_humanoid_sdk/kuavo_strategy_v2/utils/logger_setup.py +40 -0
  42. kuavo_humanoid_sdk/kuavo_strategy_v2/utils/utils.py +88 -0
  43. kuavo_humanoid_sdk/msg/__init__.py +4 -0
  44. kuavo_humanoid_sdk/msg/kuavo_msgs/__init__.py +7 -0
  45. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetection.py +306 -0
  46. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AprilTagDetectionArray.py +437 -0
  47. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_AudioReceiverData.py +122 -0
  48. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_JoySticks.py +191 -0
  49. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_Metadata.py +199 -0
  50. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_MmDetectionMsg.py +264 -0
  51. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_RobotActionState.py +112 -0
  52. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_TFArray.py +323 -0
  53. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/__init__.py +59 -0
  54. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armCollisionCheckInfo.py +160 -0
  55. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPose.py +160 -0
  56. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armHandPoseFree.py +171 -0
  57. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armPoseWithTimeStamp.py +168 -0
  58. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_armTargetPoses.py +151 -0
  59. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_bezierCurveCubicPoint.py +178 -0
  60. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandCommand.py +229 -0
  61. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_dexhandTouchState.py +256 -0
  62. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_endEffectorData.py +227 -0
  63. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose.py +123 -0
  64. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6D.py +123 -0
  65. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPose6DTargetTrajectories.py +301 -0
  66. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseTargetTrajectories.py +301 -0
  67. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVision.py +136 -0
  68. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoseWithVisionArray.py +231 -0
  69. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses.py +149 -0
  70. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_footPoses6D.py +149 -0
  71. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_fullBodyTargetTrajectories.py +258 -0
  72. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gaitTimeName.py +147 -0
  73. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureInfo.py +218 -0
  74. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_gestureTask.py +149 -0
  75. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_handPose.py +136 -0
  76. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_headBodyPose.py +145 -0
  77. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveError.py +171 -0
  78. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_ikSolveParam.py +140 -0
  79. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_imuData.py +165 -0
  80. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointBezierTrajectory.py +201 -0
  81. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointCmd.py +390 -0
  82. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_jointData.py +205 -0
  83. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawCommand.py +320 -0
  84. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_lejuClawState.py +341 -0
  85. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_motorParam.py +122 -0
  86. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfo.py +143 -0
  87. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_picoPoseInfoList.py +220 -0
  88. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_planArmState.py +120 -0
  89. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_qv.py +121 -0
  90. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotArmQVVD.py +177 -0
  91. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotBodyMatrices.py +332 -0
  92. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHandPosition.py +225 -0
  93. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotHeadMotionData.py +128 -0
  94. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_robotState.py +222 -0
  95. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_sensorsData.py +495 -0
  96. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_switchGaitByName.py +200 -0
  97. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_tagDataArray.py +216 -0
  98. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_touchSensorStatus.py +162 -0
  99. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPose.py +272 -0
  100. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmd.py +315 -0
  101. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseCmdFree.py +338 -0
  102. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_twoArmHandPoseFree.py +299 -0
  103. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloDetection.py +251 -0
  104. kuavo_humanoid_sdk/msg/kuavo_msgs/msg/_yoloOutputData.py +168 -0
  105. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_ExecuteArmAction.py +281 -0
  106. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_GetTargetPartPoseInCamera.py +298 -0
  107. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_RepublishTFs.py +373 -0
  108. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetJoyTopic.py +282 -0
  109. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SetLEDMode.py +468 -0
  110. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_SpeechSynthesis.py +270 -0
  111. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/__init__.py +32 -0
  112. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlMode.py +275 -0
  113. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeArmCtrlModeKuavo.py +236 -0
  114. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeMotorParam.py +299 -0
  115. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_changeTorsoCtrlMode.py +274 -0
  116. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_controlLejuClaw.py +408 -0
  117. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_enableHandTouchSensor.py +304 -0
  118. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_fkSrv.py +394 -0
  119. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPose6DTargetTrajectoriesSrv.py +410 -0
  120. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_footPoseTargetTrajectoriesSrv.py +409 -0
  121. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecute.py +339 -0
  122. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureExecuteState.py +257 -0
  123. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_gestureList.py +418 -0
  124. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getCurrentGaitName.py +253 -0
  125. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_getMotorParam.py +299 -0
  126. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_handForceLevel.py +330 -0
  127. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_jointMoveTo.py +302 -0
  128. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryBezierCurve.py +421 -0
  129. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_planArmTrajectoryCubicSpline.py +490 -0
  130. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_playmusic.py +268 -0
  131. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setHwIntialState.py +304 -0
  132. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMmCtrlFrame.py +273 -0
  133. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setMotorEncoderRoundService.py +283 -0
  134. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_setTagId.py +275 -0
  135. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_singleStepControl.py +444 -0
  136. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdFreeSrv.py +716 -0
  137. kuavo_humanoid_sdk/msg/kuavo_msgs/srv/_twoArmHandPoseCmdSrv.py +662 -0
  138. kuavo_humanoid_sdk/msg/motion_capture_ik/__init__.py +7 -0
  139. kuavo_humanoid_sdk/msg/ocs2_msgs/__init__.py +7 -0
  140. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/__init__.py +12 -0
  141. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_constraint.py +142 -0
  142. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_controller_data.py +121 -0
  143. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_lagrangian_metrics.py +148 -0
  144. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mode_schedule.py +150 -0
  145. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_flattened_controller.py +666 -0
  146. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_input.py +122 -0
  147. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_observation.py +209 -0
  148. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_performance_indices.py +140 -0
  149. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_solver_data.py +886 -0
  150. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_state.py +122 -0
  151. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_mpc_target_trajectories.py +239 -0
  152. kuavo_humanoid_sdk/msg/ocs2_msgs/msg/_multiplier.py +148 -0
  153. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/__init__.py +1 -0
  154. kuavo_humanoid_sdk/msg/ocs2_msgs/srv/_reset.py +376 -0
  155. kuavo_humanoid_sdk-1.2.1b1675.dist-info/METADATA +291 -0
  156. kuavo_humanoid_sdk-1.2.1b1675.dist-info/RECORD +158 -0
  157. kuavo_humanoid_sdk-1.2.1b1675.dist-info/WHEEL +6 -0
  158. kuavo_humanoid_sdk-1.2.1b1675.dist-info/top_level.txt +1 -0
@@ -0,0 +1,191 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/JoySticks.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 JoySticks(genpy.Message):
11
+ _md5sum = "c686b65cdd180a9046db651d6492ec65"
12
+ _type = "kuavo_msgs/JoySticks"
13
+ _has_header = False # flag to mark the presence of a Header object
14
+ _full_text = """float32 left_x
15
+ float32 left_y
16
+ float32 left_trigger
17
+ float32 left_grip
18
+ bool left_first_button_pressed
19
+ bool left_second_button_pressed
20
+ bool left_first_button_touched
21
+ bool left_second_button_touched
22
+ float32 right_x
23
+ float32 right_y
24
+ float32 right_trigger
25
+ float32 right_grip
26
+ bool right_first_button_pressed
27
+ bool right_second_button_pressed
28
+ bool right_first_button_touched
29
+ bool right_second_button_touched
30
+ """
31
+ __slots__ = ['left_x','left_y','left_trigger','left_grip','left_first_button_pressed','left_second_button_pressed','left_first_button_touched','left_second_button_touched','right_x','right_y','right_trigger','right_grip','right_first_button_pressed','right_second_button_pressed','right_first_button_touched','right_second_button_touched']
32
+ _slot_types = ['float32','float32','float32','float32','bool','bool','bool','bool','float32','float32','float32','float32','bool','bool','bool','bool']
33
+
34
+ def __init__(self, *args, **kwds):
35
+ """
36
+ Constructor. Any message fields that are implicitly/explicitly
37
+ set to None will be assigned a default value. The recommend
38
+ use is keyword arguments as this is more robust to future message
39
+ changes. You cannot mix in-order arguments and keyword arguments.
40
+
41
+ The available fields are:
42
+ left_x,left_y,left_trigger,left_grip,left_first_button_pressed,left_second_button_pressed,left_first_button_touched,left_second_button_touched,right_x,right_y,right_trigger,right_grip,right_first_button_pressed,right_second_button_pressed,right_first_button_touched,right_second_button_touched
43
+
44
+ :param args: complete set of field values, in .msg order
45
+ :param kwds: use keyword arguments corresponding to message field names
46
+ to set specific fields.
47
+ """
48
+ if args or kwds:
49
+ super(JoySticks, self).__init__(*args, **kwds)
50
+ # message fields cannot be None, assign default values for those that are
51
+ if self.left_x is None:
52
+ self.left_x = 0.
53
+ if self.left_y is None:
54
+ self.left_y = 0.
55
+ if self.left_trigger is None:
56
+ self.left_trigger = 0.
57
+ if self.left_grip is None:
58
+ self.left_grip = 0.
59
+ if self.left_first_button_pressed is None:
60
+ self.left_first_button_pressed = False
61
+ if self.left_second_button_pressed is None:
62
+ self.left_second_button_pressed = False
63
+ if self.left_first_button_touched is None:
64
+ self.left_first_button_touched = False
65
+ if self.left_second_button_touched is None:
66
+ self.left_second_button_touched = False
67
+ if self.right_x is None:
68
+ self.right_x = 0.
69
+ if self.right_y is None:
70
+ self.right_y = 0.
71
+ if self.right_trigger is None:
72
+ self.right_trigger = 0.
73
+ if self.right_grip is None:
74
+ self.right_grip = 0.
75
+ if self.right_first_button_pressed is None:
76
+ self.right_first_button_pressed = False
77
+ if self.right_second_button_pressed is None:
78
+ self.right_second_button_pressed = False
79
+ if self.right_first_button_touched is None:
80
+ self.right_first_button_touched = False
81
+ if self.right_second_button_touched is None:
82
+ self.right_second_button_touched = False
83
+ else:
84
+ self.left_x = 0.
85
+ self.left_y = 0.
86
+ self.left_trigger = 0.
87
+ self.left_grip = 0.
88
+ self.left_first_button_pressed = False
89
+ self.left_second_button_pressed = False
90
+ self.left_first_button_touched = False
91
+ self.left_second_button_touched = False
92
+ self.right_x = 0.
93
+ self.right_y = 0.
94
+ self.right_trigger = 0.
95
+ self.right_grip = 0.
96
+ self.right_first_button_pressed = False
97
+ self.right_second_button_pressed = False
98
+ self.right_first_button_touched = False
99
+ self.right_second_button_touched = False
100
+
101
+ def _get_types(self):
102
+ """
103
+ internal API method
104
+ """
105
+ return self._slot_types
106
+
107
+ def serialize(self, buff):
108
+ """
109
+ serialize message into buffer
110
+ :param buff: buffer, ``StringIO``
111
+ """
112
+ try:
113
+ _x = self
114
+ buff.write(_get_struct_4f4B4f4B().pack(_x.left_x, _x.left_y, _x.left_trigger, _x.left_grip, _x.left_first_button_pressed, _x.left_second_button_pressed, _x.left_first_button_touched, _x.left_second_button_touched, _x.right_x, _x.right_y, _x.right_trigger, _x.right_grip, _x.right_first_button_pressed, _x.right_second_button_pressed, _x.right_first_button_touched, _x.right_second_button_touched))
115
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
116
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
117
+
118
+ def deserialize(self, str):
119
+ """
120
+ unpack serialized message in str into this message instance
121
+ :param str: byte array of serialized message, ``str``
122
+ """
123
+ if python3:
124
+ codecs.lookup_error("rosmsg").msg_type = self._type
125
+ try:
126
+ end = 0
127
+ _x = self
128
+ start = end
129
+ end += 40
130
+ (_x.left_x, _x.left_y, _x.left_trigger, _x.left_grip, _x.left_first_button_pressed, _x.left_second_button_pressed, _x.left_first_button_touched, _x.left_second_button_touched, _x.right_x, _x.right_y, _x.right_trigger, _x.right_grip, _x.right_first_button_pressed, _x.right_second_button_pressed, _x.right_first_button_touched, _x.right_second_button_touched,) = _get_struct_4f4B4f4B().unpack(str[start:end])
131
+ self.left_first_button_pressed = bool(self.left_first_button_pressed)
132
+ self.left_second_button_pressed = bool(self.left_second_button_pressed)
133
+ self.left_first_button_touched = bool(self.left_first_button_touched)
134
+ self.left_second_button_touched = bool(self.left_second_button_touched)
135
+ self.right_first_button_pressed = bool(self.right_first_button_pressed)
136
+ self.right_second_button_pressed = bool(self.right_second_button_pressed)
137
+ self.right_first_button_touched = bool(self.right_first_button_touched)
138
+ self.right_second_button_touched = bool(self.right_second_button_touched)
139
+ return self
140
+ except struct.error as e:
141
+ raise genpy.DeserializationError(e) # most likely buffer underfill
142
+
143
+
144
+ def serialize_numpy(self, buff, numpy):
145
+ """
146
+ serialize message with numpy array types into buffer
147
+ :param buff: buffer, ``StringIO``
148
+ :param numpy: numpy python module
149
+ """
150
+ try:
151
+ _x = self
152
+ buff.write(_get_struct_4f4B4f4B().pack(_x.left_x, _x.left_y, _x.left_trigger, _x.left_grip, _x.left_first_button_pressed, _x.left_second_button_pressed, _x.left_first_button_touched, _x.left_second_button_touched, _x.right_x, _x.right_y, _x.right_trigger, _x.right_grip, _x.right_first_button_pressed, _x.right_second_button_pressed, _x.right_first_button_touched, _x.right_second_button_touched))
153
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
154
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
155
+
156
+ def deserialize_numpy(self, str, numpy):
157
+ """
158
+ unpack serialized message in str into this message instance using numpy for array types
159
+ :param str: byte array of serialized message, ``str``
160
+ :param numpy: numpy python module
161
+ """
162
+ if python3:
163
+ codecs.lookup_error("rosmsg").msg_type = self._type
164
+ try:
165
+ end = 0
166
+ _x = self
167
+ start = end
168
+ end += 40
169
+ (_x.left_x, _x.left_y, _x.left_trigger, _x.left_grip, _x.left_first_button_pressed, _x.left_second_button_pressed, _x.left_first_button_touched, _x.left_second_button_touched, _x.right_x, _x.right_y, _x.right_trigger, _x.right_grip, _x.right_first_button_pressed, _x.right_second_button_pressed, _x.right_first_button_touched, _x.right_second_button_touched,) = _get_struct_4f4B4f4B().unpack(str[start:end])
170
+ self.left_first_button_pressed = bool(self.left_first_button_pressed)
171
+ self.left_second_button_pressed = bool(self.left_second_button_pressed)
172
+ self.left_first_button_touched = bool(self.left_first_button_touched)
173
+ self.left_second_button_touched = bool(self.left_second_button_touched)
174
+ self.right_first_button_pressed = bool(self.right_first_button_pressed)
175
+ self.right_second_button_pressed = bool(self.right_second_button_pressed)
176
+ self.right_first_button_touched = bool(self.right_first_button_touched)
177
+ self.right_second_button_touched = bool(self.right_second_button_touched)
178
+ return self
179
+ except struct.error as e:
180
+ raise genpy.DeserializationError(e) # most likely buffer underfill
181
+
182
+ _struct_I = genpy.struct_I
183
+ def _get_struct_I():
184
+ global _struct_I
185
+ return _struct_I
186
+ _struct_4f4B4f4B = None
187
+ def _get_struct_4f4B4f4B():
188
+ global _struct_4f4B4f4B
189
+ if _struct_4f4B4f4B is None:
190
+ _struct_4f4B4f4B = struct.Struct("<4f4B4f4B")
191
+ return _struct_4f4B4f4B
@@ -0,0 +1,199 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/Metadata.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 std_msgs.msg
10
+
11
+ class Metadata(genpy.Message):
12
+ _md5sum = "4966ca002be16ee67fe4dbfb2f354787"
13
+ _type = "kuavo_msgs/Metadata"
14
+ _has_header = True # flag to mark the presence of a Header object
15
+ _full_text = """std_msgs/Header header
16
+ string json_data
17
+ ================================================================================
18
+ MSG: std_msgs/Header
19
+ # Standard metadata for higher-level stamped data types.
20
+ # This is generally used to communicate timestamped data
21
+ # in a particular coordinate frame.
22
+ #
23
+ # sequence ID: consecutively increasing ID
24
+ uint32 seq
25
+ #Two-integer timestamp that is expressed as:
26
+ # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
27
+ # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
28
+ # time-handling sugar is provided by the client library
29
+ time stamp
30
+ #Frame this data is associated with
31
+ string frame_id
32
+ """
33
+ __slots__ = ['header','json_data']
34
+ _slot_types = ['std_msgs/Header','string']
35
+
36
+ def __init__(self, *args, **kwds):
37
+ """
38
+ Constructor. Any message fields that are implicitly/explicitly
39
+ set to None will be assigned a default value. The recommend
40
+ use is keyword arguments as this is more robust to future message
41
+ changes. You cannot mix in-order arguments and keyword arguments.
42
+
43
+ The available fields are:
44
+ header,json_data
45
+
46
+ :param args: complete set of field values, in .msg order
47
+ :param kwds: use keyword arguments corresponding to message field names
48
+ to set specific fields.
49
+ """
50
+ if args or kwds:
51
+ super(Metadata, self).__init__(*args, **kwds)
52
+ # message fields cannot be None, assign default values for those that are
53
+ if self.header is None:
54
+ self.header = std_msgs.msg.Header()
55
+ if self.json_data is None:
56
+ self.json_data = ''
57
+ else:
58
+ self.header = std_msgs.msg.Header()
59
+ self.json_data = ''
60
+
61
+ def _get_types(self):
62
+ """
63
+ internal API method
64
+ """
65
+ return self._slot_types
66
+
67
+ def serialize(self, buff):
68
+ """
69
+ serialize message into buffer
70
+ :param buff: buffer, ``StringIO``
71
+ """
72
+ try:
73
+ _x = self
74
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
75
+ _x = self.header.frame_id
76
+ length = len(_x)
77
+ if python3 or type(_x) == unicode:
78
+ _x = _x.encode('utf-8')
79
+ length = len(_x)
80
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
81
+ _x = self.json_data
82
+ length = len(_x)
83
+ if python3 or type(_x) == unicode:
84
+ _x = _x.encode('utf-8')
85
+ length = len(_x)
86
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
87
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
88
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
89
+
90
+ def deserialize(self, str):
91
+ """
92
+ unpack serialized message in str into this message instance
93
+ :param str: byte array of serialized message, ``str``
94
+ """
95
+ if python3:
96
+ codecs.lookup_error("rosmsg").msg_type = self._type
97
+ try:
98
+ if self.header is None:
99
+ self.header = std_msgs.msg.Header()
100
+ end = 0
101
+ _x = self
102
+ start = end
103
+ end += 12
104
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
105
+ start = end
106
+ end += 4
107
+ (length,) = _struct_I.unpack(str[start:end])
108
+ start = end
109
+ end += length
110
+ if python3:
111
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
112
+ else:
113
+ self.header.frame_id = str[start:end]
114
+ start = end
115
+ end += 4
116
+ (length,) = _struct_I.unpack(str[start:end])
117
+ start = end
118
+ end += length
119
+ if python3:
120
+ self.json_data = str[start:end].decode('utf-8', 'rosmsg')
121
+ else:
122
+ self.json_data = str[start:end]
123
+ return self
124
+ except struct.error as e:
125
+ raise genpy.DeserializationError(e) # most likely buffer underfill
126
+
127
+
128
+ def serialize_numpy(self, buff, numpy):
129
+ """
130
+ serialize message with numpy array types into buffer
131
+ :param buff: buffer, ``StringIO``
132
+ :param numpy: numpy python module
133
+ """
134
+ try:
135
+ _x = self
136
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
137
+ _x = self.header.frame_id
138
+ length = len(_x)
139
+ if python3 or type(_x) == unicode:
140
+ _x = _x.encode('utf-8')
141
+ length = len(_x)
142
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
143
+ _x = self.json_data
144
+ length = len(_x)
145
+ if python3 or type(_x) == unicode:
146
+ _x = _x.encode('utf-8')
147
+ length = len(_x)
148
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
149
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
150
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
151
+
152
+ def deserialize_numpy(self, str, numpy):
153
+ """
154
+ unpack serialized message in str into this message instance using numpy for array types
155
+ :param str: byte array of serialized message, ``str``
156
+ :param numpy: numpy python module
157
+ """
158
+ if python3:
159
+ codecs.lookup_error("rosmsg").msg_type = self._type
160
+ try:
161
+ if self.header is None:
162
+ self.header = std_msgs.msg.Header()
163
+ end = 0
164
+ _x = self
165
+ start = end
166
+ end += 12
167
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
168
+ start = end
169
+ end += 4
170
+ (length,) = _struct_I.unpack(str[start:end])
171
+ start = end
172
+ end += length
173
+ if python3:
174
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
175
+ else:
176
+ self.header.frame_id = str[start:end]
177
+ start = end
178
+ end += 4
179
+ (length,) = _struct_I.unpack(str[start:end])
180
+ start = end
181
+ end += length
182
+ if python3:
183
+ self.json_data = str[start:end].decode('utf-8', 'rosmsg')
184
+ else:
185
+ self.json_data = str[start:end]
186
+ return self
187
+ except struct.error as e:
188
+ raise genpy.DeserializationError(e) # most likely buffer underfill
189
+
190
+ _struct_I = genpy.struct_I
191
+ def _get_struct_I():
192
+ global _struct_I
193
+ return _struct_I
194
+ _struct_3I = None
195
+ def _get_struct_3I():
196
+ global _struct_3I
197
+ if _struct_3I is None:
198
+ _struct_3I = struct.Struct("<3I")
199
+ return _struct_3I
@@ -0,0 +1,264 @@
1
+ # This Python file uses the following encoding: utf-8
2
+ """autogenerated by genpy from kuavo_msgs/MmDetectionMsg.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 std_msgs.msg
10
+
11
+ class MmDetectionMsg(genpy.Message):
12
+ _md5sum = "ae9783b5c89ddfd7442af5018fe3e2e1"
13
+ _type = "kuavo_msgs/MmDetectionMsg"
14
+ _has_header = True # flag to mark the presence of a Header object
15
+ _full_text = """# Mobile Manipulator Detection Message
16
+ # This message provides structured anomaly detection results for mobile manipulator policy tracking
17
+
18
+ # Header for timestamping
19
+ Header header
20
+
21
+ # Overall anomaly detection result
22
+ bool hasAnomaly
23
+
24
+ # First type detection: Trajectory-level position error metrics
25
+ # Compares entire policy trajectory with target trajectory
26
+ float64 trajectoryPositionErrorMax
27
+ float64 trajectoryPositionErrorAvg
28
+ bool trajectoryPositionMaxThresholdExceeded
29
+ bool trajectoryPositionAvgThresholdExceeded
30
+
31
+ # First type detection: Trajectory-level orientation error metrics
32
+ # Compares entire policy trajectory with target trajectory
33
+ float64 trajectoryOrientationErrorMax
34
+ float64 trajectoryOrientationErrorAvg
35
+ bool trajectoryOrientationMaxThresholdExceeded
36
+ bool trajectoryOrientationAvgThresholdExceeded
37
+
38
+ # Second type detection: Velocity magnitude threshold detection
39
+ # Directly checks policy inputTrajectory velocity magnitudes
40
+ float64 velocityMagnitudeAvg
41
+ float64 velocityMagnitudeMax
42
+ bool velocityAvgThresholdExceeded
43
+ bool velocityMaxThresholdExceeded
44
+ ================================================================================
45
+ MSG: std_msgs/Header
46
+ # Standard metadata for higher-level stamped data types.
47
+ # This is generally used to communicate timestamped data
48
+ # in a particular coordinate frame.
49
+ #
50
+ # sequence ID: consecutively increasing ID
51
+ uint32 seq
52
+ #Two-integer timestamp that is expressed as:
53
+ # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
54
+ # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
55
+ # time-handling sugar is provided by the client library
56
+ time stamp
57
+ #Frame this data is associated with
58
+ string frame_id
59
+ """
60
+ __slots__ = ['header','hasAnomaly','trajectoryPositionErrorMax','trajectoryPositionErrorAvg','trajectoryPositionMaxThresholdExceeded','trajectoryPositionAvgThresholdExceeded','trajectoryOrientationErrorMax','trajectoryOrientationErrorAvg','trajectoryOrientationMaxThresholdExceeded','trajectoryOrientationAvgThresholdExceeded','velocityMagnitudeAvg','velocityMagnitudeMax','velocityAvgThresholdExceeded','velocityMaxThresholdExceeded']
61
+ _slot_types = ['std_msgs/Header','bool','float64','float64','bool','bool','float64','float64','bool','bool','float64','float64','bool','bool']
62
+
63
+ def __init__(self, *args, **kwds):
64
+ """
65
+ Constructor. Any message fields that are implicitly/explicitly
66
+ set to None will be assigned a default value. The recommend
67
+ use is keyword arguments as this is more robust to future message
68
+ changes. You cannot mix in-order arguments and keyword arguments.
69
+
70
+ The available fields are:
71
+ header,hasAnomaly,trajectoryPositionErrorMax,trajectoryPositionErrorAvg,trajectoryPositionMaxThresholdExceeded,trajectoryPositionAvgThresholdExceeded,trajectoryOrientationErrorMax,trajectoryOrientationErrorAvg,trajectoryOrientationMaxThresholdExceeded,trajectoryOrientationAvgThresholdExceeded,velocityMagnitudeAvg,velocityMagnitudeMax,velocityAvgThresholdExceeded,velocityMaxThresholdExceeded
72
+
73
+ :param args: complete set of field values, in .msg order
74
+ :param kwds: use keyword arguments corresponding to message field names
75
+ to set specific fields.
76
+ """
77
+ if args or kwds:
78
+ super(MmDetectionMsg, self).__init__(*args, **kwds)
79
+ # message fields cannot be None, assign default values for those that are
80
+ if self.header is None:
81
+ self.header = std_msgs.msg.Header()
82
+ if self.hasAnomaly is None:
83
+ self.hasAnomaly = False
84
+ if self.trajectoryPositionErrorMax is None:
85
+ self.trajectoryPositionErrorMax = 0.
86
+ if self.trajectoryPositionErrorAvg is None:
87
+ self.trajectoryPositionErrorAvg = 0.
88
+ if self.trajectoryPositionMaxThresholdExceeded is None:
89
+ self.trajectoryPositionMaxThresholdExceeded = False
90
+ if self.trajectoryPositionAvgThresholdExceeded is None:
91
+ self.trajectoryPositionAvgThresholdExceeded = False
92
+ if self.trajectoryOrientationErrorMax is None:
93
+ self.trajectoryOrientationErrorMax = 0.
94
+ if self.trajectoryOrientationErrorAvg is None:
95
+ self.trajectoryOrientationErrorAvg = 0.
96
+ if self.trajectoryOrientationMaxThresholdExceeded is None:
97
+ self.trajectoryOrientationMaxThresholdExceeded = False
98
+ if self.trajectoryOrientationAvgThresholdExceeded is None:
99
+ self.trajectoryOrientationAvgThresholdExceeded = False
100
+ if self.velocityMagnitudeAvg is None:
101
+ self.velocityMagnitudeAvg = 0.
102
+ if self.velocityMagnitudeMax is None:
103
+ self.velocityMagnitudeMax = 0.
104
+ if self.velocityAvgThresholdExceeded is None:
105
+ self.velocityAvgThresholdExceeded = False
106
+ if self.velocityMaxThresholdExceeded is None:
107
+ self.velocityMaxThresholdExceeded = False
108
+ else:
109
+ self.header = std_msgs.msg.Header()
110
+ self.hasAnomaly = False
111
+ self.trajectoryPositionErrorMax = 0.
112
+ self.trajectoryPositionErrorAvg = 0.
113
+ self.trajectoryPositionMaxThresholdExceeded = False
114
+ self.trajectoryPositionAvgThresholdExceeded = False
115
+ self.trajectoryOrientationErrorMax = 0.
116
+ self.trajectoryOrientationErrorAvg = 0.
117
+ self.trajectoryOrientationMaxThresholdExceeded = False
118
+ self.trajectoryOrientationAvgThresholdExceeded = False
119
+ self.velocityMagnitudeAvg = 0.
120
+ self.velocityMagnitudeMax = 0.
121
+ self.velocityAvgThresholdExceeded = False
122
+ self.velocityMaxThresholdExceeded = False
123
+
124
+ def _get_types(self):
125
+ """
126
+ internal API method
127
+ """
128
+ return self._slot_types
129
+
130
+ def serialize(self, buff):
131
+ """
132
+ serialize message into buffer
133
+ :param buff: buffer, ``StringIO``
134
+ """
135
+ try:
136
+ _x = self
137
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
138
+ _x = self.header.frame_id
139
+ length = len(_x)
140
+ if python3 or type(_x) == unicode:
141
+ _x = _x.encode('utf-8')
142
+ length = len(_x)
143
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
144
+ _x = self
145
+ buff.write(_get_struct_B2d2B2d2B2d2B().pack(_x.hasAnomaly, _x.trajectoryPositionErrorMax, _x.trajectoryPositionErrorAvg, _x.trajectoryPositionMaxThresholdExceeded, _x.trajectoryPositionAvgThresholdExceeded, _x.trajectoryOrientationErrorMax, _x.trajectoryOrientationErrorAvg, _x.trajectoryOrientationMaxThresholdExceeded, _x.trajectoryOrientationAvgThresholdExceeded, _x.velocityMagnitudeAvg, _x.velocityMagnitudeMax, _x.velocityAvgThresholdExceeded, _x.velocityMaxThresholdExceeded))
146
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
147
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
148
+
149
+ def deserialize(self, str):
150
+ """
151
+ unpack serialized message in str into this message instance
152
+ :param str: byte array of serialized message, ``str``
153
+ """
154
+ if python3:
155
+ codecs.lookup_error("rosmsg").msg_type = self._type
156
+ try:
157
+ if self.header is None:
158
+ self.header = std_msgs.msg.Header()
159
+ end = 0
160
+ _x = self
161
+ start = end
162
+ end += 12
163
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
164
+ start = end
165
+ end += 4
166
+ (length,) = _struct_I.unpack(str[start:end])
167
+ start = end
168
+ end += length
169
+ if python3:
170
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
171
+ else:
172
+ self.header.frame_id = str[start:end]
173
+ _x = self
174
+ start = end
175
+ end += 55
176
+ (_x.hasAnomaly, _x.trajectoryPositionErrorMax, _x.trajectoryPositionErrorAvg, _x.trajectoryPositionMaxThresholdExceeded, _x.trajectoryPositionAvgThresholdExceeded, _x.trajectoryOrientationErrorMax, _x.trajectoryOrientationErrorAvg, _x.trajectoryOrientationMaxThresholdExceeded, _x.trajectoryOrientationAvgThresholdExceeded, _x.velocityMagnitudeAvg, _x.velocityMagnitudeMax, _x.velocityAvgThresholdExceeded, _x.velocityMaxThresholdExceeded,) = _get_struct_B2d2B2d2B2d2B().unpack(str[start:end])
177
+ self.hasAnomaly = bool(self.hasAnomaly)
178
+ self.trajectoryPositionMaxThresholdExceeded = bool(self.trajectoryPositionMaxThresholdExceeded)
179
+ self.trajectoryPositionAvgThresholdExceeded = bool(self.trajectoryPositionAvgThresholdExceeded)
180
+ self.trajectoryOrientationMaxThresholdExceeded = bool(self.trajectoryOrientationMaxThresholdExceeded)
181
+ self.trajectoryOrientationAvgThresholdExceeded = bool(self.trajectoryOrientationAvgThresholdExceeded)
182
+ self.velocityAvgThresholdExceeded = bool(self.velocityAvgThresholdExceeded)
183
+ self.velocityMaxThresholdExceeded = bool(self.velocityMaxThresholdExceeded)
184
+ return self
185
+ except struct.error as e:
186
+ raise genpy.DeserializationError(e) # most likely buffer underfill
187
+
188
+
189
+ def serialize_numpy(self, buff, numpy):
190
+ """
191
+ serialize message with numpy array types into buffer
192
+ :param buff: buffer, ``StringIO``
193
+ :param numpy: numpy python module
194
+ """
195
+ try:
196
+ _x = self
197
+ buff.write(_get_struct_3I().pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
198
+ _x = self.header.frame_id
199
+ length = len(_x)
200
+ if python3 or type(_x) == unicode:
201
+ _x = _x.encode('utf-8')
202
+ length = len(_x)
203
+ buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
204
+ _x = self
205
+ buff.write(_get_struct_B2d2B2d2B2d2B().pack(_x.hasAnomaly, _x.trajectoryPositionErrorMax, _x.trajectoryPositionErrorAvg, _x.trajectoryPositionMaxThresholdExceeded, _x.trajectoryPositionAvgThresholdExceeded, _x.trajectoryOrientationErrorMax, _x.trajectoryOrientationErrorAvg, _x.trajectoryOrientationMaxThresholdExceeded, _x.trajectoryOrientationAvgThresholdExceeded, _x.velocityMagnitudeAvg, _x.velocityMagnitudeMax, _x.velocityAvgThresholdExceeded, _x.velocityMaxThresholdExceeded))
206
+ except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
207
+ except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
208
+
209
+ def deserialize_numpy(self, str, numpy):
210
+ """
211
+ unpack serialized message in str into this message instance using numpy for array types
212
+ :param str: byte array of serialized message, ``str``
213
+ :param numpy: numpy python module
214
+ """
215
+ if python3:
216
+ codecs.lookup_error("rosmsg").msg_type = self._type
217
+ try:
218
+ if self.header is None:
219
+ self.header = std_msgs.msg.Header()
220
+ end = 0
221
+ _x = self
222
+ start = end
223
+ end += 12
224
+ (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
225
+ start = end
226
+ end += 4
227
+ (length,) = _struct_I.unpack(str[start:end])
228
+ start = end
229
+ end += length
230
+ if python3:
231
+ self.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
232
+ else:
233
+ self.header.frame_id = str[start:end]
234
+ _x = self
235
+ start = end
236
+ end += 55
237
+ (_x.hasAnomaly, _x.trajectoryPositionErrorMax, _x.trajectoryPositionErrorAvg, _x.trajectoryPositionMaxThresholdExceeded, _x.trajectoryPositionAvgThresholdExceeded, _x.trajectoryOrientationErrorMax, _x.trajectoryOrientationErrorAvg, _x.trajectoryOrientationMaxThresholdExceeded, _x.trajectoryOrientationAvgThresholdExceeded, _x.velocityMagnitudeAvg, _x.velocityMagnitudeMax, _x.velocityAvgThresholdExceeded, _x.velocityMaxThresholdExceeded,) = _get_struct_B2d2B2d2B2d2B().unpack(str[start:end])
238
+ self.hasAnomaly = bool(self.hasAnomaly)
239
+ self.trajectoryPositionMaxThresholdExceeded = bool(self.trajectoryPositionMaxThresholdExceeded)
240
+ self.trajectoryPositionAvgThresholdExceeded = bool(self.trajectoryPositionAvgThresholdExceeded)
241
+ self.trajectoryOrientationMaxThresholdExceeded = bool(self.trajectoryOrientationMaxThresholdExceeded)
242
+ self.trajectoryOrientationAvgThresholdExceeded = bool(self.trajectoryOrientationAvgThresholdExceeded)
243
+ self.velocityAvgThresholdExceeded = bool(self.velocityAvgThresholdExceeded)
244
+ self.velocityMaxThresholdExceeded = bool(self.velocityMaxThresholdExceeded)
245
+ return self
246
+ except struct.error as e:
247
+ raise genpy.DeserializationError(e) # most likely buffer underfill
248
+
249
+ _struct_I = genpy.struct_I
250
+ def _get_struct_I():
251
+ global _struct_I
252
+ return _struct_I
253
+ _struct_3I = None
254
+ def _get_struct_3I():
255
+ global _struct_3I
256
+ if _struct_3I is None:
257
+ _struct_3I = struct.Struct("<3I")
258
+ return _struct_3I
259
+ _struct_B2d2B2d2B2d2B = None
260
+ def _get_struct_B2d2B2d2B2d2B():
261
+ global _struct_B2d2B2d2B2d2B
262
+ if _struct_B2d2B2d2B2d2B is None:
263
+ _struct_B2d2B2d2B2d2B = struct.Struct("<B2d2B2d2B2d2B")
264
+ return _struct_B2d2B2d2B2d2B