$search
00001 """autogenerated by genmsg_py from TableWithObjects.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import sensor_msgs.msg 00006 import geometry_msgs.msg 00007 import ias_table_msgs.msg 00008 import std_msgs.msg 00009 00010 class TableWithObjects(roslib.message.Message): 00011 _md5sum = "0222f521841551bfb4e109b86f6a86fa" 00012 _type = "ias_table_msgs/TableWithObjects" 00013 _has_header = True #flag to mark the presence of a Header object 00014 _full_text = """Header header 00015 geometry_msgs/Polygon table 00016 geometry_msgs/Point32 table_min 00017 geometry_msgs/Point32 table_max 00018 TableObject[] objects 00019 00020 #geometry_msgs/Point32 table_center 00021 #geometry_msgs/PolygonStamped table_polygon 00022 #sensor_msgs/PointCloud[] point_clusters 00023 00024 00025 ================================================================================ 00026 MSG: std_msgs/Header 00027 # Standard metadata for higher-level stamped data types. 00028 # This is generally used to communicate timestamped data 00029 # in a particular coordinate frame. 00030 # 00031 # sequence ID: consecutively increasing ID 00032 uint32 seq 00033 #Two-integer timestamp that is expressed as: 00034 # * stamp.secs: seconds (stamp_secs) since epoch 00035 # * stamp.nsecs: nanoseconds since stamp_secs 00036 # time-handling sugar is provided by the client library 00037 time stamp 00038 #Frame this data is associated with 00039 # 0: no frame 00040 # 1: global frame 00041 string frame_id 00042 00043 ================================================================================ 00044 MSG: geometry_msgs/Polygon 00045 #A specification of a polygon where the first and last points are assumed to be connected 00046 geometry_msgs/Point32[] points 00047 00048 ================================================================================ 00049 MSG: geometry_msgs/Point32 00050 # This contains the position of a point in free space(with 32 bits of precision). 00051 # It is recommeded to use Point wherever possible instead of Point32. 00052 # 00053 # This recommendation is to promote interoperability. 00054 # 00055 # This message is designed to take up less space when sending 00056 # lots of points at once, as in the case of a PointCloud. 00057 00058 float32 x 00059 float32 y 00060 float32 z 00061 ================================================================================ 00062 MSG: ias_table_msgs/TableObject 00063 geometry_msgs/Point32 center 00064 geometry_msgs/Point32 min_bound 00065 geometry_msgs/Point32 max_bound 00066 00067 uint64 object_cop_id 00068 uint64 lo_id 00069 00070 sensor_msgs/PointCloud points 00071 sensor_msgs/Image roi 00072 00073 string perception_method 00074 string sensor_type 00075 string object_type 00076 string object_color 00077 string object_geometric_type 00078 uint64 table_id 00079 00080 ================================================================================ 00081 MSG: sensor_msgs/PointCloud 00082 # This message holds a collection of 3d points, plus optional additional 00083 # information about each point. 00084 00085 # Time of sensor data acquisition, coordinate frame ID. 00086 Header header 00087 00088 # Array of 3d points. Each Point32 should be interpreted as a 3d point 00089 # in the frame given in the header. 00090 geometry_msgs/Point32[] points 00091 00092 # Each channel should have the same number of elements as points array, 00093 # and the data in each channel should correspond 1:1 with each point. 00094 # Channel names in common practice are listed in ChannelFloat32.msg. 00095 ChannelFloat32[] channels 00096 00097 ================================================================================ 00098 MSG: sensor_msgs/ChannelFloat32 00099 # This message is used by the PointCloud message to hold optional data 00100 # associated with each point in the cloud. The length of the values 00101 # array should be the same as the length of the points array in the 00102 # PointCloud, and each value should be associated with the corresponding 00103 # point. 00104 00105 # Channel names in existing practice include: 00106 # "u", "v" - row and column (respectively) in the left stereo image. 00107 # This is opposite to usual conventions but remains for 00108 # historical reasons. The newer PointCloud2 message has no 00109 # such problem. 00110 # "rgb" - For point clouds produced by color stereo cameras. uint8 00111 # (R,G,B) values packed into the least significant 24 bits, 00112 # in order. 00113 # "intensity" - laser or pixel intensity. 00114 # "distance" 00115 00116 # The channel name should give semantics of the channel (e.g. 00117 # "intensity" instead of "value"). 00118 string name 00119 00120 # The values array should be 1-1 with the elements of the associated 00121 # PointCloud. 00122 float32[] values 00123 00124 ================================================================================ 00125 MSG: sensor_msgs/Image 00126 # This message contains an uncompressed image 00127 # (0, 0) is at top-left corner of image 00128 # 00129 00130 Header header # Header timestamp should be acquisition time of image 00131 # Header frame_id should be optical frame of camera 00132 # origin of frame should be optical center of cameara 00133 # +x should point to the right in the image 00134 # +y should point down in the image 00135 # +z should point into to plane of the image 00136 # If the frame_id here and the frame_id of the CameraInfo 00137 # message associated with the image conflict 00138 # the behavior is undefined 00139 00140 uint32 height # image height, that is, number of rows 00141 uint32 width # image width, that is, number of columns 00142 00143 # The legal values for encoding are in file src/image_encodings.cpp 00144 # If you want to standardize a new string format, join 00145 # ros-users@lists.sourceforge.net and send an email proposing a new encoding. 00146 00147 string encoding # Encoding of pixels -- channel meaning, ordering, size 00148 # taken from the list of strings in src/image_encodings.cpp 00149 00150 uint8 is_bigendian # is this data bigendian? 00151 uint32 step # Full row length in bytes 00152 uint8[] data # actual matrix data, size is (step * rows) 00153 00154 """ 00155 __slots__ = ['header','table','table_min','table_max','objects'] 00156 _slot_types = ['Header','geometry_msgs/Polygon','geometry_msgs/Point32','geometry_msgs/Point32','ias_table_msgs/TableObject[]'] 00157 00158 def __init__(self, *args, **kwds): 00159 """ 00160 Constructor. Any message fields that are implicitly/explicitly 00161 set to None will be assigned a default value. The recommend 00162 use is keyword arguments as this is more robust to future message 00163 changes. You cannot mix in-order arguments and keyword arguments. 00164 00165 The available fields are: 00166 header,table,table_min,table_max,objects 00167 00168 @param args: complete set of field values, in .msg order 00169 @param kwds: use keyword arguments corresponding to message field names 00170 to set specific fields. 00171 """ 00172 if args or kwds: 00173 super(TableWithObjects, self).__init__(*args, **kwds) 00174 #message fields cannot be None, assign default values for those that are 00175 if self.header is None: 00176 self.header = std_msgs.msg._Header.Header() 00177 if self.table is None: 00178 self.table = geometry_msgs.msg.Polygon() 00179 if self.table_min is None: 00180 self.table_min = geometry_msgs.msg.Point32() 00181 if self.table_max is None: 00182 self.table_max = geometry_msgs.msg.Point32() 00183 if self.objects is None: 00184 self.objects = [] 00185 else: 00186 self.header = std_msgs.msg._Header.Header() 00187 self.table = geometry_msgs.msg.Polygon() 00188 self.table_min = geometry_msgs.msg.Point32() 00189 self.table_max = geometry_msgs.msg.Point32() 00190 self.objects = [] 00191 00192 def _get_types(self): 00193 """ 00194 internal API method 00195 """ 00196 return self._slot_types 00197 00198 def serialize(self, buff): 00199 """ 00200 serialize message into buffer 00201 @param buff: buffer 00202 @type buff: StringIO 00203 """ 00204 try: 00205 _x = self 00206 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00207 _x = self.header.frame_id 00208 length = len(_x) 00209 buff.write(struct.pack('<I%ss'%length, length, _x)) 00210 length = len(self.table.points) 00211 buff.write(_struct_I.pack(length)) 00212 for val1 in self.table.points: 00213 _x = val1 00214 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00215 _x = self 00216 buff.write(_struct_6f.pack(_x.table_min.x, _x.table_min.y, _x.table_min.z, _x.table_max.x, _x.table_max.y, _x.table_max.z)) 00217 length = len(self.objects) 00218 buff.write(_struct_I.pack(length)) 00219 for val1 in self.objects: 00220 _v1 = val1.center 00221 _x = _v1 00222 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00223 _v2 = val1.min_bound 00224 _x = _v2 00225 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00226 _v3 = val1.max_bound 00227 _x = _v3 00228 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00229 _x = val1 00230 buff.write(_struct_2Q.pack(_x.object_cop_id, _x.lo_id)) 00231 _v4 = val1.points 00232 _v5 = _v4.header 00233 buff.write(_struct_I.pack(_v5.seq)) 00234 _v6 = _v5.stamp 00235 _x = _v6 00236 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00237 _x = _v5.frame_id 00238 length = len(_x) 00239 buff.write(struct.pack('<I%ss'%length, length, _x)) 00240 length = len(_v4.points) 00241 buff.write(_struct_I.pack(length)) 00242 for val3 in _v4.points: 00243 _x = val3 00244 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00245 length = len(_v4.channels) 00246 buff.write(_struct_I.pack(length)) 00247 for val3 in _v4.channels: 00248 _x = val3.name 00249 length = len(_x) 00250 buff.write(struct.pack('<I%ss'%length, length, _x)) 00251 length = len(val3.values) 00252 buff.write(_struct_I.pack(length)) 00253 pattern = '<%sf'%length 00254 buff.write(struct.pack(pattern, *val3.values)) 00255 _v7 = val1.roi 00256 _v8 = _v7.header 00257 buff.write(_struct_I.pack(_v8.seq)) 00258 _v9 = _v8.stamp 00259 _x = _v9 00260 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00261 _x = _v8.frame_id 00262 length = len(_x) 00263 buff.write(struct.pack('<I%ss'%length, length, _x)) 00264 _x = _v7 00265 buff.write(_struct_2I.pack(_x.height, _x.width)) 00266 _x = _v7.encoding 00267 length = len(_x) 00268 buff.write(struct.pack('<I%ss'%length, length, _x)) 00269 _x = _v7 00270 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step)) 00271 _x = _v7.data 00272 length = len(_x) 00273 # - if encoded as a list instead, serialize as bytes instead of string 00274 if type(_x) in [list, tuple]: 00275 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00276 else: 00277 buff.write(struct.pack('<I%ss'%length, length, _x)) 00278 _x = val1.perception_method 00279 length = len(_x) 00280 buff.write(struct.pack('<I%ss'%length, length, _x)) 00281 _x = val1.sensor_type 00282 length = len(_x) 00283 buff.write(struct.pack('<I%ss'%length, length, _x)) 00284 _x = val1.object_type 00285 length = len(_x) 00286 buff.write(struct.pack('<I%ss'%length, length, _x)) 00287 _x = val1.object_color 00288 length = len(_x) 00289 buff.write(struct.pack('<I%ss'%length, length, _x)) 00290 _x = val1.object_geometric_type 00291 length = len(_x) 00292 buff.write(struct.pack('<I%ss'%length, length, _x)) 00293 buff.write(_struct_Q.pack(val1.table_id)) 00294 except struct.error as se: self._check_types(se) 00295 except TypeError as te: self._check_types(te) 00296 00297 def deserialize(self, str): 00298 """ 00299 unpack serialized message in str into this message instance 00300 @param str: byte array of serialized message 00301 @type str: str 00302 """ 00303 try: 00304 if self.header is None: 00305 self.header = std_msgs.msg._Header.Header() 00306 if self.table is None: 00307 self.table = geometry_msgs.msg.Polygon() 00308 if self.table_min is None: 00309 self.table_min = geometry_msgs.msg.Point32() 00310 if self.table_max is None: 00311 self.table_max = geometry_msgs.msg.Point32() 00312 end = 0 00313 _x = self 00314 start = end 00315 end += 12 00316 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.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.header.frame_id = str[start:end] 00323 start = end 00324 end += 4 00325 (length,) = _struct_I.unpack(str[start:end]) 00326 self.table.points = [] 00327 for i in range(0, length): 00328 val1 = geometry_msgs.msg.Point32() 00329 _x = val1 00330 start = end 00331 end += 12 00332 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00333 self.table.points.append(val1) 00334 _x = self 00335 start = end 00336 end += 24 00337 (_x.table_min.x, _x.table_min.y, _x.table_min.z, _x.table_max.x, _x.table_max.y, _x.table_max.z,) = _struct_6f.unpack(str[start:end]) 00338 start = end 00339 end += 4 00340 (length,) = _struct_I.unpack(str[start:end]) 00341 self.objects = [] 00342 for i in range(0, length): 00343 val1 = ias_table_msgs.msg.TableObject() 00344 _v10 = val1.center 00345 _x = _v10 00346 start = end 00347 end += 12 00348 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00349 _v11 = val1.min_bound 00350 _x = _v11 00351 start = end 00352 end += 12 00353 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00354 _v12 = val1.max_bound 00355 _x = _v12 00356 start = end 00357 end += 12 00358 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00359 _x = val1 00360 start = end 00361 end += 16 00362 (_x.object_cop_id, _x.lo_id,) = _struct_2Q.unpack(str[start:end]) 00363 _v13 = val1.points 00364 _v14 = _v13.header 00365 start = end 00366 end += 4 00367 (_v14.seq,) = _struct_I.unpack(str[start:end]) 00368 _v15 = _v14.stamp 00369 _x = _v15 00370 start = end 00371 end += 8 00372 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00373 start = end 00374 end += 4 00375 (length,) = _struct_I.unpack(str[start:end]) 00376 start = end 00377 end += length 00378 _v14.frame_id = str[start:end] 00379 start = end 00380 end += 4 00381 (length,) = _struct_I.unpack(str[start:end]) 00382 _v13.points = [] 00383 for i in range(0, length): 00384 val3 = geometry_msgs.msg.Point32() 00385 _x = val3 00386 start = end 00387 end += 12 00388 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00389 _v13.points.append(val3) 00390 start = end 00391 end += 4 00392 (length,) = _struct_I.unpack(str[start:end]) 00393 _v13.channels = [] 00394 for i in range(0, length): 00395 val3 = sensor_msgs.msg.ChannelFloat32() 00396 start = end 00397 end += 4 00398 (length,) = _struct_I.unpack(str[start:end]) 00399 start = end 00400 end += length 00401 val3.name = str[start:end] 00402 start = end 00403 end += 4 00404 (length,) = _struct_I.unpack(str[start:end]) 00405 pattern = '<%sf'%length 00406 start = end 00407 end += struct.calcsize(pattern) 00408 val3.values = struct.unpack(pattern, str[start:end]) 00409 _v13.channels.append(val3) 00410 _v16 = val1.roi 00411 _v17 = _v16.header 00412 start = end 00413 end += 4 00414 (_v17.seq,) = _struct_I.unpack(str[start:end]) 00415 _v18 = _v17.stamp 00416 _x = _v18 00417 start = end 00418 end += 8 00419 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00420 start = end 00421 end += 4 00422 (length,) = _struct_I.unpack(str[start:end]) 00423 start = end 00424 end += length 00425 _v17.frame_id = str[start:end] 00426 _x = _v16 00427 start = end 00428 end += 8 00429 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00430 start = end 00431 end += 4 00432 (length,) = _struct_I.unpack(str[start:end]) 00433 start = end 00434 end += length 00435 _v16.encoding = str[start:end] 00436 _x = _v16 00437 start = end 00438 end += 5 00439 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end]) 00440 start = end 00441 end += 4 00442 (length,) = _struct_I.unpack(str[start:end]) 00443 start = end 00444 end += length 00445 _v16.data = str[start:end] 00446 start = end 00447 end += 4 00448 (length,) = _struct_I.unpack(str[start:end]) 00449 start = end 00450 end += length 00451 val1.perception_method = str[start:end] 00452 start = end 00453 end += 4 00454 (length,) = _struct_I.unpack(str[start:end]) 00455 start = end 00456 end += length 00457 val1.sensor_type = str[start:end] 00458 start = end 00459 end += 4 00460 (length,) = _struct_I.unpack(str[start:end]) 00461 start = end 00462 end += length 00463 val1.object_type = str[start:end] 00464 start = end 00465 end += 4 00466 (length,) = _struct_I.unpack(str[start:end]) 00467 start = end 00468 end += length 00469 val1.object_color = str[start:end] 00470 start = end 00471 end += 4 00472 (length,) = _struct_I.unpack(str[start:end]) 00473 start = end 00474 end += length 00475 val1.object_geometric_type = str[start:end] 00476 start = end 00477 end += 8 00478 (val1.table_id,) = _struct_Q.unpack(str[start:end]) 00479 self.objects.append(val1) 00480 return self 00481 except struct.error as e: 00482 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00483 00484 00485 def serialize_numpy(self, buff, numpy): 00486 """ 00487 serialize message with numpy array types into buffer 00488 @param buff: buffer 00489 @type buff: StringIO 00490 @param numpy: numpy python module 00491 @type numpy module 00492 """ 00493 try: 00494 _x = self 00495 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00496 _x = self.header.frame_id 00497 length = len(_x) 00498 buff.write(struct.pack('<I%ss'%length, length, _x)) 00499 length = len(self.table.points) 00500 buff.write(_struct_I.pack(length)) 00501 for val1 in self.table.points: 00502 _x = val1 00503 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00504 _x = self 00505 buff.write(_struct_6f.pack(_x.table_min.x, _x.table_min.y, _x.table_min.z, _x.table_max.x, _x.table_max.y, _x.table_max.z)) 00506 length = len(self.objects) 00507 buff.write(_struct_I.pack(length)) 00508 for val1 in self.objects: 00509 _v19 = val1.center 00510 _x = _v19 00511 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00512 _v20 = val1.min_bound 00513 _x = _v20 00514 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00515 _v21 = val1.max_bound 00516 _x = _v21 00517 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00518 _x = val1 00519 buff.write(_struct_2Q.pack(_x.object_cop_id, _x.lo_id)) 00520 _v22 = val1.points 00521 _v23 = _v22.header 00522 buff.write(_struct_I.pack(_v23.seq)) 00523 _v24 = _v23.stamp 00524 _x = _v24 00525 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00526 _x = _v23.frame_id 00527 length = len(_x) 00528 buff.write(struct.pack('<I%ss'%length, length, _x)) 00529 length = len(_v22.points) 00530 buff.write(_struct_I.pack(length)) 00531 for val3 in _v22.points: 00532 _x = val3 00533 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00534 length = len(_v22.channels) 00535 buff.write(_struct_I.pack(length)) 00536 for val3 in _v22.channels: 00537 _x = val3.name 00538 length = len(_x) 00539 buff.write(struct.pack('<I%ss'%length, length, _x)) 00540 length = len(val3.values) 00541 buff.write(_struct_I.pack(length)) 00542 pattern = '<%sf'%length 00543 buff.write(val3.values.tostring()) 00544 _v25 = val1.roi 00545 _v26 = _v25.header 00546 buff.write(_struct_I.pack(_v26.seq)) 00547 _v27 = _v26.stamp 00548 _x = _v27 00549 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00550 _x = _v26.frame_id 00551 length = len(_x) 00552 buff.write(struct.pack('<I%ss'%length, length, _x)) 00553 _x = _v25 00554 buff.write(_struct_2I.pack(_x.height, _x.width)) 00555 _x = _v25.encoding 00556 length = len(_x) 00557 buff.write(struct.pack('<I%ss'%length, length, _x)) 00558 _x = _v25 00559 buff.write(_struct_BI.pack(_x.is_bigendian, _x.step)) 00560 _x = _v25.data 00561 length = len(_x) 00562 # - if encoded as a list instead, serialize as bytes instead of string 00563 if type(_x) in [list, tuple]: 00564 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00565 else: 00566 buff.write(struct.pack('<I%ss'%length, length, _x)) 00567 _x = val1.perception_method 00568 length = len(_x) 00569 buff.write(struct.pack('<I%ss'%length, length, _x)) 00570 _x = val1.sensor_type 00571 length = len(_x) 00572 buff.write(struct.pack('<I%ss'%length, length, _x)) 00573 _x = val1.object_type 00574 length = len(_x) 00575 buff.write(struct.pack('<I%ss'%length, length, _x)) 00576 _x = val1.object_color 00577 length = len(_x) 00578 buff.write(struct.pack('<I%ss'%length, length, _x)) 00579 _x = val1.object_geometric_type 00580 length = len(_x) 00581 buff.write(struct.pack('<I%ss'%length, length, _x)) 00582 buff.write(_struct_Q.pack(val1.table_id)) 00583 except struct.error as se: self._check_types(se) 00584 except TypeError as te: self._check_types(te) 00585 00586 def deserialize_numpy(self, str, numpy): 00587 """ 00588 unpack serialized message in str into this message instance using numpy for array types 00589 @param str: byte array of serialized message 00590 @type str: str 00591 @param numpy: numpy python module 00592 @type numpy: module 00593 """ 00594 try: 00595 if self.header is None: 00596 self.header = std_msgs.msg._Header.Header() 00597 if self.table is None: 00598 self.table = geometry_msgs.msg.Polygon() 00599 if self.table_min is None: 00600 self.table_min = geometry_msgs.msg.Point32() 00601 if self.table_max is None: 00602 self.table_max = geometry_msgs.msg.Point32() 00603 end = 0 00604 _x = self 00605 start = end 00606 end += 12 00607 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00608 start = end 00609 end += 4 00610 (length,) = _struct_I.unpack(str[start:end]) 00611 start = end 00612 end += length 00613 self.header.frame_id = str[start:end] 00614 start = end 00615 end += 4 00616 (length,) = _struct_I.unpack(str[start:end]) 00617 self.table.points = [] 00618 for i in range(0, length): 00619 val1 = geometry_msgs.msg.Point32() 00620 _x = val1 00621 start = end 00622 end += 12 00623 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00624 self.table.points.append(val1) 00625 _x = self 00626 start = end 00627 end += 24 00628 (_x.table_min.x, _x.table_min.y, _x.table_min.z, _x.table_max.x, _x.table_max.y, _x.table_max.z,) = _struct_6f.unpack(str[start:end]) 00629 start = end 00630 end += 4 00631 (length,) = _struct_I.unpack(str[start:end]) 00632 self.objects = [] 00633 for i in range(0, length): 00634 val1 = ias_table_msgs.msg.TableObject() 00635 _v28 = val1.center 00636 _x = _v28 00637 start = end 00638 end += 12 00639 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00640 _v29 = val1.min_bound 00641 _x = _v29 00642 start = end 00643 end += 12 00644 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00645 _v30 = val1.max_bound 00646 _x = _v30 00647 start = end 00648 end += 12 00649 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00650 _x = val1 00651 start = end 00652 end += 16 00653 (_x.object_cop_id, _x.lo_id,) = _struct_2Q.unpack(str[start:end]) 00654 _v31 = val1.points 00655 _v32 = _v31.header 00656 start = end 00657 end += 4 00658 (_v32.seq,) = _struct_I.unpack(str[start:end]) 00659 _v33 = _v32.stamp 00660 _x = _v33 00661 start = end 00662 end += 8 00663 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00664 start = end 00665 end += 4 00666 (length,) = _struct_I.unpack(str[start:end]) 00667 start = end 00668 end += length 00669 _v32.frame_id = str[start:end] 00670 start = end 00671 end += 4 00672 (length,) = _struct_I.unpack(str[start:end]) 00673 _v31.points = [] 00674 for i in range(0, length): 00675 val3 = geometry_msgs.msg.Point32() 00676 _x = val3 00677 start = end 00678 end += 12 00679 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00680 _v31.points.append(val3) 00681 start = end 00682 end += 4 00683 (length,) = _struct_I.unpack(str[start:end]) 00684 _v31.channels = [] 00685 for i in range(0, length): 00686 val3 = sensor_msgs.msg.ChannelFloat32() 00687 start = end 00688 end += 4 00689 (length,) = _struct_I.unpack(str[start:end]) 00690 start = end 00691 end += length 00692 val3.name = str[start:end] 00693 start = end 00694 end += 4 00695 (length,) = _struct_I.unpack(str[start:end]) 00696 pattern = '<%sf'%length 00697 start = end 00698 end += struct.calcsize(pattern) 00699 val3.values = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length) 00700 _v31.channels.append(val3) 00701 _v34 = val1.roi 00702 _v35 = _v34.header 00703 start = end 00704 end += 4 00705 (_v35.seq,) = _struct_I.unpack(str[start:end]) 00706 _v36 = _v35.stamp 00707 _x = _v36 00708 start = end 00709 end += 8 00710 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00711 start = end 00712 end += 4 00713 (length,) = _struct_I.unpack(str[start:end]) 00714 start = end 00715 end += length 00716 _v35.frame_id = str[start:end] 00717 _x = _v34 00718 start = end 00719 end += 8 00720 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00721 start = end 00722 end += 4 00723 (length,) = _struct_I.unpack(str[start:end]) 00724 start = end 00725 end += length 00726 _v34.encoding = str[start:end] 00727 _x = _v34 00728 start = end 00729 end += 5 00730 (_x.is_bigendian, _x.step,) = _struct_BI.unpack(str[start:end]) 00731 start = end 00732 end += 4 00733 (length,) = _struct_I.unpack(str[start:end]) 00734 start = end 00735 end += length 00736 _v34.data = str[start:end] 00737 start = end 00738 end += 4 00739 (length,) = _struct_I.unpack(str[start:end]) 00740 start = end 00741 end += length 00742 val1.perception_method = str[start:end] 00743 start = end 00744 end += 4 00745 (length,) = _struct_I.unpack(str[start:end]) 00746 start = end 00747 end += length 00748 val1.sensor_type = str[start:end] 00749 start = end 00750 end += 4 00751 (length,) = _struct_I.unpack(str[start:end]) 00752 start = end 00753 end += length 00754 val1.object_type = str[start:end] 00755 start = end 00756 end += 4 00757 (length,) = _struct_I.unpack(str[start:end]) 00758 start = end 00759 end += length 00760 val1.object_color = str[start:end] 00761 start = end 00762 end += 4 00763 (length,) = _struct_I.unpack(str[start:end]) 00764 start = end 00765 end += length 00766 val1.object_geometric_type = str[start:end] 00767 start = end 00768 end += 8 00769 (val1.table_id,) = _struct_Q.unpack(str[start:end]) 00770 self.objects.append(val1) 00771 return self 00772 except struct.error as e: 00773 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00774 00775 _struct_I = roslib.message.struct_I 00776 _struct_2Q = struct.Struct("<2Q") 00777 _struct_6f = struct.Struct("<6f") 00778 _struct_BI = struct.Struct("<BI") 00779 _struct_3f = struct.Struct("<3f") 00780 _struct_Q = struct.Struct("<Q") 00781 _struct_3I = struct.Struct("<3I") 00782 _struct_2I = struct.Struct("<2I")