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