$search
00001 """autogenerated by genmsg_py from FindBasePoseActionResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import find_base_pose.msg 00006 import geometry_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class FindBasePoseActionResult(roslib.message.Message): 00012 _md5sum = "d8554e8e18272671cb5b1300f5e1efd5" 00013 _type = "find_base_pose/FindBasePoseActionResult" 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 FindBasePoseResult 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: find_base_pose/FindBasePoseResult 00080 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00081 geometry_msgs/PoseStamped[] base_poses 00082 00083 ================================================================================ 00084 MSG: geometry_msgs/PoseStamped 00085 # A Pose with reference coordinate frame and timestamp 00086 Header header 00087 Pose pose 00088 00089 ================================================================================ 00090 MSG: geometry_msgs/Pose 00091 # A representation of pose in free space, composed of postion and orientation. 00092 Point position 00093 Quaternion orientation 00094 00095 ================================================================================ 00096 MSG: geometry_msgs/Point 00097 # This contains the position of a point in free space 00098 float64 x 00099 float64 y 00100 float64 z 00101 00102 ================================================================================ 00103 MSG: geometry_msgs/Quaternion 00104 # This represents an orientation in free space in quaternion form. 00105 00106 float64 x 00107 float64 y 00108 float64 z 00109 float64 w 00110 00111 """ 00112 __slots__ = ['header','status','result'] 00113 _slot_types = ['Header','actionlib_msgs/GoalStatus','find_base_pose/FindBasePoseResult'] 00114 00115 def __init__(self, *args, **kwds): 00116 """ 00117 Constructor. Any message fields that are implicitly/explicitly 00118 set to None will be assigned a default value. The recommend 00119 use is keyword arguments as this is more robust to future message 00120 changes. You cannot mix in-order arguments and keyword arguments. 00121 00122 The available fields are: 00123 header,status,result 00124 00125 @param args: complete set of field values, in .msg order 00126 @param kwds: use keyword arguments corresponding to message field names 00127 to set specific fields. 00128 """ 00129 if args or kwds: 00130 super(FindBasePoseActionResult, self).__init__(*args, **kwds) 00131 #message fields cannot be None, assign default values for those that are 00132 if self.header is None: 00133 self.header = std_msgs.msg._Header.Header() 00134 if self.status is None: 00135 self.status = actionlib_msgs.msg.GoalStatus() 00136 if self.result is None: 00137 self.result = find_base_pose.msg.FindBasePoseResult() 00138 else: 00139 self.header = std_msgs.msg._Header.Header() 00140 self.status = actionlib_msgs.msg.GoalStatus() 00141 self.result = find_base_pose.msg.FindBasePoseResult() 00142 00143 def _get_types(self): 00144 """ 00145 internal API method 00146 """ 00147 return self._slot_types 00148 00149 def serialize(self, buff): 00150 """ 00151 serialize message into buffer 00152 @param buff: buffer 00153 @type buff: StringIO 00154 """ 00155 try: 00156 _x = self 00157 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00158 _x = self.header.frame_id 00159 length = len(_x) 00160 buff.write(struct.pack('<I%ss'%length, length, _x)) 00161 _x = self 00162 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00163 _x = self.status.goal_id.id 00164 length = len(_x) 00165 buff.write(struct.pack('<I%ss'%length, length, _x)) 00166 buff.write(_struct_B.pack(self.status.status)) 00167 _x = self.status.text 00168 length = len(_x) 00169 buff.write(struct.pack('<I%ss'%length, length, _x)) 00170 length = len(self.result.base_poses) 00171 buff.write(_struct_I.pack(length)) 00172 for val1 in self.result.base_poses: 00173 _v1 = val1.header 00174 buff.write(_struct_I.pack(_v1.seq)) 00175 _v2 = _v1.stamp 00176 _x = _v2 00177 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00178 _x = _v1.frame_id 00179 length = len(_x) 00180 buff.write(struct.pack('<I%ss'%length, length, _x)) 00181 _v3 = val1.pose 00182 _v4 = _v3.position 00183 _x = _v4 00184 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00185 _v5 = _v3.orientation 00186 _x = _v5 00187 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00188 except struct.error as se: self._check_types(se) 00189 except TypeError as te: self._check_types(te) 00190 00191 def deserialize(self, str): 00192 """ 00193 unpack serialized message in str into this message instance 00194 @param str: byte array of serialized message 00195 @type str: str 00196 """ 00197 try: 00198 if self.header is None: 00199 self.header = std_msgs.msg._Header.Header() 00200 if self.status is None: 00201 self.status = actionlib_msgs.msg.GoalStatus() 00202 if self.result is None: 00203 self.result = find_base_pose.msg.FindBasePoseResult() 00204 end = 0 00205 _x = self 00206 start = end 00207 end += 12 00208 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00209 start = end 00210 end += 4 00211 (length,) = _struct_I.unpack(str[start:end]) 00212 start = end 00213 end += length 00214 self.header.frame_id = str[start:end] 00215 _x = self 00216 start = end 00217 end += 8 00218 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00219 start = end 00220 end += 4 00221 (length,) = _struct_I.unpack(str[start:end]) 00222 start = end 00223 end += length 00224 self.status.goal_id.id = str[start:end] 00225 start = end 00226 end += 1 00227 (self.status.status,) = _struct_B.unpack(str[start:end]) 00228 start = end 00229 end += 4 00230 (length,) = _struct_I.unpack(str[start:end]) 00231 start = end 00232 end += length 00233 self.status.text = str[start:end] 00234 start = end 00235 end += 4 00236 (length,) = _struct_I.unpack(str[start:end]) 00237 self.result.base_poses = [] 00238 for i in range(0, length): 00239 val1 = geometry_msgs.msg.PoseStamped() 00240 _v6 = val1.header 00241 start = end 00242 end += 4 00243 (_v6.seq,) = _struct_I.unpack(str[start:end]) 00244 _v7 = _v6.stamp 00245 _x = _v7 00246 start = end 00247 end += 8 00248 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00249 start = end 00250 end += 4 00251 (length,) = _struct_I.unpack(str[start:end]) 00252 start = end 00253 end += length 00254 _v6.frame_id = str[start:end] 00255 _v8 = val1.pose 00256 _v9 = _v8.position 00257 _x = _v9 00258 start = end 00259 end += 24 00260 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00261 _v10 = _v8.orientation 00262 _x = _v10 00263 start = end 00264 end += 32 00265 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00266 self.result.base_poses.append(val1) 00267 return self 00268 except struct.error as e: 00269 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00270 00271 00272 def serialize_numpy(self, buff, numpy): 00273 """ 00274 serialize message with numpy array types into buffer 00275 @param buff: buffer 00276 @type buff: StringIO 00277 @param numpy: numpy python module 00278 @type numpy module 00279 """ 00280 try: 00281 _x = self 00282 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00283 _x = self.header.frame_id 00284 length = len(_x) 00285 buff.write(struct.pack('<I%ss'%length, length, _x)) 00286 _x = self 00287 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00288 _x = self.status.goal_id.id 00289 length = len(_x) 00290 buff.write(struct.pack('<I%ss'%length, length, _x)) 00291 buff.write(_struct_B.pack(self.status.status)) 00292 _x = self.status.text 00293 length = len(_x) 00294 buff.write(struct.pack('<I%ss'%length, length, _x)) 00295 length = len(self.result.base_poses) 00296 buff.write(_struct_I.pack(length)) 00297 for val1 in self.result.base_poses: 00298 _v11 = val1.header 00299 buff.write(_struct_I.pack(_v11.seq)) 00300 _v12 = _v11.stamp 00301 _x = _v12 00302 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00303 _x = _v11.frame_id 00304 length = len(_x) 00305 buff.write(struct.pack('<I%ss'%length, length, _x)) 00306 _v13 = val1.pose 00307 _v14 = _v13.position 00308 _x = _v14 00309 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00310 _v15 = _v13.orientation 00311 _x = _v15 00312 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00313 except struct.error as se: self._check_types(se) 00314 except TypeError as te: self._check_types(te) 00315 00316 def deserialize_numpy(self, str, numpy): 00317 """ 00318 unpack serialized message in str into this message instance using numpy for array types 00319 @param str: byte array of serialized message 00320 @type str: str 00321 @param numpy: numpy python module 00322 @type numpy: module 00323 """ 00324 try: 00325 if self.header is None: 00326 self.header = std_msgs.msg._Header.Header() 00327 if self.status is None: 00328 self.status = actionlib_msgs.msg.GoalStatus() 00329 if self.result is None: 00330 self.result = find_base_pose.msg.FindBasePoseResult() 00331 end = 0 00332 _x = self 00333 start = end 00334 end += 12 00335 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00336 start = end 00337 end += 4 00338 (length,) = _struct_I.unpack(str[start:end]) 00339 start = end 00340 end += length 00341 self.header.frame_id = str[start:end] 00342 _x = self 00343 start = end 00344 end += 8 00345 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00346 start = end 00347 end += 4 00348 (length,) = _struct_I.unpack(str[start:end]) 00349 start = end 00350 end += length 00351 self.status.goal_id.id = str[start:end] 00352 start = end 00353 end += 1 00354 (self.status.status,) = _struct_B.unpack(str[start:end]) 00355 start = end 00356 end += 4 00357 (length,) = _struct_I.unpack(str[start:end]) 00358 start = end 00359 end += length 00360 self.status.text = str[start:end] 00361 start = end 00362 end += 4 00363 (length,) = _struct_I.unpack(str[start:end]) 00364 self.result.base_poses = [] 00365 for i in range(0, length): 00366 val1 = geometry_msgs.msg.PoseStamped() 00367 _v16 = val1.header 00368 start = end 00369 end += 4 00370 (_v16.seq,) = _struct_I.unpack(str[start:end]) 00371 _v17 = _v16.stamp 00372 _x = _v17 00373 start = end 00374 end += 8 00375 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00376 start = end 00377 end += 4 00378 (length,) = _struct_I.unpack(str[start:end]) 00379 start = end 00380 end += length 00381 _v16.frame_id = str[start:end] 00382 _v18 = val1.pose 00383 _v19 = _v18.position 00384 _x = _v19 00385 start = end 00386 end += 24 00387 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00388 _v20 = _v18.orientation 00389 _x = _v20 00390 start = end 00391 end += 32 00392 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00393 self.result.base_poses.append(val1) 00394 return self 00395 except struct.error as e: 00396 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00397 00398 _struct_I = roslib.message.struct_I 00399 _struct_B = struct.Struct("<B") 00400 _struct_3I = struct.Struct("<3I") 00401 _struct_4d = struct.Struct("<4d") 00402 _struct_2I = struct.Struct("<2I") 00403 _struct_3d = struct.Struct("<3d")