$search
00001 """autogenerated by genmsg_py from TableObjectClusterActionResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import sensor_msgs.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import cob_3d_mapping_msgs.msg 00009 import std_msgs.msg 00010 00011 class TableObjectClusterActionResult(roslib.message.Message): 00012 _md5sum = "065046b0b318842e65d9822759228431" 00013 _type = "cob_3d_mapping_msgs/TableObjectClusterActionResult" 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 TableObjectClusterResult 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: cob_3d_mapping_msgs/TableObjectClusterResult 00080 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00081 #result definition 00082 sensor_msgs/PointCloud2[] bounding_boxes 00083 00084 ================================================================================ 00085 MSG: sensor_msgs/PointCloud2 00086 # This message holds a collection of N-dimensional points, which may 00087 # contain additional information such as normals, intensity, etc. The 00088 # point data is stored as a binary blob, its layout described by the 00089 # contents of the "fields" array. 00090 00091 # The point cloud data may be organized 2d (image-like) or 1d 00092 # (unordered). Point clouds organized as 2d images may be produced by 00093 # camera depth sensors such as stereo or time-of-flight. 00094 00095 # Time of sensor data acquisition, and the coordinate frame ID (for 3d 00096 # points). 00097 Header header 00098 00099 # 2D structure of the point cloud. If the cloud is unordered, height is 00100 # 1 and width is the length of the point cloud. 00101 uint32 height 00102 uint32 width 00103 00104 # Describes the channels and their layout in the binary data blob. 00105 PointField[] fields 00106 00107 bool is_bigendian # Is this data bigendian? 00108 uint32 point_step # Length of a point in bytes 00109 uint32 row_step # Length of a row in bytes 00110 uint8[] data # Actual point data, size is (row_step*height) 00111 00112 bool is_dense # True if there are no invalid points 00113 00114 ================================================================================ 00115 MSG: sensor_msgs/PointField 00116 # This message holds the description of one point entry in the 00117 # PointCloud2 message format. 00118 uint8 INT8 = 1 00119 uint8 UINT8 = 2 00120 uint8 INT16 = 3 00121 uint8 UINT16 = 4 00122 uint8 INT32 = 5 00123 uint8 UINT32 = 6 00124 uint8 FLOAT32 = 7 00125 uint8 FLOAT64 = 8 00126 00127 string name # Name of field 00128 uint32 offset # Offset from start of point struct 00129 uint8 datatype # Datatype enumeration, see above 00130 uint32 count # How many elements in the field 00131 00132 """ 00133 __slots__ = ['header','status','result'] 00134 _slot_types = ['Header','actionlib_msgs/GoalStatus','cob_3d_mapping_msgs/TableObjectClusterResult'] 00135 00136 def __init__(self, *args, **kwds): 00137 """ 00138 Constructor. Any message fields that are implicitly/explicitly 00139 set to None will be assigned a default value. The recommend 00140 use is keyword arguments as this is more robust to future message 00141 changes. You cannot mix in-order arguments and keyword arguments. 00142 00143 The available fields are: 00144 header,status,result 00145 00146 @param args: complete set of field values, in .msg order 00147 @param kwds: use keyword arguments corresponding to message field names 00148 to set specific fields. 00149 """ 00150 if args or kwds: 00151 super(TableObjectClusterActionResult, self).__init__(*args, **kwds) 00152 #message fields cannot be None, assign default values for those that are 00153 if self.header is None: 00154 self.header = std_msgs.msg._Header.Header() 00155 if self.status is None: 00156 self.status = actionlib_msgs.msg.GoalStatus() 00157 if self.result is None: 00158 self.result = cob_3d_mapping_msgs.msg.TableObjectClusterResult() 00159 else: 00160 self.header = std_msgs.msg._Header.Header() 00161 self.status = actionlib_msgs.msg.GoalStatus() 00162 self.result = cob_3d_mapping_msgs.msg.TableObjectClusterResult() 00163 00164 def _get_types(self): 00165 """ 00166 internal API method 00167 """ 00168 return self._slot_types 00169 00170 def serialize(self, buff): 00171 """ 00172 serialize message into buffer 00173 @param buff: buffer 00174 @type buff: StringIO 00175 """ 00176 try: 00177 _x = self 00178 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00179 _x = self.header.frame_id 00180 length = len(_x) 00181 buff.write(struct.pack('<I%ss'%length, length, _x)) 00182 _x = self 00183 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00184 _x = self.status.goal_id.id 00185 length = len(_x) 00186 buff.write(struct.pack('<I%ss'%length, length, _x)) 00187 buff.write(_struct_B.pack(self.status.status)) 00188 _x = self.status.text 00189 length = len(_x) 00190 buff.write(struct.pack('<I%ss'%length, length, _x)) 00191 length = len(self.result.bounding_boxes) 00192 buff.write(_struct_I.pack(length)) 00193 for val1 in self.result.bounding_boxes: 00194 _v1 = val1.header 00195 buff.write(_struct_I.pack(_v1.seq)) 00196 _v2 = _v1.stamp 00197 _x = _v2 00198 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00199 _x = _v1.frame_id 00200 length = len(_x) 00201 buff.write(struct.pack('<I%ss'%length, length, _x)) 00202 _x = val1 00203 buff.write(_struct_2I.pack(_x.height, _x.width)) 00204 length = len(val1.fields) 00205 buff.write(_struct_I.pack(length)) 00206 for val2 in val1.fields: 00207 _x = val2.name 00208 length = len(_x) 00209 buff.write(struct.pack('<I%ss'%length, length, _x)) 00210 _x = val2 00211 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00212 _x = val1 00213 buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step)) 00214 _x = val1.data 00215 length = len(_x) 00216 # - if encoded as a list instead, serialize as bytes instead of string 00217 if type(_x) in [list, tuple]: 00218 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00219 else: 00220 buff.write(struct.pack('<I%ss'%length, length, _x)) 00221 buff.write(_struct_B.pack(val1.is_dense)) 00222 except struct.error as se: self._check_types(se) 00223 except TypeError as te: self._check_types(te) 00224 00225 def deserialize(self, str): 00226 """ 00227 unpack serialized message in str into this message instance 00228 @param str: byte array of serialized message 00229 @type str: str 00230 """ 00231 try: 00232 if self.header is None: 00233 self.header = std_msgs.msg._Header.Header() 00234 if self.status is None: 00235 self.status = actionlib_msgs.msg.GoalStatus() 00236 if self.result is None: 00237 self.result = cob_3d_mapping_msgs.msg.TableObjectClusterResult() 00238 end = 0 00239 _x = self 00240 start = end 00241 end += 12 00242 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00243 start = end 00244 end += 4 00245 (length,) = _struct_I.unpack(str[start:end]) 00246 start = end 00247 end += length 00248 self.header.frame_id = str[start:end] 00249 _x = self 00250 start = end 00251 end += 8 00252 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00253 start = end 00254 end += 4 00255 (length,) = _struct_I.unpack(str[start:end]) 00256 start = end 00257 end += length 00258 self.status.goal_id.id = str[start:end] 00259 start = end 00260 end += 1 00261 (self.status.status,) = _struct_B.unpack(str[start:end]) 00262 start = end 00263 end += 4 00264 (length,) = _struct_I.unpack(str[start:end]) 00265 start = end 00266 end += length 00267 self.status.text = str[start:end] 00268 start = end 00269 end += 4 00270 (length,) = _struct_I.unpack(str[start:end]) 00271 self.result.bounding_boxes = [] 00272 for i in range(0, length): 00273 val1 = sensor_msgs.msg.PointCloud2() 00274 _v3 = val1.header 00275 start = end 00276 end += 4 00277 (_v3.seq,) = _struct_I.unpack(str[start:end]) 00278 _v4 = _v3.stamp 00279 _x = _v4 00280 start = end 00281 end += 8 00282 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00283 start = end 00284 end += 4 00285 (length,) = _struct_I.unpack(str[start:end]) 00286 start = end 00287 end += length 00288 _v3.frame_id = str[start:end] 00289 _x = val1 00290 start = end 00291 end += 8 00292 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00293 start = end 00294 end += 4 00295 (length,) = _struct_I.unpack(str[start:end]) 00296 val1.fields = [] 00297 for i in range(0, length): 00298 val2 = sensor_msgs.msg.PointField() 00299 start = end 00300 end += 4 00301 (length,) = _struct_I.unpack(str[start:end]) 00302 start = end 00303 end += length 00304 val2.name = str[start:end] 00305 _x = val2 00306 start = end 00307 end += 9 00308 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00309 val1.fields.append(val2) 00310 _x = val1 00311 start = end 00312 end += 9 00313 (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end]) 00314 val1.is_bigendian = bool(val1.is_bigendian) 00315 start = end 00316 end += 4 00317 (length,) = _struct_I.unpack(str[start:end]) 00318 start = end 00319 end += length 00320 val1.data = str[start:end] 00321 start = end 00322 end += 1 00323 (val1.is_dense,) = _struct_B.unpack(str[start:end]) 00324 val1.is_dense = bool(val1.is_dense) 00325 self.result.bounding_boxes.append(val1) 00326 return self 00327 except struct.error as e: 00328 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00329 00330 00331 def serialize_numpy(self, buff, numpy): 00332 """ 00333 serialize message with numpy array types into buffer 00334 @param buff: buffer 00335 @type buff: StringIO 00336 @param numpy: numpy python module 00337 @type numpy module 00338 """ 00339 try: 00340 _x = self 00341 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00342 _x = self.header.frame_id 00343 length = len(_x) 00344 buff.write(struct.pack('<I%ss'%length, length, _x)) 00345 _x = self 00346 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00347 _x = self.status.goal_id.id 00348 length = len(_x) 00349 buff.write(struct.pack('<I%ss'%length, length, _x)) 00350 buff.write(_struct_B.pack(self.status.status)) 00351 _x = self.status.text 00352 length = len(_x) 00353 buff.write(struct.pack('<I%ss'%length, length, _x)) 00354 length = len(self.result.bounding_boxes) 00355 buff.write(_struct_I.pack(length)) 00356 for val1 in self.result.bounding_boxes: 00357 _v5 = val1.header 00358 buff.write(_struct_I.pack(_v5.seq)) 00359 _v6 = _v5.stamp 00360 _x = _v6 00361 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00362 _x = _v5.frame_id 00363 length = len(_x) 00364 buff.write(struct.pack('<I%ss'%length, length, _x)) 00365 _x = val1 00366 buff.write(_struct_2I.pack(_x.height, _x.width)) 00367 length = len(val1.fields) 00368 buff.write(_struct_I.pack(length)) 00369 for val2 in val1.fields: 00370 _x = val2.name 00371 length = len(_x) 00372 buff.write(struct.pack('<I%ss'%length, length, _x)) 00373 _x = val2 00374 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00375 _x = val1 00376 buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step)) 00377 _x = val1.data 00378 length = len(_x) 00379 # - if encoded as a list instead, serialize as bytes instead of string 00380 if type(_x) in [list, tuple]: 00381 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00382 else: 00383 buff.write(struct.pack('<I%ss'%length, length, _x)) 00384 buff.write(_struct_B.pack(val1.is_dense)) 00385 except struct.error as se: self._check_types(se) 00386 except TypeError as te: self._check_types(te) 00387 00388 def deserialize_numpy(self, str, numpy): 00389 """ 00390 unpack serialized message in str into this message instance using numpy for array types 00391 @param str: byte array of serialized message 00392 @type str: str 00393 @param numpy: numpy python module 00394 @type numpy: module 00395 """ 00396 try: 00397 if self.header is None: 00398 self.header = std_msgs.msg._Header.Header() 00399 if self.status is None: 00400 self.status = actionlib_msgs.msg.GoalStatus() 00401 if self.result is None: 00402 self.result = cob_3d_mapping_msgs.msg.TableObjectClusterResult() 00403 end = 0 00404 _x = self 00405 start = end 00406 end += 12 00407 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00408 start = end 00409 end += 4 00410 (length,) = _struct_I.unpack(str[start:end]) 00411 start = end 00412 end += length 00413 self.header.frame_id = str[start:end] 00414 _x = self 00415 start = end 00416 end += 8 00417 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00418 start = end 00419 end += 4 00420 (length,) = _struct_I.unpack(str[start:end]) 00421 start = end 00422 end += length 00423 self.status.goal_id.id = str[start:end] 00424 start = end 00425 end += 1 00426 (self.status.status,) = _struct_B.unpack(str[start:end]) 00427 start = end 00428 end += 4 00429 (length,) = _struct_I.unpack(str[start:end]) 00430 start = end 00431 end += length 00432 self.status.text = str[start:end] 00433 start = end 00434 end += 4 00435 (length,) = _struct_I.unpack(str[start:end]) 00436 self.result.bounding_boxes = [] 00437 for i in range(0, length): 00438 val1 = sensor_msgs.msg.PointCloud2() 00439 _v7 = val1.header 00440 start = end 00441 end += 4 00442 (_v7.seq,) = _struct_I.unpack(str[start:end]) 00443 _v8 = _v7.stamp 00444 _x = _v8 00445 start = end 00446 end += 8 00447 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00448 start = end 00449 end += 4 00450 (length,) = _struct_I.unpack(str[start:end]) 00451 start = end 00452 end += length 00453 _v7.frame_id = str[start:end] 00454 _x = val1 00455 start = end 00456 end += 8 00457 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00458 start = end 00459 end += 4 00460 (length,) = _struct_I.unpack(str[start:end]) 00461 val1.fields = [] 00462 for i in range(0, length): 00463 val2 = sensor_msgs.msg.PointField() 00464 start = end 00465 end += 4 00466 (length,) = _struct_I.unpack(str[start:end]) 00467 start = end 00468 end += length 00469 val2.name = str[start:end] 00470 _x = val2 00471 start = end 00472 end += 9 00473 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00474 val1.fields.append(val2) 00475 _x = val1 00476 start = end 00477 end += 9 00478 (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end]) 00479 val1.is_bigendian = bool(val1.is_bigendian) 00480 start = end 00481 end += 4 00482 (length,) = _struct_I.unpack(str[start:end]) 00483 start = end 00484 end += length 00485 val1.data = str[start:end] 00486 start = end 00487 end += 1 00488 (val1.is_dense,) = _struct_B.unpack(str[start:end]) 00489 val1.is_dense = bool(val1.is_dense) 00490 self.result.bounding_boxes.append(val1) 00491 return self 00492 except struct.error as e: 00493 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00494 00495 _struct_I = roslib.message.struct_I 00496 _struct_IBI = struct.Struct("<IBI") 00497 _struct_B = struct.Struct("<B") 00498 _struct_3I = struct.Struct("<3I") 00499 _struct_B2I = struct.Struct("<B2I") 00500 _struct_2I = struct.Struct("<2I")