$search
00001 """autogenerated by genmsg_py from GetPlaneRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetPlaneRequest(roslib.message.Message): 00007 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00008 _type = "cob_3d_mapping_msgs/GetPlaneRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 """ 00012 __slots__ = [] 00013 _slot_types = [] 00014 00015 def __init__(self, *args, **kwds): 00016 """ 00017 Constructor. Any message fields that are implicitly/explicitly 00018 set to None will be assigned a default value. The recommend 00019 use is keyword arguments as this is more robust to future message 00020 changes. You cannot mix in-order arguments and keyword arguments. 00021 00022 The available fields are: 00023 00024 00025 @param args: complete set of field values, in .msg order 00026 @param kwds: use keyword arguments corresponding to message field names 00027 to set specific fields. 00028 """ 00029 if args or kwds: 00030 super(GetPlaneRequest, self).__init__(*args, **kwds) 00031 00032 def _get_types(self): 00033 """ 00034 internal API method 00035 """ 00036 return self._slot_types 00037 00038 def serialize(self, buff): 00039 """ 00040 serialize message into buffer 00041 @param buff: buffer 00042 @type buff: StringIO 00043 """ 00044 try: 00045 pass 00046 except struct.error as se: self._check_types(se) 00047 except TypeError as te: self._check_types(te) 00048 00049 def deserialize(self, str): 00050 """ 00051 unpack serialized message in str into this message instance 00052 @param str: byte array of serialized message 00053 @type str: str 00054 """ 00055 try: 00056 end = 0 00057 return self 00058 except struct.error as e: 00059 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00060 00061 00062 def serialize_numpy(self, buff, numpy): 00063 """ 00064 serialize message with numpy array types into buffer 00065 @param buff: buffer 00066 @type buff: StringIO 00067 @param numpy: numpy python module 00068 @type numpy module 00069 """ 00070 try: 00071 pass 00072 except struct.error as se: self._check_types(se) 00073 except TypeError as te: self._check_types(te) 00074 00075 def deserialize_numpy(self, str, numpy): 00076 """ 00077 unpack serialized message in str into this message instance using numpy for array types 00078 @param str: byte array of serialized message 00079 @type str: str 00080 @param numpy: numpy python module 00081 @type numpy: module 00082 """ 00083 try: 00084 end = 0 00085 return self 00086 except struct.error as e: 00087 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00088 00089 _struct_I = roslib.message.struct_I 00090 """autogenerated by genmsg_py from GetPlaneResponse.msg. Do not edit.""" 00091 import roslib.message 00092 import struct 00093 00094 import std_msgs.msg 00095 import sensor_msgs.msg 00096 00097 class GetPlaneResponse(roslib.message.Message): 00098 _md5sum = "e11c006bc7fabf06881bc7d0de7ba820" 00099 _type = "cob_3d_mapping_msgs/GetPlaneResponse" 00100 _has_header = False #flag to mark the presence of a Header object 00101 _full_text = """sensor_msgs/PointCloud2 pc 00102 sensor_msgs/PointCloud2 hull 00103 std_msgs/Float32[] plane_coeffs 00104 00105 00106 ================================================================================ 00107 MSG: sensor_msgs/PointCloud2 00108 # This message holds a collection of N-dimensional points, which may 00109 # contain additional information such as normals, intensity, etc. The 00110 # point data is stored as a binary blob, its layout described by the 00111 # contents of the "fields" array. 00112 00113 # The point cloud data may be organized 2d (image-like) or 1d 00114 # (unordered). Point clouds organized as 2d images may be produced by 00115 # camera depth sensors such as stereo or time-of-flight. 00116 00117 # Time of sensor data acquisition, and the coordinate frame ID (for 3d 00118 # points). 00119 Header header 00120 00121 # 2D structure of the point cloud. If the cloud is unordered, height is 00122 # 1 and width is the length of the point cloud. 00123 uint32 height 00124 uint32 width 00125 00126 # Describes the channels and their layout in the binary data blob. 00127 PointField[] fields 00128 00129 bool is_bigendian # Is this data bigendian? 00130 uint32 point_step # Length of a point in bytes 00131 uint32 row_step # Length of a row in bytes 00132 uint8[] data # Actual point data, size is (row_step*height) 00133 00134 bool is_dense # True if there are no invalid points 00135 00136 ================================================================================ 00137 MSG: std_msgs/Header 00138 # Standard metadata for higher-level stamped data types. 00139 # This is generally used to communicate timestamped data 00140 # in a particular coordinate frame. 00141 # 00142 # sequence ID: consecutively increasing ID 00143 uint32 seq 00144 #Two-integer timestamp that is expressed as: 00145 # * stamp.secs: seconds (stamp_secs) since epoch 00146 # * stamp.nsecs: nanoseconds since stamp_secs 00147 # time-handling sugar is provided by the client library 00148 time stamp 00149 #Frame this data is associated with 00150 # 0: no frame 00151 # 1: global frame 00152 string frame_id 00153 00154 ================================================================================ 00155 MSG: sensor_msgs/PointField 00156 # This message holds the description of one point entry in the 00157 # PointCloud2 message format. 00158 uint8 INT8 = 1 00159 uint8 UINT8 = 2 00160 uint8 INT16 = 3 00161 uint8 UINT16 = 4 00162 uint8 INT32 = 5 00163 uint8 UINT32 = 6 00164 uint8 FLOAT32 = 7 00165 uint8 FLOAT64 = 8 00166 00167 string name # Name of field 00168 uint32 offset # Offset from start of point struct 00169 uint8 datatype # Datatype enumeration, see above 00170 uint32 count # How many elements in the field 00171 00172 ================================================================================ 00173 MSG: std_msgs/Float32 00174 float32 data 00175 """ 00176 __slots__ = ['pc','hull','plane_coeffs'] 00177 _slot_types = ['sensor_msgs/PointCloud2','sensor_msgs/PointCloud2','std_msgs/Float32[]'] 00178 00179 def __init__(self, *args, **kwds): 00180 """ 00181 Constructor. Any message fields that are implicitly/explicitly 00182 set to None will be assigned a default value. The recommend 00183 use is keyword arguments as this is more robust to future message 00184 changes. You cannot mix in-order arguments and keyword arguments. 00185 00186 The available fields are: 00187 pc,hull,plane_coeffs 00188 00189 @param args: complete set of field values, in .msg order 00190 @param kwds: use keyword arguments corresponding to message field names 00191 to set specific fields. 00192 """ 00193 if args or kwds: 00194 super(GetPlaneResponse, self).__init__(*args, **kwds) 00195 #message fields cannot be None, assign default values for those that are 00196 if self.pc is None: 00197 self.pc = sensor_msgs.msg.PointCloud2() 00198 if self.hull is None: 00199 self.hull = sensor_msgs.msg.PointCloud2() 00200 if self.plane_coeffs is None: 00201 self.plane_coeffs = [] 00202 else: 00203 self.pc = sensor_msgs.msg.PointCloud2() 00204 self.hull = sensor_msgs.msg.PointCloud2() 00205 self.plane_coeffs = [] 00206 00207 def _get_types(self): 00208 """ 00209 internal API method 00210 """ 00211 return self._slot_types 00212 00213 def serialize(self, buff): 00214 """ 00215 serialize message into buffer 00216 @param buff: buffer 00217 @type buff: StringIO 00218 """ 00219 try: 00220 _x = self 00221 buff.write(_struct_3I.pack(_x.pc.header.seq, _x.pc.header.stamp.secs, _x.pc.header.stamp.nsecs)) 00222 _x = self.pc.header.frame_id 00223 length = len(_x) 00224 buff.write(struct.pack('<I%ss'%length, length, _x)) 00225 _x = self 00226 buff.write(_struct_2I.pack(_x.pc.height, _x.pc.width)) 00227 length = len(self.pc.fields) 00228 buff.write(_struct_I.pack(length)) 00229 for val1 in self.pc.fields: 00230 _x = val1.name 00231 length = len(_x) 00232 buff.write(struct.pack('<I%ss'%length, length, _x)) 00233 _x = val1 00234 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00235 _x = self 00236 buff.write(_struct_B2I.pack(_x.pc.is_bigendian, _x.pc.point_step, _x.pc.row_step)) 00237 _x = self.pc.data 00238 length = len(_x) 00239 # - if encoded as a list instead, serialize as bytes instead of string 00240 if type(_x) in [list, tuple]: 00241 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00242 else: 00243 buff.write(struct.pack('<I%ss'%length, length, _x)) 00244 _x = self 00245 buff.write(_struct_B3I.pack(_x.pc.is_dense, _x.hull.header.seq, _x.hull.header.stamp.secs, _x.hull.header.stamp.nsecs)) 00246 _x = self.hull.header.frame_id 00247 length = len(_x) 00248 buff.write(struct.pack('<I%ss'%length, length, _x)) 00249 _x = self 00250 buff.write(_struct_2I.pack(_x.hull.height, _x.hull.width)) 00251 length = len(self.hull.fields) 00252 buff.write(_struct_I.pack(length)) 00253 for val1 in self.hull.fields: 00254 _x = val1.name 00255 length = len(_x) 00256 buff.write(struct.pack('<I%ss'%length, length, _x)) 00257 _x = val1 00258 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00259 _x = self 00260 buff.write(_struct_B2I.pack(_x.hull.is_bigendian, _x.hull.point_step, _x.hull.row_step)) 00261 _x = self.hull.data 00262 length = len(_x) 00263 # - if encoded as a list instead, serialize as bytes instead of string 00264 if type(_x) in [list, tuple]: 00265 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00266 else: 00267 buff.write(struct.pack('<I%ss'%length, length, _x)) 00268 buff.write(_struct_B.pack(self.hull.is_dense)) 00269 length = len(self.plane_coeffs) 00270 buff.write(_struct_I.pack(length)) 00271 for val1 in self.plane_coeffs: 00272 buff.write(_struct_f.pack(val1.data)) 00273 except struct.error as se: self._check_types(se) 00274 except TypeError as te: self._check_types(te) 00275 00276 def deserialize(self, str): 00277 """ 00278 unpack serialized message in str into this message instance 00279 @param str: byte array of serialized message 00280 @type str: str 00281 """ 00282 try: 00283 if self.pc is None: 00284 self.pc = sensor_msgs.msg.PointCloud2() 00285 if self.hull is None: 00286 self.hull = sensor_msgs.msg.PointCloud2() 00287 end = 0 00288 _x = self 00289 start = end 00290 end += 12 00291 (_x.pc.header.seq, _x.pc.header.stamp.secs, _x.pc.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00292 start = end 00293 end += 4 00294 (length,) = _struct_I.unpack(str[start:end]) 00295 start = end 00296 end += length 00297 self.pc.header.frame_id = str[start:end] 00298 _x = self 00299 start = end 00300 end += 8 00301 (_x.pc.height, _x.pc.width,) = _struct_2I.unpack(str[start:end]) 00302 start = end 00303 end += 4 00304 (length,) = _struct_I.unpack(str[start:end]) 00305 self.pc.fields = [] 00306 for i in range(0, length): 00307 val1 = sensor_msgs.msg.PointField() 00308 start = end 00309 end += 4 00310 (length,) = _struct_I.unpack(str[start:end]) 00311 start = end 00312 end += length 00313 val1.name = str[start:end] 00314 _x = val1 00315 start = end 00316 end += 9 00317 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00318 self.pc.fields.append(val1) 00319 _x = self 00320 start = end 00321 end += 9 00322 (_x.pc.is_bigendian, _x.pc.point_step, _x.pc.row_step,) = _struct_B2I.unpack(str[start:end]) 00323 self.pc.is_bigendian = bool(self.pc.is_bigendian) 00324 start = end 00325 end += 4 00326 (length,) = _struct_I.unpack(str[start:end]) 00327 start = end 00328 end += length 00329 self.pc.data = str[start:end] 00330 _x = self 00331 start = end 00332 end += 13 00333 (_x.pc.is_dense, _x.hull.header.seq, _x.hull.header.stamp.secs, _x.hull.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end]) 00334 self.pc.is_dense = bool(self.pc.is_dense) 00335 start = end 00336 end += 4 00337 (length,) = _struct_I.unpack(str[start:end]) 00338 start = end 00339 end += length 00340 self.hull.header.frame_id = str[start:end] 00341 _x = self 00342 start = end 00343 end += 8 00344 (_x.hull.height, _x.hull.width,) = _struct_2I.unpack(str[start:end]) 00345 start = end 00346 end += 4 00347 (length,) = _struct_I.unpack(str[start:end]) 00348 self.hull.fields = [] 00349 for i in range(0, length): 00350 val1 = sensor_msgs.msg.PointField() 00351 start = end 00352 end += 4 00353 (length,) = _struct_I.unpack(str[start:end]) 00354 start = end 00355 end += length 00356 val1.name = str[start:end] 00357 _x = val1 00358 start = end 00359 end += 9 00360 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00361 self.hull.fields.append(val1) 00362 _x = self 00363 start = end 00364 end += 9 00365 (_x.hull.is_bigendian, _x.hull.point_step, _x.hull.row_step,) = _struct_B2I.unpack(str[start:end]) 00366 self.hull.is_bigendian = bool(self.hull.is_bigendian) 00367 start = end 00368 end += 4 00369 (length,) = _struct_I.unpack(str[start:end]) 00370 start = end 00371 end += length 00372 self.hull.data = str[start:end] 00373 start = end 00374 end += 1 00375 (self.hull.is_dense,) = _struct_B.unpack(str[start:end]) 00376 self.hull.is_dense = bool(self.hull.is_dense) 00377 start = end 00378 end += 4 00379 (length,) = _struct_I.unpack(str[start:end]) 00380 self.plane_coeffs = [] 00381 for i in range(0, length): 00382 val1 = std_msgs.msg.Float32() 00383 start = end 00384 end += 4 00385 (val1.data,) = _struct_f.unpack(str[start:end]) 00386 self.plane_coeffs.append(val1) 00387 return self 00388 except struct.error as e: 00389 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00390 00391 00392 def serialize_numpy(self, buff, numpy): 00393 """ 00394 serialize message with numpy array types into buffer 00395 @param buff: buffer 00396 @type buff: StringIO 00397 @param numpy: numpy python module 00398 @type numpy module 00399 """ 00400 try: 00401 _x = self 00402 buff.write(_struct_3I.pack(_x.pc.header.seq, _x.pc.header.stamp.secs, _x.pc.header.stamp.nsecs)) 00403 _x = self.pc.header.frame_id 00404 length = len(_x) 00405 buff.write(struct.pack('<I%ss'%length, length, _x)) 00406 _x = self 00407 buff.write(_struct_2I.pack(_x.pc.height, _x.pc.width)) 00408 length = len(self.pc.fields) 00409 buff.write(_struct_I.pack(length)) 00410 for val1 in self.pc.fields: 00411 _x = val1.name 00412 length = len(_x) 00413 buff.write(struct.pack('<I%ss'%length, length, _x)) 00414 _x = val1 00415 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00416 _x = self 00417 buff.write(_struct_B2I.pack(_x.pc.is_bigendian, _x.pc.point_step, _x.pc.row_step)) 00418 _x = self.pc.data 00419 length = len(_x) 00420 # - if encoded as a list instead, serialize as bytes instead of string 00421 if type(_x) in [list, tuple]: 00422 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00423 else: 00424 buff.write(struct.pack('<I%ss'%length, length, _x)) 00425 _x = self 00426 buff.write(_struct_B3I.pack(_x.pc.is_dense, _x.hull.header.seq, _x.hull.header.stamp.secs, _x.hull.header.stamp.nsecs)) 00427 _x = self.hull.header.frame_id 00428 length = len(_x) 00429 buff.write(struct.pack('<I%ss'%length, length, _x)) 00430 _x = self 00431 buff.write(_struct_2I.pack(_x.hull.height, _x.hull.width)) 00432 length = len(self.hull.fields) 00433 buff.write(_struct_I.pack(length)) 00434 for val1 in self.hull.fields: 00435 _x = val1.name 00436 length = len(_x) 00437 buff.write(struct.pack('<I%ss'%length, length, _x)) 00438 _x = val1 00439 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00440 _x = self 00441 buff.write(_struct_B2I.pack(_x.hull.is_bigendian, _x.hull.point_step, _x.hull.row_step)) 00442 _x = self.hull.data 00443 length = len(_x) 00444 # - if encoded as a list instead, serialize as bytes instead of string 00445 if type(_x) in [list, tuple]: 00446 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00447 else: 00448 buff.write(struct.pack('<I%ss'%length, length, _x)) 00449 buff.write(_struct_B.pack(self.hull.is_dense)) 00450 length = len(self.plane_coeffs) 00451 buff.write(_struct_I.pack(length)) 00452 for val1 in self.plane_coeffs: 00453 buff.write(_struct_f.pack(val1.data)) 00454 except struct.error as se: self._check_types(se) 00455 except TypeError as te: self._check_types(te) 00456 00457 def deserialize_numpy(self, str, numpy): 00458 """ 00459 unpack serialized message in str into this message instance using numpy for array types 00460 @param str: byte array of serialized message 00461 @type str: str 00462 @param numpy: numpy python module 00463 @type numpy: module 00464 """ 00465 try: 00466 if self.pc is None: 00467 self.pc = sensor_msgs.msg.PointCloud2() 00468 if self.hull is None: 00469 self.hull = sensor_msgs.msg.PointCloud2() 00470 end = 0 00471 _x = self 00472 start = end 00473 end += 12 00474 (_x.pc.header.seq, _x.pc.header.stamp.secs, _x.pc.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00475 start = end 00476 end += 4 00477 (length,) = _struct_I.unpack(str[start:end]) 00478 start = end 00479 end += length 00480 self.pc.header.frame_id = str[start:end] 00481 _x = self 00482 start = end 00483 end += 8 00484 (_x.pc.height, _x.pc.width,) = _struct_2I.unpack(str[start:end]) 00485 start = end 00486 end += 4 00487 (length,) = _struct_I.unpack(str[start:end]) 00488 self.pc.fields = [] 00489 for i in range(0, length): 00490 val1 = sensor_msgs.msg.PointField() 00491 start = end 00492 end += 4 00493 (length,) = _struct_I.unpack(str[start:end]) 00494 start = end 00495 end += length 00496 val1.name = str[start:end] 00497 _x = val1 00498 start = end 00499 end += 9 00500 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00501 self.pc.fields.append(val1) 00502 _x = self 00503 start = end 00504 end += 9 00505 (_x.pc.is_bigendian, _x.pc.point_step, _x.pc.row_step,) = _struct_B2I.unpack(str[start:end]) 00506 self.pc.is_bigendian = bool(self.pc.is_bigendian) 00507 start = end 00508 end += 4 00509 (length,) = _struct_I.unpack(str[start:end]) 00510 start = end 00511 end += length 00512 self.pc.data = str[start:end] 00513 _x = self 00514 start = end 00515 end += 13 00516 (_x.pc.is_dense, _x.hull.header.seq, _x.hull.header.stamp.secs, _x.hull.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end]) 00517 self.pc.is_dense = bool(self.pc.is_dense) 00518 start = end 00519 end += 4 00520 (length,) = _struct_I.unpack(str[start:end]) 00521 start = end 00522 end += length 00523 self.hull.header.frame_id = str[start:end] 00524 _x = self 00525 start = end 00526 end += 8 00527 (_x.hull.height, _x.hull.width,) = _struct_2I.unpack(str[start:end]) 00528 start = end 00529 end += 4 00530 (length,) = _struct_I.unpack(str[start:end]) 00531 self.hull.fields = [] 00532 for i in range(0, length): 00533 val1 = sensor_msgs.msg.PointField() 00534 start = end 00535 end += 4 00536 (length,) = _struct_I.unpack(str[start:end]) 00537 start = end 00538 end += length 00539 val1.name = str[start:end] 00540 _x = val1 00541 start = end 00542 end += 9 00543 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00544 self.hull.fields.append(val1) 00545 _x = self 00546 start = end 00547 end += 9 00548 (_x.hull.is_bigendian, _x.hull.point_step, _x.hull.row_step,) = _struct_B2I.unpack(str[start:end]) 00549 self.hull.is_bigendian = bool(self.hull.is_bigendian) 00550 start = end 00551 end += 4 00552 (length,) = _struct_I.unpack(str[start:end]) 00553 start = end 00554 end += length 00555 self.hull.data = str[start:end] 00556 start = end 00557 end += 1 00558 (self.hull.is_dense,) = _struct_B.unpack(str[start:end]) 00559 self.hull.is_dense = bool(self.hull.is_dense) 00560 start = end 00561 end += 4 00562 (length,) = _struct_I.unpack(str[start:end]) 00563 self.plane_coeffs = [] 00564 for i in range(0, length): 00565 val1 = std_msgs.msg.Float32() 00566 start = end 00567 end += 4 00568 (val1.data,) = _struct_f.unpack(str[start:end]) 00569 self.plane_coeffs.append(val1) 00570 return self 00571 except struct.error as e: 00572 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00573 00574 _struct_I = roslib.message.struct_I 00575 _struct_IBI = struct.Struct("<IBI") 00576 _struct_B = struct.Struct("<B") 00577 _struct_f = struct.Struct("<f") 00578 _struct_3I = struct.Struct("<3I") 00579 _struct_B3I = struct.Struct("<B3I") 00580 _struct_B2I = struct.Struct("<B2I") 00581 _struct_2I = struct.Struct("<2I") 00582 class GetPlane(roslib.message.ServiceDefinition): 00583 _type = 'cob_3d_mapping_msgs/GetPlane' 00584 _md5sum = 'e11c006bc7fabf06881bc7d0de7ba820' 00585 _request_class = GetPlaneRequest 00586 _response_class = GetPlaneResponse