$search
00001 """autogenerated by genmsg_py from TestGripperPoseAction.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import pr2_object_manipulation_msgs.msg 00006 import geometry_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class TestGripperPoseAction(roslib.message.Message): 00012 _md5sum = "1d58ed18524d59cde728c53aef5bec4d" 00013 _type = "pr2_object_manipulation_msgs/TestGripperPoseAction" 00014 _has_header = False #flag to mark the presence of a Header object 00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00016 00017 TestGripperPoseActionGoal action_goal 00018 TestGripperPoseActionResult action_result 00019 TestGripperPoseActionFeedback action_feedback 00020 00021 ================================================================================ 00022 MSG: pr2_object_manipulation_msgs/TestGripperPoseActionGoal 00023 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00024 00025 Header header 00026 actionlib_msgs/GoalID goal_id 00027 TestGripperPoseGoal goal 00028 00029 ================================================================================ 00030 MSG: std_msgs/Header 00031 # Standard metadata for higher-level stamped data types. 00032 # This is generally used to communicate timestamped data 00033 # in a particular coordinate frame. 00034 # 00035 # sequence ID: consecutively increasing ID 00036 uint32 seq 00037 #Two-integer timestamp that is expressed as: 00038 # * stamp.secs: seconds (stamp_secs) since epoch 00039 # * stamp.nsecs: nanoseconds since stamp_secs 00040 # time-handling sugar is provided by the client library 00041 time stamp 00042 #Frame this data is associated with 00043 # 0: no frame 00044 # 1: global frame 00045 string frame_id 00046 00047 ================================================================================ 00048 MSG: actionlib_msgs/GoalID 00049 # The stamp should store the time at which this goal was requested. 00050 # It is used by an action server when it tries to preempt all 00051 # goals that were requested before a certain time 00052 time stamp 00053 00054 # The id provides a way to associate feedback and 00055 # result message with specific goal requests. The id 00056 # specified must be unique. 00057 string id 00058 00059 00060 ================================================================================ 00061 MSG: pr2_object_manipulation_msgs/TestGripperPoseGoal 00062 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00063 geometry_msgs/PoseStamped[] gripper_poses 00064 float32[] gripper_openings 00065 00066 ================================================================================ 00067 MSG: geometry_msgs/PoseStamped 00068 # A Pose with reference coordinate frame and timestamp 00069 Header header 00070 Pose pose 00071 00072 ================================================================================ 00073 MSG: geometry_msgs/Pose 00074 # A representation of pose in free space, composed of postion and orientation. 00075 Point position 00076 Quaternion orientation 00077 00078 ================================================================================ 00079 MSG: geometry_msgs/Point 00080 # This contains the position of a point in free space 00081 float64 x 00082 float64 y 00083 float64 z 00084 00085 ================================================================================ 00086 MSG: geometry_msgs/Quaternion 00087 # This represents an orientation in free space in quaternion form. 00088 00089 float64 x 00090 float64 y 00091 float64 z 00092 float64 w 00093 00094 ================================================================================ 00095 MSG: pr2_object_manipulation_msgs/TestGripperPoseActionResult 00096 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00097 00098 Header header 00099 actionlib_msgs/GoalStatus status 00100 TestGripperPoseResult result 00101 00102 ================================================================================ 00103 MSG: actionlib_msgs/GoalStatus 00104 GoalID goal_id 00105 uint8 status 00106 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00107 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00108 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00109 # and has since completed its execution (Terminal State) 00110 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00111 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00112 # to some failure (Terminal State) 00113 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00114 # because the goal was unattainable or invalid (Terminal State) 00115 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00116 # and has not yet completed execution 00117 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00118 # but the action server has not yet confirmed that the goal is canceled 00119 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00120 # and was successfully cancelled (Terminal State) 00121 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00122 # sent over the wire by an action server 00123 00124 #Allow for the user to associate a string with GoalStatus for debugging 00125 string text 00126 00127 00128 ================================================================================ 00129 MSG: pr2_object_manipulation_msgs/TestGripperPoseResult 00130 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00131 bool[] valid 00132 00133 ================================================================================ 00134 MSG: pr2_object_manipulation_msgs/TestGripperPoseActionFeedback 00135 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00136 00137 Header header 00138 actionlib_msgs/GoalStatus status 00139 TestGripperPoseFeedback feedback 00140 00141 ================================================================================ 00142 MSG: pr2_object_manipulation_msgs/TestGripperPoseFeedback 00143 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00144 00145 """ 00146 __slots__ = ['action_goal','action_result','action_feedback'] 00147 _slot_types = ['pr2_object_manipulation_msgs/TestGripperPoseActionGoal','pr2_object_manipulation_msgs/TestGripperPoseActionResult','pr2_object_manipulation_msgs/TestGripperPoseActionFeedback'] 00148 00149 def __init__(self, *args, **kwds): 00150 """ 00151 Constructor. Any message fields that are implicitly/explicitly 00152 set to None will be assigned a default value. The recommend 00153 use is keyword arguments as this is more robust to future message 00154 changes. You cannot mix in-order arguments and keyword arguments. 00155 00156 The available fields are: 00157 action_goal,action_result,action_feedback 00158 00159 @param args: complete set of field values, in .msg order 00160 @param kwds: use keyword arguments corresponding to message field names 00161 to set specific fields. 00162 """ 00163 if args or kwds: 00164 super(TestGripperPoseAction, self).__init__(*args, **kwds) 00165 #message fields cannot be None, assign default values for those that are 00166 if self.action_goal is None: 00167 self.action_goal = pr2_object_manipulation_msgs.msg.TestGripperPoseActionGoal() 00168 if self.action_result is None: 00169 self.action_result = pr2_object_manipulation_msgs.msg.TestGripperPoseActionResult() 00170 if self.action_feedback is None: 00171 self.action_feedback = pr2_object_manipulation_msgs.msg.TestGripperPoseActionFeedback() 00172 else: 00173 self.action_goal = pr2_object_manipulation_msgs.msg.TestGripperPoseActionGoal() 00174 self.action_result = pr2_object_manipulation_msgs.msg.TestGripperPoseActionResult() 00175 self.action_feedback = pr2_object_manipulation_msgs.msg.TestGripperPoseActionFeedback() 00176 00177 def _get_types(self): 00178 """ 00179 internal API method 00180 """ 00181 return self._slot_types 00182 00183 def serialize(self, buff): 00184 """ 00185 serialize message into buffer 00186 @param buff: buffer 00187 @type buff: StringIO 00188 """ 00189 try: 00190 _x = self 00191 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00192 _x = self.action_goal.header.frame_id 00193 length = len(_x) 00194 buff.write(struct.pack('<I%ss'%length, length, _x)) 00195 _x = self 00196 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00197 _x = self.action_goal.goal_id.id 00198 length = len(_x) 00199 buff.write(struct.pack('<I%ss'%length, length, _x)) 00200 length = len(self.action_goal.goal.gripper_poses) 00201 buff.write(_struct_I.pack(length)) 00202 for val1 in self.action_goal.goal.gripper_poses: 00203 _v1 = val1.header 00204 buff.write(_struct_I.pack(_v1.seq)) 00205 _v2 = _v1.stamp 00206 _x = _v2 00207 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00208 _x = _v1.frame_id 00209 length = len(_x) 00210 buff.write(struct.pack('<I%ss'%length, length, _x)) 00211 _v3 = val1.pose 00212 _v4 = _v3.position 00213 _x = _v4 00214 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00215 _v5 = _v3.orientation 00216 _x = _v5 00217 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00218 length = len(self.action_goal.goal.gripper_openings) 00219 buff.write(_struct_I.pack(length)) 00220 pattern = '<%sf'%length 00221 buff.write(struct.pack(pattern, *self.action_goal.goal.gripper_openings)) 00222 _x = self 00223 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00224 _x = self.action_result.header.frame_id 00225 length = len(_x) 00226 buff.write(struct.pack('<I%ss'%length, length, _x)) 00227 _x = self 00228 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00229 _x = self.action_result.status.goal_id.id 00230 length = len(_x) 00231 buff.write(struct.pack('<I%ss'%length, length, _x)) 00232 buff.write(_struct_B.pack(self.action_result.status.status)) 00233 _x = self.action_result.status.text 00234 length = len(_x) 00235 buff.write(struct.pack('<I%ss'%length, length, _x)) 00236 length = len(self.action_result.result.valid) 00237 buff.write(_struct_I.pack(length)) 00238 pattern = '<%sB'%length 00239 buff.write(struct.pack(pattern, *self.action_result.result.valid)) 00240 _x = self 00241 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00242 _x = self.action_feedback.header.frame_id 00243 length = len(_x) 00244 buff.write(struct.pack('<I%ss'%length, length, _x)) 00245 _x = self 00246 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00247 _x = self.action_feedback.status.goal_id.id 00248 length = len(_x) 00249 buff.write(struct.pack('<I%ss'%length, length, _x)) 00250 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00251 _x = self.action_feedback.status.text 00252 length = len(_x) 00253 buff.write(struct.pack('<I%ss'%length, length, _x)) 00254 except struct.error as se: self._check_types(se) 00255 except TypeError as te: self._check_types(te) 00256 00257 def deserialize(self, str): 00258 """ 00259 unpack serialized message in str into this message instance 00260 @param str: byte array of serialized message 00261 @type str: str 00262 """ 00263 try: 00264 if self.action_goal is None: 00265 self.action_goal = pr2_object_manipulation_msgs.msg.TestGripperPoseActionGoal() 00266 if self.action_result is None: 00267 self.action_result = pr2_object_manipulation_msgs.msg.TestGripperPoseActionResult() 00268 if self.action_feedback is None: 00269 self.action_feedback = pr2_object_manipulation_msgs.msg.TestGripperPoseActionFeedback() 00270 end = 0 00271 _x = self 00272 start = end 00273 end += 12 00274 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00275 start = end 00276 end += 4 00277 (length,) = _struct_I.unpack(str[start:end]) 00278 start = end 00279 end += length 00280 self.action_goal.header.frame_id = str[start:end] 00281 _x = self 00282 start = end 00283 end += 8 00284 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00285 start = end 00286 end += 4 00287 (length,) = _struct_I.unpack(str[start:end]) 00288 start = end 00289 end += length 00290 self.action_goal.goal_id.id = str[start:end] 00291 start = end 00292 end += 4 00293 (length,) = _struct_I.unpack(str[start:end]) 00294 self.action_goal.goal.gripper_poses = [] 00295 for i in range(0, length): 00296 val1 = geometry_msgs.msg.PoseStamped() 00297 _v6 = val1.header 00298 start = end 00299 end += 4 00300 (_v6.seq,) = _struct_I.unpack(str[start:end]) 00301 _v7 = _v6.stamp 00302 _x = _v7 00303 start = end 00304 end += 8 00305 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00306 start = end 00307 end += 4 00308 (length,) = _struct_I.unpack(str[start:end]) 00309 start = end 00310 end += length 00311 _v6.frame_id = str[start:end] 00312 _v8 = val1.pose 00313 _v9 = _v8.position 00314 _x = _v9 00315 start = end 00316 end += 24 00317 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00318 _v10 = _v8.orientation 00319 _x = _v10 00320 start = end 00321 end += 32 00322 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00323 self.action_goal.goal.gripper_poses.append(val1) 00324 start = end 00325 end += 4 00326 (length,) = _struct_I.unpack(str[start:end]) 00327 pattern = '<%sf'%length 00328 start = end 00329 end += struct.calcsize(pattern) 00330 self.action_goal.goal.gripper_openings = struct.unpack(pattern, str[start:end]) 00331 _x = self 00332 start = end 00333 end += 12 00334 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00335 start = end 00336 end += 4 00337 (length,) = _struct_I.unpack(str[start:end]) 00338 start = end 00339 end += length 00340 self.action_result.header.frame_id = str[start:end] 00341 _x = self 00342 start = end 00343 end += 8 00344 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00345 start = end 00346 end += 4 00347 (length,) = _struct_I.unpack(str[start:end]) 00348 start = end 00349 end += length 00350 self.action_result.status.goal_id.id = str[start:end] 00351 start = end 00352 end += 1 00353 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00354 start = end 00355 end += 4 00356 (length,) = _struct_I.unpack(str[start:end]) 00357 start = end 00358 end += length 00359 self.action_result.status.text = str[start:end] 00360 start = end 00361 end += 4 00362 (length,) = _struct_I.unpack(str[start:end]) 00363 pattern = '<%sB'%length 00364 start = end 00365 end += struct.calcsize(pattern) 00366 self.action_result.result.valid = struct.unpack(pattern, str[start:end]) 00367 self.action_result.result.valid = map(bool, self.action_result.result.valid) 00368 _x = self 00369 start = end 00370 end += 12 00371 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00372 start = end 00373 end += 4 00374 (length,) = _struct_I.unpack(str[start:end]) 00375 start = end 00376 end += length 00377 self.action_feedback.header.frame_id = str[start:end] 00378 _x = self 00379 start = end 00380 end += 8 00381 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00382 start = end 00383 end += 4 00384 (length,) = _struct_I.unpack(str[start:end]) 00385 start = end 00386 end += length 00387 self.action_feedback.status.goal_id.id = str[start:end] 00388 start = end 00389 end += 1 00390 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00391 start = end 00392 end += 4 00393 (length,) = _struct_I.unpack(str[start:end]) 00394 start = end 00395 end += length 00396 self.action_feedback.status.text = str[start:end] 00397 return self 00398 except struct.error as e: 00399 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00400 00401 00402 def serialize_numpy(self, buff, numpy): 00403 """ 00404 serialize message with numpy array types into buffer 00405 @param buff: buffer 00406 @type buff: StringIO 00407 @param numpy: numpy python module 00408 @type numpy module 00409 """ 00410 try: 00411 _x = self 00412 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00413 _x = self.action_goal.header.frame_id 00414 length = len(_x) 00415 buff.write(struct.pack('<I%ss'%length, length, _x)) 00416 _x = self 00417 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00418 _x = self.action_goal.goal_id.id 00419 length = len(_x) 00420 buff.write(struct.pack('<I%ss'%length, length, _x)) 00421 length = len(self.action_goal.goal.gripper_poses) 00422 buff.write(_struct_I.pack(length)) 00423 for val1 in self.action_goal.goal.gripper_poses: 00424 _v11 = val1.header 00425 buff.write(_struct_I.pack(_v11.seq)) 00426 _v12 = _v11.stamp 00427 _x = _v12 00428 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00429 _x = _v11.frame_id 00430 length = len(_x) 00431 buff.write(struct.pack('<I%ss'%length, length, _x)) 00432 _v13 = val1.pose 00433 _v14 = _v13.position 00434 _x = _v14 00435 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00436 _v15 = _v13.orientation 00437 _x = _v15 00438 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00439 length = len(self.action_goal.goal.gripper_openings) 00440 buff.write(_struct_I.pack(length)) 00441 pattern = '<%sf'%length 00442 buff.write(self.action_goal.goal.gripper_openings.tostring()) 00443 _x = self 00444 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00445 _x = self.action_result.header.frame_id 00446 length = len(_x) 00447 buff.write(struct.pack('<I%ss'%length, length, _x)) 00448 _x = self 00449 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00450 _x = self.action_result.status.goal_id.id 00451 length = len(_x) 00452 buff.write(struct.pack('<I%ss'%length, length, _x)) 00453 buff.write(_struct_B.pack(self.action_result.status.status)) 00454 _x = self.action_result.status.text 00455 length = len(_x) 00456 buff.write(struct.pack('<I%ss'%length, length, _x)) 00457 length = len(self.action_result.result.valid) 00458 buff.write(_struct_I.pack(length)) 00459 pattern = '<%sB'%length 00460 buff.write(self.action_result.result.valid.tostring()) 00461 _x = self 00462 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00463 _x = self.action_feedback.header.frame_id 00464 length = len(_x) 00465 buff.write(struct.pack('<I%ss'%length, length, _x)) 00466 _x = self 00467 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00468 _x = self.action_feedback.status.goal_id.id 00469 length = len(_x) 00470 buff.write(struct.pack('<I%ss'%length, length, _x)) 00471 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00472 _x = self.action_feedback.status.text 00473 length = len(_x) 00474 buff.write(struct.pack('<I%ss'%length, length, _x)) 00475 except struct.error as se: self._check_types(se) 00476 except TypeError as te: self._check_types(te) 00477 00478 def deserialize_numpy(self, str, numpy): 00479 """ 00480 unpack serialized message in str into this message instance using numpy for array types 00481 @param str: byte array of serialized message 00482 @type str: str 00483 @param numpy: numpy python module 00484 @type numpy: module 00485 """ 00486 try: 00487 if self.action_goal is None: 00488 self.action_goal = pr2_object_manipulation_msgs.msg.TestGripperPoseActionGoal() 00489 if self.action_result is None: 00490 self.action_result = pr2_object_manipulation_msgs.msg.TestGripperPoseActionResult() 00491 if self.action_feedback is None: 00492 self.action_feedback = pr2_object_manipulation_msgs.msg.TestGripperPoseActionFeedback() 00493 end = 0 00494 _x = self 00495 start = end 00496 end += 12 00497 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00498 start = end 00499 end += 4 00500 (length,) = _struct_I.unpack(str[start:end]) 00501 start = end 00502 end += length 00503 self.action_goal.header.frame_id = str[start:end] 00504 _x = self 00505 start = end 00506 end += 8 00507 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00508 start = end 00509 end += 4 00510 (length,) = _struct_I.unpack(str[start:end]) 00511 start = end 00512 end += length 00513 self.action_goal.goal_id.id = str[start:end] 00514 start = end 00515 end += 4 00516 (length,) = _struct_I.unpack(str[start:end]) 00517 self.action_goal.goal.gripper_poses = [] 00518 for i in range(0, length): 00519 val1 = geometry_msgs.msg.PoseStamped() 00520 _v16 = val1.header 00521 start = end 00522 end += 4 00523 (_v16.seq,) = _struct_I.unpack(str[start:end]) 00524 _v17 = _v16.stamp 00525 _x = _v17 00526 start = end 00527 end += 8 00528 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00529 start = end 00530 end += 4 00531 (length,) = _struct_I.unpack(str[start:end]) 00532 start = end 00533 end += length 00534 _v16.frame_id = str[start:end] 00535 _v18 = val1.pose 00536 _v19 = _v18.position 00537 _x = _v19 00538 start = end 00539 end += 24 00540 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00541 _v20 = _v18.orientation 00542 _x = _v20 00543 start = end 00544 end += 32 00545 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00546 self.action_goal.goal.gripper_poses.append(val1) 00547 start = end 00548 end += 4 00549 (length,) = _struct_I.unpack(str[start:end]) 00550 pattern = '<%sf'%length 00551 start = end 00552 end += struct.calcsize(pattern) 00553 self.action_goal.goal.gripper_openings = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00554 _x = self 00555 start = end 00556 end += 12 00557 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00558 start = end 00559 end += 4 00560 (length,) = _struct_I.unpack(str[start:end]) 00561 start = end 00562 end += length 00563 self.action_result.header.frame_id = str[start:end] 00564 _x = self 00565 start = end 00566 end += 8 00567 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00568 start = end 00569 end += 4 00570 (length,) = _struct_I.unpack(str[start:end]) 00571 start = end 00572 end += length 00573 self.action_result.status.goal_id.id = str[start:end] 00574 start = end 00575 end += 1 00576 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00577 start = end 00578 end += 4 00579 (length,) = _struct_I.unpack(str[start:end]) 00580 start = end 00581 end += length 00582 self.action_result.status.text = str[start:end] 00583 start = end 00584 end += 4 00585 (length,) = _struct_I.unpack(str[start:end]) 00586 pattern = '<%sB'%length 00587 start = end 00588 end += struct.calcsize(pattern) 00589 self.action_result.result.valid = numpy.frombuffer(str[start:end], dtype=numpy.bool, count=length) 00590 self.action_result.result.valid = map(bool, self.action_result.result.valid) 00591 _x = self 00592 start = end 00593 end += 12 00594 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00595 start = end 00596 end += 4 00597 (length,) = _struct_I.unpack(str[start:end]) 00598 start = end 00599 end += length 00600 self.action_feedback.header.frame_id = str[start:end] 00601 _x = self 00602 start = end 00603 end += 8 00604 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00605 start = end 00606 end += 4 00607 (length,) = _struct_I.unpack(str[start:end]) 00608 start = end 00609 end += length 00610 self.action_feedback.status.goal_id.id = str[start:end] 00611 start = end 00612 end += 1 00613 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00614 start = end 00615 end += 4 00616 (length,) = _struct_I.unpack(str[start:end]) 00617 start = end 00618 end += length 00619 self.action_feedback.status.text = str[start:end] 00620 return self 00621 except struct.error as e: 00622 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00623 00624 _struct_I = roslib.message.struct_I 00625 _struct_B = struct.Struct("<B") 00626 _struct_3I = struct.Struct("<3I") 00627 _struct_4d = struct.Struct("<4d") 00628 _struct_2I = struct.Struct("<2I") 00629 _struct_3d = struct.Struct("<3d")