$search
00001 """autogenerated by genmsg_py from PlaceActionResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import object_manipulation_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class PlaceActionResult(roslib.message.Message): 00012 _md5sum = "df8a4d17f57aaf41c7039f0808224d11" 00013 _type = "object_manipulation_msgs/PlaceActionResult" 00014 _has_header = True #flag to mark the presence of a Header object 00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00016 00017 Header header 00018 actionlib_msgs/GoalStatus status 00019 PlaceResult result 00020 00021 ================================================================================ 00022 MSG: std_msgs/Header 00023 # Standard metadata for higher-level stamped data types. 00024 # This is generally used to communicate timestamped data 00025 # in a particular coordinate frame. 00026 # 00027 # sequence ID: consecutively increasing ID 00028 uint32 seq 00029 #Two-integer timestamp that is expressed as: 00030 # * stamp.secs: seconds (stamp_secs) since epoch 00031 # * stamp.nsecs: nanoseconds since stamp_secs 00032 # time-handling sugar is provided by the client library 00033 time stamp 00034 #Frame this data is associated with 00035 # 0: no frame 00036 # 1: global frame 00037 string frame_id 00038 00039 ================================================================================ 00040 MSG: actionlib_msgs/GoalStatus 00041 GoalID goal_id 00042 uint8 status 00043 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00044 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00045 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00046 # and has since completed its execution (Terminal State) 00047 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00048 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00049 # to some failure (Terminal State) 00050 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00051 # because the goal was unattainable or invalid (Terminal State) 00052 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00053 # and has not yet completed execution 00054 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00055 # but the action server has not yet confirmed that the goal is canceled 00056 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00057 # and was successfully cancelled (Terminal State) 00058 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00059 # sent over the wire by an action server 00060 00061 #Allow for the user to associate a string with GoalStatus for debugging 00062 string text 00063 00064 00065 ================================================================================ 00066 MSG: actionlib_msgs/GoalID 00067 # The stamp should store the time at which this goal was requested. 00068 # It is used by an action server when it tries to preempt all 00069 # goals that were requested before a certain time 00070 time stamp 00071 00072 # The id provides a way to associate feedback and 00073 # result message with specific goal requests. The id 00074 # specified must be unique. 00075 string id 00076 00077 00078 ================================================================================ 00079 MSG: object_manipulation_msgs/PlaceResult 00080 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00081 00082 # The result of the pickup attempt 00083 ManipulationResult manipulation_result 00084 00085 # The successful place location, if any 00086 geometry_msgs/PoseStamped place_location 00087 00088 # the list of attempted locations, in the order in which they were attempted 00089 # the successful one should be the last one in this list 00090 geometry_msgs/PoseStamped[] attempted_locations 00091 00092 # the outcomes of the attempted locations, in the same order as attempted_locations 00093 PlaceLocationResult[] attempted_location_results 00094 00095 00096 ================================================================================ 00097 MSG: object_manipulation_msgs/ManipulationResult 00098 # Result codes for manipulation tasks 00099 00100 # task completed as expected 00101 # generally means you can proceed as planned 00102 int32 SUCCESS = 1 00103 00104 # task not possible (e.g. out of reach or obstacles in the way) 00105 # generally means that the world was not disturbed, so you can try another task 00106 int32 UNFEASIBLE = -1 00107 00108 # task was thought possible, but failed due to unexpected events during execution 00109 # it is likely that the world was disturbed, so you are encouraged to refresh 00110 # your sensed world model before proceeding to another task 00111 int32 FAILED = -2 00112 00113 # a lower level error prevented task completion (e.g. joint controller not responding) 00114 # generally requires human attention 00115 int32 ERROR = -3 00116 00117 # means that at some point during execution we ended up in a state that the collision-aware 00118 # arm navigation module will not move out of. The world was likely not disturbed, but you 00119 # probably need a new collision map to move the arm out of the stuck position 00120 int32 ARM_MOVEMENT_PREVENTED = -4 00121 00122 # specific to grasp actions 00123 # the object was grasped successfully, but the lift attempt could not achieve the minimum lift distance requested 00124 # it is likely that the collision environment will see collisions between the hand/object and the support surface 00125 int32 LIFT_FAILED = -5 00126 00127 # specific to place actions 00128 # the object was placed successfully, but the retreat attempt could not achieve the minimum retreat distance requested 00129 # it is likely that the collision environment will see collisions between the hand and the object 00130 int32 RETREAT_FAILED = -6 00131 00132 # indicates that somewhere along the line a human said "wait, stop, this is bad, go back and do something else" 00133 int32 CANCELLED = -7 00134 00135 # the actual value of this error code 00136 int32 value 00137 00138 ================================================================================ 00139 MSG: geometry_msgs/PoseStamped 00140 # A Pose with reference coordinate frame and timestamp 00141 Header header 00142 Pose pose 00143 00144 ================================================================================ 00145 MSG: geometry_msgs/Pose 00146 # A representation of pose in free space, composed of postion and orientation. 00147 Point position 00148 Quaternion orientation 00149 00150 ================================================================================ 00151 MSG: geometry_msgs/Point 00152 # This contains the position of a point in free space 00153 float64 x 00154 float64 y 00155 float64 z 00156 00157 ================================================================================ 00158 MSG: geometry_msgs/Quaternion 00159 # This represents an orientation in free space in quaternion form. 00160 00161 float64 x 00162 float64 y 00163 float64 z 00164 float64 w 00165 00166 ================================================================================ 00167 MSG: object_manipulation_msgs/PlaceLocationResult 00168 int32 SUCCESS = 1 00169 int32 PLACE_OUT_OF_REACH = 2 00170 int32 PLACE_IN_COLLISION = 3 00171 int32 PLACE_UNFEASIBLE = 4 00172 int32 PREPLACE_OUT_OF_REACH = 5 00173 int32 PREPLACE_IN_COLLISION = 6 00174 int32 PREPLACE_UNFEASIBLE = 7 00175 int32 RETREAT_OUT_OF_REACH = 8 00176 int32 RETREAT_IN_COLLISION = 9 00177 int32 RETREAT_UNFEASIBLE = 10 00178 int32 MOVE_ARM_FAILED = 11 00179 int32 PLACE_FAILED = 12 00180 int32 RETREAT_FAILED = 13 00181 int32 result_code 00182 00183 # whether the state of the world was disturbed by this attempt. generally, this flag 00184 # shows if another task can be attempted, or a new sensed world model is recommeded 00185 # before proceeding 00186 bool continuation_possible 00187 00188 """ 00189 __slots__ = ['header','status','result'] 00190 _slot_types = ['Header','actionlib_msgs/GoalStatus','object_manipulation_msgs/PlaceResult'] 00191 00192 def __init__(self, *args, **kwds): 00193 """ 00194 Constructor. Any message fields that are implicitly/explicitly 00195 set to None will be assigned a default value. The recommend 00196 use is keyword arguments as this is more robust to future message 00197 changes. You cannot mix in-order arguments and keyword arguments. 00198 00199 The available fields are: 00200 header,status,result 00201 00202 @param args: complete set of field values, in .msg order 00203 @param kwds: use keyword arguments corresponding to message field names 00204 to set specific fields. 00205 """ 00206 if args or kwds: 00207 super(PlaceActionResult, self).__init__(*args, **kwds) 00208 #message fields cannot be None, assign default values for those that are 00209 if self.header is None: 00210 self.header = std_msgs.msg._Header.Header() 00211 if self.status is None: 00212 self.status = actionlib_msgs.msg.GoalStatus() 00213 if self.result is None: 00214 self.result = object_manipulation_msgs.msg.PlaceResult() 00215 else: 00216 self.header = std_msgs.msg._Header.Header() 00217 self.status = actionlib_msgs.msg.GoalStatus() 00218 self.result = object_manipulation_msgs.msg.PlaceResult() 00219 00220 def _get_types(self): 00221 """ 00222 internal API method 00223 """ 00224 return self._slot_types 00225 00226 def serialize(self, buff): 00227 """ 00228 serialize message into buffer 00229 @param buff: buffer 00230 @type buff: StringIO 00231 """ 00232 try: 00233 _x = self 00234 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00235 _x = self.header.frame_id 00236 length = len(_x) 00237 buff.write(struct.pack('<I%ss'%length, length, _x)) 00238 _x = self 00239 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00240 _x = self.status.goal_id.id 00241 length = len(_x) 00242 buff.write(struct.pack('<I%ss'%length, length, _x)) 00243 buff.write(_struct_B.pack(self.status.status)) 00244 _x = self.status.text 00245 length = len(_x) 00246 buff.write(struct.pack('<I%ss'%length, length, _x)) 00247 _x = self 00248 buff.write(_struct_i3I.pack(_x.result.manipulation_result.value, _x.result.place_location.header.seq, _x.result.place_location.header.stamp.secs, _x.result.place_location.header.stamp.nsecs)) 00249 _x = self.result.place_location.header.frame_id 00250 length = len(_x) 00251 buff.write(struct.pack('<I%ss'%length, length, _x)) 00252 _x = self 00253 buff.write(_struct_7d.pack(_x.result.place_location.pose.position.x, _x.result.place_location.pose.position.y, _x.result.place_location.pose.position.z, _x.result.place_location.pose.orientation.x, _x.result.place_location.pose.orientation.y, _x.result.place_location.pose.orientation.z, _x.result.place_location.pose.orientation.w)) 00254 length = len(self.result.attempted_locations) 00255 buff.write(_struct_I.pack(length)) 00256 for val1 in self.result.attempted_locations: 00257 _v1 = val1.header 00258 buff.write(_struct_I.pack(_v1.seq)) 00259 _v2 = _v1.stamp 00260 _x = _v2 00261 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00262 _x = _v1.frame_id 00263 length = len(_x) 00264 buff.write(struct.pack('<I%ss'%length, length, _x)) 00265 _v3 = val1.pose 00266 _v4 = _v3.position 00267 _x = _v4 00268 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00269 _v5 = _v3.orientation 00270 _x = _v5 00271 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00272 length = len(self.result.attempted_location_results) 00273 buff.write(_struct_I.pack(length)) 00274 for val1 in self.result.attempted_location_results: 00275 _x = val1 00276 buff.write(_struct_iB.pack(_x.result_code, _x.continuation_possible)) 00277 except struct.error as se: self._check_types(se) 00278 except TypeError as te: self._check_types(te) 00279 00280 def deserialize(self, str): 00281 """ 00282 unpack serialized message in str into this message instance 00283 @param str: byte array of serialized message 00284 @type str: str 00285 """ 00286 try: 00287 if self.header is None: 00288 self.header = std_msgs.msg._Header.Header() 00289 if self.status is None: 00290 self.status = actionlib_msgs.msg.GoalStatus() 00291 if self.result is None: 00292 self.result = object_manipulation_msgs.msg.PlaceResult() 00293 end = 0 00294 _x = self 00295 start = end 00296 end += 12 00297 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00298 start = end 00299 end += 4 00300 (length,) = _struct_I.unpack(str[start:end]) 00301 start = end 00302 end += length 00303 self.header.frame_id = str[start:end] 00304 _x = self 00305 start = end 00306 end += 8 00307 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00308 start = end 00309 end += 4 00310 (length,) = _struct_I.unpack(str[start:end]) 00311 start = end 00312 end += length 00313 self.status.goal_id.id = str[start:end] 00314 start = end 00315 end += 1 00316 (self.status.status,) = _struct_B.unpack(str[start:end]) 00317 start = end 00318 end += 4 00319 (length,) = _struct_I.unpack(str[start:end]) 00320 start = end 00321 end += length 00322 self.status.text = str[start:end] 00323 _x = self 00324 start = end 00325 end += 16 00326 (_x.result.manipulation_result.value, _x.result.place_location.header.seq, _x.result.place_location.header.stamp.secs, _x.result.place_location.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end]) 00327 start = end 00328 end += 4 00329 (length,) = _struct_I.unpack(str[start:end]) 00330 start = end 00331 end += length 00332 self.result.place_location.header.frame_id = str[start:end] 00333 _x = self 00334 start = end 00335 end += 56 00336 (_x.result.place_location.pose.position.x, _x.result.place_location.pose.position.y, _x.result.place_location.pose.position.z, _x.result.place_location.pose.orientation.x, _x.result.place_location.pose.orientation.y, _x.result.place_location.pose.orientation.z, _x.result.place_location.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00337 start = end 00338 end += 4 00339 (length,) = _struct_I.unpack(str[start:end]) 00340 self.result.attempted_locations = [] 00341 for i in range(0, length): 00342 val1 = geometry_msgs.msg.PoseStamped() 00343 _v6 = val1.header 00344 start = end 00345 end += 4 00346 (_v6.seq,) = _struct_I.unpack(str[start:end]) 00347 _v7 = _v6.stamp 00348 _x = _v7 00349 start = end 00350 end += 8 00351 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00352 start = end 00353 end += 4 00354 (length,) = _struct_I.unpack(str[start:end]) 00355 start = end 00356 end += length 00357 _v6.frame_id = str[start:end] 00358 _v8 = val1.pose 00359 _v9 = _v8.position 00360 _x = _v9 00361 start = end 00362 end += 24 00363 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00364 _v10 = _v8.orientation 00365 _x = _v10 00366 start = end 00367 end += 32 00368 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00369 self.result.attempted_locations.append(val1) 00370 start = end 00371 end += 4 00372 (length,) = _struct_I.unpack(str[start:end]) 00373 self.result.attempted_location_results = [] 00374 for i in range(0, length): 00375 val1 = object_manipulation_msgs.msg.PlaceLocationResult() 00376 _x = val1 00377 start = end 00378 end += 5 00379 (_x.result_code, _x.continuation_possible,) = _struct_iB.unpack(str[start:end]) 00380 val1.continuation_possible = bool(val1.continuation_possible) 00381 self.result.attempted_location_results.append(val1) 00382 return self 00383 except struct.error as e: 00384 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00385 00386 00387 def serialize_numpy(self, buff, numpy): 00388 """ 00389 serialize message with numpy array types into buffer 00390 @param buff: buffer 00391 @type buff: StringIO 00392 @param numpy: numpy python module 00393 @type numpy module 00394 """ 00395 try: 00396 _x = self 00397 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00398 _x = self.header.frame_id 00399 length = len(_x) 00400 buff.write(struct.pack('<I%ss'%length, length, _x)) 00401 _x = self 00402 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00403 _x = self.status.goal_id.id 00404 length = len(_x) 00405 buff.write(struct.pack('<I%ss'%length, length, _x)) 00406 buff.write(_struct_B.pack(self.status.status)) 00407 _x = self.status.text 00408 length = len(_x) 00409 buff.write(struct.pack('<I%ss'%length, length, _x)) 00410 _x = self 00411 buff.write(_struct_i3I.pack(_x.result.manipulation_result.value, _x.result.place_location.header.seq, _x.result.place_location.header.stamp.secs, _x.result.place_location.header.stamp.nsecs)) 00412 _x = self.result.place_location.header.frame_id 00413 length = len(_x) 00414 buff.write(struct.pack('<I%ss'%length, length, _x)) 00415 _x = self 00416 buff.write(_struct_7d.pack(_x.result.place_location.pose.position.x, _x.result.place_location.pose.position.y, _x.result.place_location.pose.position.z, _x.result.place_location.pose.orientation.x, _x.result.place_location.pose.orientation.y, _x.result.place_location.pose.orientation.z, _x.result.place_location.pose.orientation.w)) 00417 length = len(self.result.attempted_locations) 00418 buff.write(_struct_I.pack(length)) 00419 for val1 in self.result.attempted_locations: 00420 _v11 = val1.header 00421 buff.write(_struct_I.pack(_v11.seq)) 00422 _v12 = _v11.stamp 00423 _x = _v12 00424 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00425 _x = _v11.frame_id 00426 length = len(_x) 00427 buff.write(struct.pack('<I%ss'%length, length, _x)) 00428 _v13 = val1.pose 00429 _v14 = _v13.position 00430 _x = _v14 00431 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00432 _v15 = _v13.orientation 00433 _x = _v15 00434 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00435 length = len(self.result.attempted_location_results) 00436 buff.write(_struct_I.pack(length)) 00437 for val1 in self.result.attempted_location_results: 00438 _x = val1 00439 buff.write(_struct_iB.pack(_x.result_code, _x.continuation_possible)) 00440 except struct.error as se: self._check_types(se) 00441 except TypeError as te: self._check_types(te) 00442 00443 def deserialize_numpy(self, str, numpy): 00444 """ 00445 unpack serialized message in str into this message instance using numpy for array types 00446 @param str: byte array of serialized message 00447 @type str: str 00448 @param numpy: numpy python module 00449 @type numpy: module 00450 """ 00451 try: 00452 if self.header is None: 00453 self.header = std_msgs.msg._Header.Header() 00454 if self.status is None: 00455 self.status = actionlib_msgs.msg.GoalStatus() 00456 if self.result is None: 00457 self.result = object_manipulation_msgs.msg.PlaceResult() 00458 end = 0 00459 _x = self 00460 start = end 00461 end += 12 00462 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00463 start = end 00464 end += 4 00465 (length,) = _struct_I.unpack(str[start:end]) 00466 start = end 00467 end += length 00468 self.header.frame_id = str[start:end] 00469 _x = self 00470 start = end 00471 end += 8 00472 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00473 start = end 00474 end += 4 00475 (length,) = _struct_I.unpack(str[start:end]) 00476 start = end 00477 end += length 00478 self.status.goal_id.id = str[start:end] 00479 start = end 00480 end += 1 00481 (self.status.status,) = _struct_B.unpack(str[start:end]) 00482 start = end 00483 end += 4 00484 (length,) = _struct_I.unpack(str[start:end]) 00485 start = end 00486 end += length 00487 self.status.text = str[start:end] 00488 _x = self 00489 start = end 00490 end += 16 00491 (_x.result.manipulation_result.value, _x.result.place_location.header.seq, _x.result.place_location.header.stamp.secs, _x.result.place_location.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end]) 00492 start = end 00493 end += 4 00494 (length,) = _struct_I.unpack(str[start:end]) 00495 start = end 00496 end += length 00497 self.result.place_location.header.frame_id = str[start:end] 00498 _x = self 00499 start = end 00500 end += 56 00501 (_x.result.place_location.pose.position.x, _x.result.place_location.pose.position.y, _x.result.place_location.pose.position.z, _x.result.place_location.pose.orientation.x, _x.result.place_location.pose.orientation.y, _x.result.place_location.pose.orientation.z, _x.result.place_location.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00502 start = end 00503 end += 4 00504 (length,) = _struct_I.unpack(str[start:end]) 00505 self.result.attempted_locations = [] 00506 for i in range(0, length): 00507 val1 = geometry_msgs.msg.PoseStamped() 00508 _v16 = val1.header 00509 start = end 00510 end += 4 00511 (_v16.seq,) = _struct_I.unpack(str[start:end]) 00512 _v17 = _v16.stamp 00513 _x = _v17 00514 start = end 00515 end += 8 00516 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00517 start = end 00518 end += 4 00519 (length,) = _struct_I.unpack(str[start:end]) 00520 start = end 00521 end += length 00522 _v16.frame_id = str[start:end] 00523 _v18 = val1.pose 00524 _v19 = _v18.position 00525 _x = _v19 00526 start = end 00527 end += 24 00528 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00529 _v20 = _v18.orientation 00530 _x = _v20 00531 start = end 00532 end += 32 00533 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00534 self.result.attempted_locations.append(val1) 00535 start = end 00536 end += 4 00537 (length,) = _struct_I.unpack(str[start:end]) 00538 self.result.attempted_location_results = [] 00539 for i in range(0, length): 00540 val1 = object_manipulation_msgs.msg.PlaceLocationResult() 00541 _x = val1 00542 start = end 00543 end += 5 00544 (_x.result_code, _x.continuation_possible,) = _struct_iB.unpack(str[start:end]) 00545 val1.continuation_possible = bool(val1.continuation_possible) 00546 self.result.attempted_location_results.append(val1) 00547 return self 00548 except struct.error as e: 00549 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00550 00551 _struct_I = roslib.message.struct_I 00552 _struct_B = struct.Struct("<B") 00553 _struct_i3I = struct.Struct("<i3I") 00554 _struct_3I = struct.Struct("<3I") 00555 _struct_7d = struct.Struct("<7d") 00556 _struct_4d = struct.Struct("<4d") 00557 _struct_iB = struct.Struct("<iB") 00558 _struct_2I = struct.Struct("<2I") 00559 _struct_3d = struct.Struct("<3d")