_OverlayClouds.py
Go to the documentation of this file.
00001 """autogenerated by genpy from occupancy_grid_utils/OverlayClouds.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import geometry_msgs.msg
00008 import nav_msgs.msg
00009 import genpy
00010 
00011 class OverlayClouds(genpy.Message):
00012   _md5sum = "6614760373735657bd9ed4bf302d9d70"
00013   _type = "occupancy_grid_utils/OverlayClouds"
00014   _has_header = False #flag to mark the presence of a Header object
00015   _full_text = """nav_msgs/MapMetaData info
00016 string frame_id
00017 float32 occupancy_threshold
00018 float32 max_distance
00019 float32 min_pass_through
00020 int32[] hit_counts
00021 int32[] pass_through_counts
00022 ================================================================================
00023 MSG: nav_msgs/MapMetaData
00024 # This hold basic information about the characterists of the OccupancyGrid
00025 
00026 # The time at which the map was loaded
00027 time map_load_time
00028 # The map resolution [m/cell]
00029 float32 resolution
00030 # Map width [cells]
00031 uint32 width
00032 # Map height [cells]
00033 uint32 height
00034 # The origin of the map [m, m, rad].  This is the real-world pose of the
00035 # cell (0,0) in the map.
00036 geometry_msgs/Pose origin
00037 ================================================================================
00038 MSG: geometry_msgs/Pose
00039 # A representation of pose in free space, composed of postion and orientation. 
00040 Point position
00041 Quaternion orientation
00042 
00043 ================================================================================
00044 MSG: geometry_msgs/Point
00045 # This contains the position of a point in free space
00046 float64 x
00047 float64 y
00048 float64 z
00049 
00050 ================================================================================
00051 MSG: geometry_msgs/Quaternion
00052 # This represents an orientation in free space in quaternion form.
00053 
00054 float64 x
00055 float64 y
00056 float64 z
00057 float64 w
00058 
00059 """
00060   __slots__ = ['info','frame_id','occupancy_threshold','max_distance','min_pass_through','hit_counts','pass_through_counts']
00061   _slot_types = ['nav_msgs/MapMetaData','string','float32','float32','float32','int32[]','int32[]']
00062 
00063   def __init__(self, *args, **kwds):
00064     """
00065     Constructor. Any message fields that are implicitly/explicitly
00066     set to None will be assigned a default value. The recommend
00067     use is keyword arguments as this is more robust to future message
00068     changes.  You cannot mix in-order arguments and keyword arguments.
00069 
00070     The available fields are:
00071        info,frame_id,occupancy_threshold,max_distance,min_pass_through,hit_counts,pass_through_counts
00072 
00073     :param args: complete set of field values, in .msg order
00074     :param kwds: use keyword arguments corresponding to message field names
00075     to set specific fields.
00076     """
00077     if args or kwds:
00078       super(OverlayClouds, self).__init__(*args, **kwds)
00079       #message fields cannot be None, assign default values for those that are
00080       if self.info is None:
00081         self.info = nav_msgs.msg.MapMetaData()
00082       if self.frame_id is None:
00083         self.frame_id = ''
00084       if self.occupancy_threshold is None:
00085         self.occupancy_threshold = 0.
00086       if self.max_distance is None:
00087         self.max_distance = 0.
00088       if self.min_pass_through is None:
00089         self.min_pass_through = 0.
00090       if self.hit_counts is None:
00091         self.hit_counts = []
00092       if self.pass_through_counts is None:
00093         self.pass_through_counts = []
00094     else:
00095       self.info = nav_msgs.msg.MapMetaData()
00096       self.frame_id = ''
00097       self.occupancy_threshold = 0.
00098       self.max_distance = 0.
00099       self.min_pass_through = 0.
00100       self.hit_counts = []
00101       self.pass_through_counts = []
00102 
00103   def _get_types(self):
00104     """
00105     internal API method
00106     """
00107     return self._slot_types
00108 
00109   def serialize(self, buff):
00110     """
00111     serialize message into buffer
00112     :param buff: buffer, ``StringIO``
00113     """
00114     try:
00115       _x = self
00116       buff.write(_struct_2If2I7d.pack(_x.info.map_load_time.secs, _x.info.map_load_time.nsecs, _x.info.resolution, _x.info.width, _x.info.height, _x.info.origin.position.x, _x.info.origin.position.y, _x.info.origin.position.z, _x.info.origin.orientation.x, _x.info.origin.orientation.y, _x.info.origin.orientation.z, _x.info.origin.orientation.w))
00117       _x = self.frame_id
00118       length = len(_x)
00119       if python3 or type(_x) == unicode:
00120         _x = _x.encode('utf-8')
00121         length = len(_x)
00122       buff.write(struct.pack('<I%ss'%length, length, _x))
00123       _x = self
00124       buff.write(_struct_3f.pack(_x.occupancy_threshold, _x.max_distance, _x.min_pass_through))
00125       length = len(self.hit_counts)
00126       buff.write(_struct_I.pack(length))
00127       pattern = '<%si'%length
00128       buff.write(struct.pack(pattern, *self.hit_counts))
00129       length = len(self.pass_through_counts)
00130       buff.write(_struct_I.pack(length))
00131       pattern = '<%si'%length
00132       buff.write(struct.pack(pattern, *self.pass_through_counts))
00133     except struct.error as se: self._check_types(se)
00134     except TypeError as te: self._check_types(te)
00135 
00136   def deserialize(self, str):
00137     """
00138     unpack serialized message in str into this message instance
00139     :param str: byte array of serialized message, ``str``
00140     """
00141     try:
00142       if self.info is None:
00143         self.info = nav_msgs.msg.MapMetaData()
00144       end = 0
00145       _x = self
00146       start = end
00147       end += 76
00148       (_x.info.map_load_time.secs, _x.info.map_load_time.nsecs, _x.info.resolution, _x.info.width, _x.info.height, _x.info.origin.position.x, _x.info.origin.position.y, _x.info.origin.position.z, _x.info.origin.orientation.x, _x.info.origin.orientation.y, _x.info.origin.orientation.z, _x.info.origin.orientation.w,) = _struct_2If2I7d.unpack(str[start:end])
00149       start = end
00150       end += 4
00151       (length,) = _struct_I.unpack(str[start:end])
00152       start = end
00153       end += length
00154       if python3:
00155         self.frame_id = str[start:end].decode('utf-8')
00156       else:
00157         self.frame_id = str[start:end]
00158       _x = self
00159       start = end
00160       end += 12
00161       (_x.occupancy_threshold, _x.max_distance, _x.min_pass_through,) = _struct_3f.unpack(str[start:end])
00162       start = end
00163       end += 4
00164       (length,) = _struct_I.unpack(str[start:end])
00165       pattern = '<%si'%length
00166       start = end
00167       end += struct.calcsize(pattern)
00168       self.hit_counts = struct.unpack(pattern, str[start:end])
00169       start = end
00170       end += 4
00171       (length,) = _struct_I.unpack(str[start:end])
00172       pattern = '<%si'%length
00173       start = end
00174       end += struct.calcsize(pattern)
00175       self.pass_through_counts = struct.unpack(pattern, str[start:end])
00176       return self
00177     except struct.error as e:
00178       raise genpy.DeserializationError(e) #most likely buffer underfill
00179 
00180 
00181   def serialize_numpy(self, buff, numpy):
00182     """
00183     serialize message with numpy array types into buffer
00184     :param buff: buffer, ``StringIO``
00185     :param numpy: numpy python module
00186     """
00187     try:
00188       _x = self
00189       buff.write(_struct_2If2I7d.pack(_x.info.map_load_time.secs, _x.info.map_load_time.nsecs, _x.info.resolution, _x.info.width, _x.info.height, _x.info.origin.position.x, _x.info.origin.position.y, _x.info.origin.position.z, _x.info.origin.orientation.x, _x.info.origin.orientation.y, _x.info.origin.orientation.z, _x.info.origin.orientation.w))
00190       _x = self.frame_id
00191       length = len(_x)
00192       if python3 or type(_x) == unicode:
00193         _x = _x.encode('utf-8')
00194         length = len(_x)
00195       buff.write(struct.pack('<I%ss'%length, length, _x))
00196       _x = self
00197       buff.write(_struct_3f.pack(_x.occupancy_threshold, _x.max_distance, _x.min_pass_through))
00198       length = len(self.hit_counts)
00199       buff.write(_struct_I.pack(length))
00200       pattern = '<%si'%length
00201       buff.write(self.hit_counts.tostring())
00202       length = len(self.pass_through_counts)
00203       buff.write(_struct_I.pack(length))
00204       pattern = '<%si'%length
00205       buff.write(self.pass_through_counts.tostring())
00206     except struct.error as se: self._check_types(se)
00207     except TypeError as te: self._check_types(te)
00208 
00209   def deserialize_numpy(self, str, numpy):
00210     """
00211     unpack serialized message in str into this message instance using numpy for array types
00212     :param str: byte array of serialized message, ``str``
00213     :param numpy: numpy python module
00214     """
00215     try:
00216       if self.info is None:
00217         self.info = nav_msgs.msg.MapMetaData()
00218       end = 0
00219       _x = self
00220       start = end
00221       end += 76
00222       (_x.info.map_load_time.secs, _x.info.map_load_time.nsecs, _x.info.resolution, _x.info.width, _x.info.height, _x.info.origin.position.x, _x.info.origin.position.y, _x.info.origin.position.z, _x.info.origin.orientation.x, _x.info.origin.orientation.y, _x.info.origin.orientation.z, _x.info.origin.orientation.w,) = _struct_2If2I7d.unpack(str[start:end])
00223       start = end
00224       end += 4
00225       (length,) = _struct_I.unpack(str[start:end])
00226       start = end
00227       end += length
00228       if python3:
00229         self.frame_id = str[start:end].decode('utf-8')
00230       else:
00231         self.frame_id = str[start:end]
00232       _x = self
00233       start = end
00234       end += 12
00235       (_x.occupancy_threshold, _x.max_distance, _x.min_pass_through,) = _struct_3f.unpack(str[start:end])
00236       start = end
00237       end += 4
00238       (length,) = _struct_I.unpack(str[start:end])
00239       pattern = '<%si'%length
00240       start = end
00241       end += struct.calcsize(pattern)
00242       self.hit_counts = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00243       start = end
00244       end += 4
00245       (length,) = _struct_I.unpack(str[start:end])
00246       pattern = '<%si'%length
00247       start = end
00248       end += struct.calcsize(pattern)
00249       self.pass_through_counts = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00250       return self
00251     except struct.error as e:
00252       raise genpy.DeserializationError(e) #most likely buffer underfill
00253 
00254 _struct_I = genpy.struct_I
00255 _struct_3f = struct.Struct("<3f")
00256 _struct_2If2I7d = struct.Struct("<2If2I7d")


occupancy_grid_utils
Author(s): Bhaskara Marthi
autogenerated on Tue Jan 7 2014 11:17:09