$search
00001 """autogenerated by genmsg_py from GetObjectsOfClassRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import std_msgs.msg 00006 00007 class GetObjectsOfClassRequest(roslib.message.Message): 00008 _md5sum = "8cd17435496133fe7b904bdd1a1f66ee" 00009 _type = "cob_3d_mapping_msgs/GetObjectsOfClassRequest" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """std_msgs/UInt32 class_id 00012 00013 ================================================================================ 00014 MSG: std_msgs/UInt32 00015 uint32 data 00016 """ 00017 __slots__ = ['class_id'] 00018 _slot_types = ['std_msgs/UInt32'] 00019 00020 def __init__(self, *args, **kwds): 00021 """ 00022 Constructor. Any message fields that are implicitly/explicitly 00023 set to None will be assigned a default value. The recommend 00024 use is keyword arguments as this is more robust to future message 00025 changes. You cannot mix in-order arguments and keyword arguments. 00026 00027 The available fields are: 00028 class_id 00029 00030 @param args: complete set of field values, in .msg order 00031 @param kwds: use keyword arguments corresponding to message field names 00032 to set specific fields. 00033 """ 00034 if args or kwds: 00035 super(GetObjectsOfClassRequest, self).__init__(*args, **kwds) 00036 #message fields cannot be None, assign default values for those that are 00037 if self.class_id is None: 00038 self.class_id = std_msgs.msg.UInt32() 00039 else: 00040 self.class_id = std_msgs.msg.UInt32() 00041 00042 def _get_types(self): 00043 """ 00044 internal API method 00045 """ 00046 return self._slot_types 00047 00048 def serialize(self, buff): 00049 """ 00050 serialize message into buffer 00051 @param buff: buffer 00052 @type buff: StringIO 00053 """ 00054 try: 00055 buff.write(_struct_I.pack(self.class_id.data)) 00056 except struct.error as se: self._check_types(se) 00057 except TypeError as te: self._check_types(te) 00058 00059 def deserialize(self, str): 00060 """ 00061 unpack serialized message in str into this message instance 00062 @param str: byte array of serialized message 00063 @type str: str 00064 """ 00065 try: 00066 if self.class_id is None: 00067 self.class_id = std_msgs.msg.UInt32() 00068 end = 0 00069 start = end 00070 end += 4 00071 (self.class_id.data,) = _struct_I.unpack(str[start:end]) 00072 return self 00073 except struct.error as e: 00074 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00075 00076 00077 def serialize_numpy(self, buff, numpy): 00078 """ 00079 serialize message with numpy array types into buffer 00080 @param buff: buffer 00081 @type buff: StringIO 00082 @param numpy: numpy python module 00083 @type numpy module 00084 """ 00085 try: 00086 buff.write(_struct_I.pack(self.class_id.data)) 00087 except struct.error as se: self._check_types(se) 00088 except TypeError as te: self._check_types(te) 00089 00090 def deserialize_numpy(self, str, numpy): 00091 """ 00092 unpack serialized message in str into this message instance using numpy for array types 00093 @param str: byte array of serialized message 00094 @type str: str 00095 @param numpy: numpy python module 00096 @type numpy: module 00097 """ 00098 try: 00099 if self.class_id is None: 00100 self.class_id = std_msgs.msg.UInt32() 00101 end = 0 00102 start = end 00103 end += 4 00104 (self.class_id.data,) = _struct_I.unpack(str[start:end]) 00105 return self 00106 except struct.error as e: 00107 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00108 00109 _struct_I = roslib.message.struct_I 00110 """autogenerated by genmsg_py from GetObjectsOfClassResponse.msg. Do not edit.""" 00111 import roslib.message 00112 import struct 00113 00114 import geometry_msgs.msg 00115 import sensor_msgs.msg 00116 import cob_3d_mapping_msgs.msg 00117 import std_msgs.msg 00118 00119 class GetObjectsOfClassResponse(roslib.message.Message): 00120 _md5sum = "e9271099b1db6a59a939d05a4cdd4686" 00121 _type = "cob_3d_mapping_msgs/GetObjectsOfClassResponse" 00122 _has_header = False #flag to mark the presence of a Header object 00123 _full_text = """cob_3d_mapping_msgs/ShapeArray objects 00124 00125 00126 ================================================================================ 00127 MSG: cob_3d_mapping_msgs/ShapeArray 00128 # An array of poses with a header for global reference. 00129 00130 Header header 00131 00132 cob_3d_mapping_msgs/Shape[] shapes 00133 ================================================================================ 00134 MSG: std_msgs/Header 00135 # Standard metadata for higher-level stamped data types. 00136 # This is generally used to communicate timestamped data 00137 # in a particular coordinate frame. 00138 # 00139 # sequence ID: consecutively increasing ID 00140 uint32 seq 00141 #Two-integer timestamp that is expressed as: 00142 # * stamp.secs: seconds (stamp_secs) since epoch 00143 # * stamp.nsecs: nanoseconds since stamp_secs 00144 # time-handling sugar is provided by the client library 00145 time stamp 00146 #Frame this data is associated with 00147 # 0: no frame 00148 # 1: global frame 00149 string frame_id 00150 00151 ================================================================================ 00152 MSG: cob_3d_mapping_msgs/Shape 00153 Header header 00154 00155 uint8 POLYGON=0 00156 uint8 LINE=1 00157 uint8 CURVED=2 00158 uint8 MESH=3 00159 uint8 OTHER=4 00160 uint8 CYLINDER=5 00161 # potential extensions: SPHERE, CYLINDER, BOX 00162 00163 uint8 type 00164 00165 00166 int32 id 00167 # define shape parameters 00168 # for plane 00169 # normal vector = params[0],params[1],params[2] 00170 # d = params[3] 00171 # for line 00172 # direction vector = params[0],params[1],params[2] 00173 # 00174 #for cylinder 00175 # symmetry axis = params[0],params[1],params[2] 00176 # z axis = params[3], params[4], params[5] 00177 # origin = params[6], params[7], params[8] 00178 # radius = params[9] 00179 # 00180 float64[] params 00181 00182 sensor_msgs/PointCloud2[] points 00183 00184 #### define mesh #### 00185 # each three entries form a triangle; indices of points are stored 00186 int32[] vertices 00187 00188 geometry_msgs/Point32 centroid 00189 std_msgs/ColorRGBA color 00190 bool[] holes 00191 00192 ================================================================================ 00193 MSG: sensor_msgs/PointCloud2 00194 # This message holds a collection of N-dimensional points, which may 00195 # contain additional information such as normals, intensity, etc. The 00196 # point data is stored as a binary blob, its layout described by the 00197 # contents of the "fields" array. 00198 00199 # The point cloud data may be organized 2d (image-like) or 1d 00200 # (unordered). Point clouds organized as 2d images may be produced by 00201 # camera depth sensors such as stereo or time-of-flight. 00202 00203 # Time of sensor data acquisition, and the coordinate frame ID (for 3d 00204 # points). 00205 Header header 00206 00207 # 2D structure of the point cloud. If the cloud is unordered, height is 00208 # 1 and width is the length of the point cloud. 00209 uint32 height 00210 uint32 width 00211 00212 # Describes the channels and their layout in the binary data blob. 00213 PointField[] fields 00214 00215 bool is_bigendian # Is this data bigendian? 00216 uint32 point_step # Length of a point in bytes 00217 uint32 row_step # Length of a row in bytes 00218 uint8[] data # Actual point data, size is (row_step*height) 00219 00220 bool is_dense # True if there are no invalid points 00221 00222 ================================================================================ 00223 MSG: sensor_msgs/PointField 00224 # This message holds the description of one point entry in the 00225 # PointCloud2 message format. 00226 uint8 INT8 = 1 00227 uint8 UINT8 = 2 00228 uint8 INT16 = 3 00229 uint8 UINT16 = 4 00230 uint8 INT32 = 5 00231 uint8 UINT32 = 6 00232 uint8 FLOAT32 = 7 00233 uint8 FLOAT64 = 8 00234 00235 string name # Name of field 00236 uint32 offset # Offset from start of point struct 00237 uint8 datatype # Datatype enumeration, see above 00238 uint32 count # How many elements in the field 00239 00240 ================================================================================ 00241 MSG: geometry_msgs/Point32 00242 # This contains the position of a point in free space(with 32 bits of precision). 00243 # It is recommeded to use Point wherever possible instead of Point32. 00244 # 00245 # This recommendation is to promote interoperability. 00246 # 00247 # This message is designed to take up less space when sending 00248 # lots of points at once, as in the case of a PointCloud. 00249 00250 float32 x 00251 float32 y 00252 float32 z 00253 ================================================================================ 00254 MSG: std_msgs/ColorRGBA 00255 float32 r 00256 float32 g 00257 float32 b 00258 float32 a 00259 00260 """ 00261 __slots__ = ['objects'] 00262 _slot_types = ['cob_3d_mapping_msgs/ShapeArray'] 00263 00264 def __init__(self, *args, **kwds): 00265 """ 00266 Constructor. Any message fields that are implicitly/explicitly 00267 set to None will be assigned a default value. The recommend 00268 use is keyword arguments as this is more robust to future message 00269 changes. You cannot mix in-order arguments and keyword arguments. 00270 00271 The available fields are: 00272 objects 00273 00274 @param args: complete set of field values, in .msg order 00275 @param kwds: use keyword arguments corresponding to message field names 00276 to set specific fields. 00277 """ 00278 if args or kwds: 00279 super(GetObjectsOfClassResponse, self).__init__(*args, **kwds) 00280 #message fields cannot be None, assign default values for those that are 00281 if self.objects is None: 00282 self.objects = cob_3d_mapping_msgs.msg.ShapeArray() 00283 else: 00284 self.objects = cob_3d_mapping_msgs.msg.ShapeArray() 00285 00286 def _get_types(self): 00287 """ 00288 internal API method 00289 """ 00290 return self._slot_types 00291 00292 def serialize(self, buff): 00293 """ 00294 serialize message into buffer 00295 @param buff: buffer 00296 @type buff: StringIO 00297 """ 00298 try: 00299 _x = self 00300 buff.write(_struct_3I.pack(_x.objects.header.seq, _x.objects.header.stamp.secs, _x.objects.header.stamp.nsecs)) 00301 _x = self.objects.header.frame_id 00302 length = len(_x) 00303 buff.write(struct.pack('<I%ss'%length, length, _x)) 00304 length = len(self.objects.shapes) 00305 buff.write(_struct_I.pack(length)) 00306 for val1 in self.objects.shapes: 00307 _v1 = val1.header 00308 buff.write(_struct_I.pack(_v1.seq)) 00309 _v2 = _v1.stamp 00310 _x = _v2 00311 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00312 _x = _v1.frame_id 00313 length = len(_x) 00314 buff.write(struct.pack('<I%ss'%length, length, _x)) 00315 _x = val1 00316 buff.write(_struct_Bi.pack(_x.type, _x.id)) 00317 length = len(val1.params) 00318 buff.write(_struct_I.pack(length)) 00319 pattern = '<%sd'%length 00320 buff.write(struct.pack(pattern, *val1.params)) 00321 length = len(val1.points) 00322 buff.write(_struct_I.pack(length)) 00323 for val2 in val1.points: 00324 _v3 = val2.header 00325 buff.write(_struct_I.pack(_v3.seq)) 00326 _v4 = _v3.stamp 00327 _x = _v4 00328 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00329 _x = _v3.frame_id 00330 length = len(_x) 00331 buff.write(struct.pack('<I%ss'%length, length, _x)) 00332 _x = val2 00333 buff.write(_struct_2I.pack(_x.height, _x.width)) 00334 length = len(val2.fields) 00335 buff.write(_struct_I.pack(length)) 00336 for val3 in val2.fields: 00337 _x = val3.name 00338 length = len(_x) 00339 buff.write(struct.pack('<I%ss'%length, length, _x)) 00340 _x = val3 00341 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00342 _x = val2 00343 buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step)) 00344 _x = val2.data 00345 length = len(_x) 00346 # - if encoded as a list instead, serialize as bytes instead of string 00347 if type(_x) in [list, tuple]: 00348 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00349 else: 00350 buff.write(struct.pack('<I%ss'%length, length, _x)) 00351 buff.write(_struct_B.pack(val2.is_dense)) 00352 length = len(val1.vertices) 00353 buff.write(_struct_I.pack(length)) 00354 pattern = '<%si'%length 00355 buff.write(struct.pack(pattern, *val1.vertices)) 00356 _v5 = val1.centroid 00357 _x = _v5 00358 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00359 _v6 = val1.color 00360 _x = _v6 00361 buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a)) 00362 length = len(val1.holes) 00363 buff.write(_struct_I.pack(length)) 00364 pattern = '<%sB'%length 00365 buff.write(struct.pack(pattern, *val1.holes)) 00366 except struct.error as se: self._check_types(se) 00367 except TypeError as te: self._check_types(te) 00368 00369 def deserialize(self, str): 00370 """ 00371 unpack serialized message in str into this message instance 00372 @param str: byte array of serialized message 00373 @type str: str 00374 """ 00375 try: 00376 if self.objects is None: 00377 self.objects = cob_3d_mapping_msgs.msg.ShapeArray() 00378 end = 0 00379 _x = self 00380 start = end 00381 end += 12 00382 (_x.objects.header.seq, _x.objects.header.stamp.secs, _x.objects.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00383 start = end 00384 end += 4 00385 (length,) = _struct_I.unpack(str[start:end]) 00386 start = end 00387 end += length 00388 self.objects.header.frame_id = str[start:end] 00389 start = end 00390 end += 4 00391 (length,) = _struct_I.unpack(str[start:end]) 00392 self.objects.shapes = [] 00393 for i in range(0, length): 00394 val1 = cob_3d_mapping_msgs.msg.Shape() 00395 _v7 = val1.header 00396 start = end 00397 end += 4 00398 (_v7.seq,) = _struct_I.unpack(str[start:end]) 00399 _v8 = _v7.stamp 00400 _x = _v8 00401 start = end 00402 end += 8 00403 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00404 start = end 00405 end += 4 00406 (length,) = _struct_I.unpack(str[start:end]) 00407 start = end 00408 end += length 00409 _v7.frame_id = str[start:end] 00410 _x = val1 00411 start = end 00412 end += 5 00413 (_x.type, _x.id,) = _struct_Bi.unpack(str[start:end]) 00414 start = end 00415 end += 4 00416 (length,) = _struct_I.unpack(str[start:end]) 00417 pattern = '<%sd'%length 00418 start = end 00419 end += struct.calcsize(pattern) 00420 val1.params = struct.unpack(pattern, str[start:end]) 00421 start = end 00422 end += 4 00423 (length,) = _struct_I.unpack(str[start:end]) 00424 val1.points = [] 00425 for i in range(0, length): 00426 val2 = sensor_msgs.msg.PointCloud2() 00427 _v9 = val2.header 00428 start = end 00429 end += 4 00430 (_v9.seq,) = _struct_I.unpack(str[start:end]) 00431 _v10 = _v9.stamp 00432 _x = _v10 00433 start = end 00434 end += 8 00435 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00436 start = end 00437 end += 4 00438 (length,) = _struct_I.unpack(str[start:end]) 00439 start = end 00440 end += length 00441 _v9.frame_id = str[start:end] 00442 _x = val2 00443 start = end 00444 end += 8 00445 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00446 start = end 00447 end += 4 00448 (length,) = _struct_I.unpack(str[start:end]) 00449 val2.fields = [] 00450 for i in range(0, length): 00451 val3 = sensor_msgs.msg.PointField() 00452 start = end 00453 end += 4 00454 (length,) = _struct_I.unpack(str[start:end]) 00455 start = end 00456 end += length 00457 val3.name = str[start:end] 00458 _x = val3 00459 start = end 00460 end += 9 00461 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00462 val2.fields.append(val3) 00463 _x = val2 00464 start = end 00465 end += 9 00466 (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end]) 00467 val2.is_bigendian = bool(val2.is_bigendian) 00468 start = end 00469 end += 4 00470 (length,) = _struct_I.unpack(str[start:end]) 00471 start = end 00472 end += length 00473 val2.data = str[start:end] 00474 start = end 00475 end += 1 00476 (val2.is_dense,) = _struct_B.unpack(str[start:end]) 00477 val2.is_dense = bool(val2.is_dense) 00478 val1.points.append(val2) 00479 start = end 00480 end += 4 00481 (length,) = _struct_I.unpack(str[start:end]) 00482 pattern = '<%si'%length 00483 start = end 00484 end += struct.calcsize(pattern) 00485 val1.vertices = struct.unpack(pattern, str[start:end]) 00486 _v11 = val1.centroid 00487 _x = _v11 00488 start = end 00489 end += 12 00490 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00491 _v12 = val1.color 00492 _x = _v12 00493 start = end 00494 end += 16 00495 (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end]) 00496 start = end 00497 end += 4 00498 (length,) = _struct_I.unpack(str[start:end]) 00499 pattern = '<%sB'%length 00500 start = end 00501 end += struct.calcsize(pattern) 00502 val1.holes = struct.unpack(pattern, str[start:end]) 00503 val1.holes = map(bool, val1.holes) 00504 self.objects.shapes.append(val1) 00505 return self 00506 except struct.error as e: 00507 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00508 00509 00510 def serialize_numpy(self, buff, numpy): 00511 """ 00512 serialize message with numpy array types into buffer 00513 @param buff: buffer 00514 @type buff: StringIO 00515 @param numpy: numpy python module 00516 @type numpy module 00517 """ 00518 try: 00519 _x = self 00520 buff.write(_struct_3I.pack(_x.objects.header.seq, _x.objects.header.stamp.secs, _x.objects.header.stamp.nsecs)) 00521 _x = self.objects.header.frame_id 00522 length = len(_x) 00523 buff.write(struct.pack('<I%ss'%length, length, _x)) 00524 length = len(self.objects.shapes) 00525 buff.write(_struct_I.pack(length)) 00526 for val1 in self.objects.shapes: 00527 _v13 = val1.header 00528 buff.write(_struct_I.pack(_v13.seq)) 00529 _v14 = _v13.stamp 00530 _x = _v14 00531 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00532 _x = _v13.frame_id 00533 length = len(_x) 00534 buff.write(struct.pack('<I%ss'%length, length, _x)) 00535 _x = val1 00536 buff.write(_struct_Bi.pack(_x.type, _x.id)) 00537 length = len(val1.params) 00538 buff.write(_struct_I.pack(length)) 00539 pattern = '<%sd'%length 00540 buff.write(val1.params.tostring()) 00541 length = len(val1.points) 00542 buff.write(_struct_I.pack(length)) 00543 for val2 in val1.points: 00544 _v15 = val2.header 00545 buff.write(_struct_I.pack(_v15.seq)) 00546 _v16 = _v15.stamp 00547 _x = _v16 00548 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00549 _x = _v15.frame_id 00550 length = len(_x) 00551 buff.write(struct.pack('<I%ss'%length, length, _x)) 00552 _x = val2 00553 buff.write(_struct_2I.pack(_x.height, _x.width)) 00554 length = len(val2.fields) 00555 buff.write(_struct_I.pack(length)) 00556 for val3 in val2.fields: 00557 _x = val3.name 00558 length = len(_x) 00559 buff.write(struct.pack('<I%ss'%length, length, _x)) 00560 _x = val3 00561 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00562 _x = val2 00563 buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step)) 00564 _x = val2.data 00565 length = len(_x) 00566 # - if encoded as a list instead, serialize as bytes instead of string 00567 if type(_x) in [list, tuple]: 00568 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00569 else: 00570 buff.write(struct.pack('<I%ss'%length, length, _x)) 00571 buff.write(_struct_B.pack(val2.is_dense)) 00572 length = len(val1.vertices) 00573 buff.write(_struct_I.pack(length)) 00574 pattern = '<%si'%length 00575 buff.write(val1.vertices.tostring()) 00576 _v17 = val1.centroid 00577 _x = _v17 00578 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00579 _v18 = val1.color 00580 _x = _v18 00581 buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a)) 00582 length = len(val1.holes) 00583 buff.write(_struct_I.pack(length)) 00584 pattern = '<%sB'%length 00585 buff.write(val1.holes.tostring()) 00586 except struct.error as se: self._check_types(se) 00587 except TypeError as te: self._check_types(te) 00588 00589 def deserialize_numpy(self, str, numpy): 00590 """ 00591 unpack serialized message in str into this message instance using numpy for array types 00592 @param str: byte array of serialized message 00593 @type str: str 00594 @param numpy: numpy python module 00595 @type numpy: module 00596 """ 00597 try: 00598 if self.objects is None: 00599 self.objects = cob_3d_mapping_msgs.msg.ShapeArray() 00600 end = 0 00601 _x = self 00602 start = end 00603 end += 12 00604 (_x.objects.header.seq, _x.objects.header.stamp.secs, _x.objects.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00605 start = end 00606 end += 4 00607 (length,) = _struct_I.unpack(str[start:end]) 00608 start = end 00609 end += length 00610 self.objects.header.frame_id = str[start:end] 00611 start = end 00612 end += 4 00613 (length,) = _struct_I.unpack(str[start:end]) 00614 self.objects.shapes = [] 00615 for i in range(0, length): 00616 val1 = cob_3d_mapping_msgs.msg.Shape() 00617 _v19 = val1.header 00618 start = end 00619 end += 4 00620 (_v19.seq,) = _struct_I.unpack(str[start:end]) 00621 _v20 = _v19.stamp 00622 _x = _v20 00623 start = end 00624 end += 8 00625 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00626 start = end 00627 end += 4 00628 (length,) = _struct_I.unpack(str[start:end]) 00629 start = end 00630 end += length 00631 _v19.frame_id = str[start:end] 00632 _x = val1 00633 start = end 00634 end += 5 00635 (_x.type, _x.id,) = _struct_Bi.unpack(str[start:end]) 00636 start = end 00637 end += 4 00638 (length,) = _struct_I.unpack(str[start:end]) 00639 pattern = '<%sd'%length 00640 start = end 00641 end += struct.calcsize(pattern) 00642 val1.params = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00643 start = end 00644 end += 4 00645 (length,) = _struct_I.unpack(str[start:end]) 00646 val1.points = [] 00647 for i in range(0, length): 00648 val2 = sensor_msgs.msg.PointCloud2() 00649 _v21 = val2.header 00650 start = end 00651 end += 4 00652 (_v21.seq,) = _struct_I.unpack(str[start:end]) 00653 _v22 = _v21.stamp 00654 _x = _v22 00655 start = end 00656 end += 8 00657 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00658 start = end 00659 end += 4 00660 (length,) = _struct_I.unpack(str[start:end]) 00661 start = end 00662 end += length 00663 _v21.frame_id = str[start:end] 00664 _x = val2 00665 start = end 00666 end += 8 00667 (_x.height, _x.width,) = _struct_2I.unpack(str[start:end]) 00668 start = end 00669 end += 4 00670 (length,) = _struct_I.unpack(str[start:end]) 00671 val2.fields = [] 00672 for i in range(0, length): 00673 val3 = sensor_msgs.msg.PointField() 00674 start = end 00675 end += 4 00676 (length,) = _struct_I.unpack(str[start:end]) 00677 start = end 00678 end += length 00679 val3.name = str[start:end] 00680 _x = val3 00681 start = end 00682 end += 9 00683 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00684 val2.fields.append(val3) 00685 _x = val2 00686 start = end 00687 end += 9 00688 (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end]) 00689 val2.is_bigendian = bool(val2.is_bigendian) 00690 start = end 00691 end += 4 00692 (length,) = _struct_I.unpack(str[start:end]) 00693 start = end 00694 end += length 00695 val2.data = str[start:end] 00696 start = end 00697 end += 1 00698 (val2.is_dense,) = _struct_B.unpack(str[start:end]) 00699 val2.is_dense = bool(val2.is_dense) 00700 val1.points.append(val2) 00701 start = end 00702 end += 4 00703 (length,) = _struct_I.unpack(str[start:end]) 00704 pattern = '<%si'%length 00705 start = end 00706 end += struct.calcsize(pattern) 00707 val1.vertices = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length) 00708 _v23 = val1.centroid 00709 _x = _v23 00710 start = end 00711 end += 12 00712 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00713 _v24 = val1.color 00714 _x = _v24 00715 start = end 00716 end += 16 00717 (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end]) 00718 start = end 00719 end += 4 00720 (length,) = _struct_I.unpack(str[start:end]) 00721 pattern = '<%sB'%length 00722 start = end 00723 end += struct.calcsize(pattern) 00724 val1.holes = numpy.frombuffer(str[start:end], dtype=numpy.bool, count=length) 00725 val1.holes = map(bool, val1.holes) 00726 self.objects.shapes.append(val1) 00727 return self 00728 except struct.error as e: 00729 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00730 00731 _struct_I = roslib.message.struct_I 00732 _struct_IBI = struct.Struct("<IBI") 00733 _struct_B = struct.Struct("<B") 00734 _struct_Bi = struct.Struct("<Bi") 00735 _struct_3f = struct.Struct("<3f") 00736 _struct_3I = struct.Struct("<3I") 00737 _struct_B2I = struct.Struct("<B2I") 00738 _struct_4f = struct.Struct("<4f") 00739 _struct_2I = struct.Struct("<2I") 00740 class GetObjectsOfClass(roslib.message.ServiceDefinition): 00741 _type = 'cob_3d_mapping_msgs/GetObjectsOfClass' 00742 _md5sum = 'e4d8804f5f141f3e5c79ebc2860956d6' 00743 _request_class = GetObjectsOfClassRequest 00744 _response_class = GetObjectsOfClassResponse