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