_GetMapROI.py
Go to the documentation of this file.
00001 """autogenerated by genpy from map_msgs/GetMapROIRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 
00008 class GetMapROIRequest(genpy.Message):
00009   _md5sum = "43c2ff8f45af555c0eaf070c401e9a47"
00010   _type = "map_msgs/GetMapROIRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """float64 x
00013 float64 y
00014 float64 l_x
00015 float64 l_y
00016 
00017 """
00018   __slots__ = ['x','y','l_x','l_y']
00019   _slot_types = ['float64','float64','float64','float64']
00020 
00021   def __init__(self, *args, **kwds):
00022     """
00023     Constructor. Any message fields that are implicitly/explicitly
00024     set to None will be assigned a default value. The recommend
00025     use is keyword arguments as this is more robust to future message
00026     changes.  You cannot mix in-order arguments and keyword arguments.
00027 
00028     The available fields are:
00029        x,y,l_x,l_y
00030 
00031     :param args: complete set of field values, in .msg order
00032     :param kwds: use keyword arguments corresponding to message field names
00033     to set specific fields.
00034     """
00035     if args or kwds:
00036       super(GetMapROIRequest, self).__init__(*args, **kwds)
00037       #message fields cannot be None, assign default values for those that are
00038       if self.x is None:
00039         self.x = 0.
00040       if self.y is None:
00041         self.y = 0.
00042       if self.l_x is None:
00043         self.l_x = 0.
00044       if self.l_y is None:
00045         self.l_y = 0.
00046     else:
00047       self.x = 0.
00048       self.y = 0.
00049       self.l_x = 0.
00050       self.l_y = 0.
00051 
00052   def _get_types(self):
00053     """
00054     internal API method
00055     """
00056     return self._slot_types
00057 
00058   def serialize(self, buff):
00059     """
00060     serialize message into buffer
00061     :param buff: buffer, ``StringIO``
00062     """
00063     try:
00064       _x = self
00065       buff.write(_struct_4d.pack(_x.x, _x.y, _x.l_x, _x.l_y))
00066     except struct.error as se: self._check_types(se)
00067     except TypeError as te: self._check_types(te)
00068 
00069   def deserialize(self, str):
00070     """
00071     unpack serialized message in str into this message instance
00072     :param str: byte array of serialized message, ``str``
00073     """
00074     try:
00075       end = 0
00076       _x = self
00077       start = end
00078       end += 32
00079       (_x.x, _x.y, _x.l_x, _x.l_y,) = _struct_4d.unpack(str[start:end])
00080       return self
00081     except struct.error as e:
00082       raise genpy.DeserializationError(e) #most likely buffer underfill
00083 
00084 
00085   def serialize_numpy(self, buff, numpy):
00086     """
00087     serialize message with numpy array types into buffer
00088     :param buff: buffer, ``StringIO``
00089     :param numpy: numpy python module
00090     """
00091     try:
00092       _x = self
00093       buff.write(_struct_4d.pack(_x.x, _x.y, _x.l_x, _x.l_y))
00094     except struct.error as se: self._check_types(se)
00095     except TypeError as te: self._check_types(te)
00096 
00097   def deserialize_numpy(self, str, numpy):
00098     """
00099     unpack serialized message in str into this message instance using numpy for array types
00100     :param str: byte array of serialized message, ``str``
00101     :param numpy: numpy python module
00102     """
00103     try:
00104       end = 0
00105       _x = self
00106       start = end
00107       end += 32
00108       (_x.x, _x.y, _x.l_x, _x.l_y,) = _struct_4d.unpack(str[start:end])
00109       return self
00110     except struct.error as e:
00111       raise genpy.DeserializationError(e) #most likely buffer underfill
00112 
00113 _struct_I = genpy.struct_I
00114 _struct_4d = struct.Struct("<4d")
00115 """autogenerated by genpy from map_msgs/GetMapROIResponse.msg. Do not edit."""
00116 import sys
00117 python3 = True if sys.hexversion > 0x03000000 else False
00118 import genpy
00119 import struct
00120 
00121 import geometry_msgs.msg
00122 import nav_msgs.msg
00123 import genpy
00124 import std_msgs.msg
00125 
00126 class GetMapROIResponse(genpy.Message):
00127   _md5sum = "4d1986519c00d81967d2891a606b234c"
00128   _type = "map_msgs/GetMapROIResponse"
00129   _has_header = False #flag to mark the presence of a Header object
00130   _full_text = """nav_msgs/OccupancyGrid sub_map
00131 
00132 ================================================================================
00133 MSG: nav_msgs/OccupancyGrid
00134 # This represents a 2-D grid map, in which each cell represents the probability of
00135 # occupancy.
00136 
00137 Header header 
00138 
00139 #MetaData for the map
00140 MapMetaData info
00141 
00142 # The map data, in row-major order, starting with (0,0).  Occupancy
00143 # probabilities are in the range [0,100].  Unknown is -1.
00144 int8[] data
00145 
00146 ================================================================================
00147 MSG: std_msgs/Header
00148 # Standard metadata for higher-level stamped data types.
00149 # This is generally used to communicate timestamped data 
00150 # in a particular coordinate frame.
00151 # 
00152 # sequence ID: consecutively increasing ID 
00153 uint32 seq
00154 #Two-integer timestamp that is expressed as:
00155 # * stamp.secs: seconds (stamp_secs) since epoch
00156 # * stamp.nsecs: nanoseconds since stamp_secs
00157 # time-handling sugar is provided by the client library
00158 time stamp
00159 #Frame this data is associated with
00160 # 0: no frame
00161 # 1: global frame
00162 string frame_id
00163 
00164 ================================================================================
00165 MSG: nav_msgs/MapMetaData
00166 # This hold basic information about the characterists of the OccupancyGrid
00167 
00168 # The time at which the map was loaded
00169 time map_load_time
00170 # The map resolution [m/cell]
00171 float32 resolution
00172 # Map width [cells]
00173 uint32 width
00174 # Map height [cells]
00175 uint32 height
00176 # The origin of the map [m, m, rad].  This is the real-world pose of the
00177 # cell (0,0) in the map.
00178 geometry_msgs/Pose origin
00179 ================================================================================
00180 MSG: geometry_msgs/Pose
00181 # A representation of pose in free space, composed of postion and orientation. 
00182 Point position
00183 Quaternion orientation
00184 
00185 ================================================================================
00186 MSG: geometry_msgs/Point
00187 # This contains the position of a point in free space
00188 float64 x
00189 float64 y
00190 float64 z
00191 
00192 ================================================================================
00193 MSG: geometry_msgs/Quaternion
00194 # This represents an orientation in free space in quaternion form.
00195 
00196 float64 x
00197 float64 y
00198 float64 z
00199 float64 w
00200 
00201 """
00202   __slots__ = ['sub_map']
00203   _slot_types = ['nav_msgs/OccupancyGrid']
00204 
00205   def __init__(self, *args, **kwds):
00206     """
00207     Constructor. Any message fields that are implicitly/explicitly
00208     set to None will be assigned a default value. The recommend
00209     use is keyword arguments as this is more robust to future message
00210     changes.  You cannot mix in-order arguments and keyword arguments.
00211 
00212     The available fields are:
00213        sub_map
00214 
00215     :param args: complete set of field values, in .msg order
00216     :param kwds: use keyword arguments corresponding to message field names
00217     to set specific fields.
00218     """
00219     if args or kwds:
00220       super(GetMapROIResponse, self).__init__(*args, **kwds)
00221       #message fields cannot be None, assign default values for those that are
00222       if self.sub_map is None:
00223         self.sub_map = nav_msgs.msg.OccupancyGrid()
00224     else:
00225       self.sub_map = nav_msgs.msg.OccupancyGrid()
00226 
00227   def _get_types(self):
00228     """
00229     internal API method
00230     """
00231     return self._slot_types
00232 
00233   def serialize(self, buff):
00234     """
00235     serialize message into buffer
00236     :param buff: buffer, ``StringIO``
00237     """
00238     try:
00239       _x = self
00240       buff.write(_struct_3I.pack(_x.sub_map.header.seq, _x.sub_map.header.stamp.secs, _x.sub_map.header.stamp.nsecs))
00241       _x = self.sub_map.header.frame_id
00242       length = len(_x)
00243       if python3 or type(_x) == unicode:
00244         _x = _x.encode('utf-8')
00245         length = len(_x)
00246       buff.write(struct.pack('<I%ss'%length, length, _x))
00247       _x = self
00248       buff.write(_struct_2If2I7d.pack(_x.sub_map.info.map_load_time.secs, _x.sub_map.info.map_load_time.nsecs, _x.sub_map.info.resolution, _x.sub_map.info.width, _x.sub_map.info.height, _x.sub_map.info.origin.position.x, _x.sub_map.info.origin.position.y, _x.sub_map.info.origin.position.z, _x.sub_map.info.origin.orientation.x, _x.sub_map.info.origin.orientation.y, _x.sub_map.info.origin.orientation.z, _x.sub_map.info.origin.orientation.w))
00249       length = len(self.sub_map.data)
00250       buff.write(_struct_I.pack(length))
00251       pattern = '<%sb'%length
00252       buff.write(struct.pack(pattern, *self.sub_map.data))
00253     except struct.error as se: self._check_types(se)
00254     except TypeError as te: self._check_types(te)
00255 
00256   def deserialize(self, str):
00257     """
00258     unpack serialized message in str into this message instance
00259     :param str: byte array of serialized message, ``str``
00260     """
00261     try:
00262       if self.sub_map is None:
00263         self.sub_map = nav_msgs.msg.OccupancyGrid()
00264       end = 0
00265       _x = self
00266       start = end
00267       end += 12
00268       (_x.sub_map.header.seq, _x.sub_map.header.stamp.secs, _x.sub_map.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00269       start = end
00270       end += 4
00271       (length,) = _struct_I.unpack(str[start:end])
00272       start = end
00273       end += length
00274       if python3:
00275         self.sub_map.header.frame_id = str[start:end].decode('utf-8')
00276       else:
00277         self.sub_map.header.frame_id = str[start:end]
00278       _x = self
00279       start = end
00280       end += 76
00281       (_x.sub_map.info.map_load_time.secs, _x.sub_map.info.map_load_time.nsecs, _x.sub_map.info.resolution, _x.sub_map.info.width, _x.sub_map.info.height, _x.sub_map.info.origin.position.x, _x.sub_map.info.origin.position.y, _x.sub_map.info.origin.position.z, _x.sub_map.info.origin.orientation.x, _x.sub_map.info.origin.orientation.y, _x.sub_map.info.origin.orientation.z, _x.sub_map.info.origin.orientation.w,) = _struct_2If2I7d.unpack(str[start:end])
00282       start = end
00283       end += 4
00284       (length,) = _struct_I.unpack(str[start:end])
00285       pattern = '<%sb'%length
00286       start = end
00287       end += struct.calcsize(pattern)
00288       self.sub_map.data = struct.unpack(pattern, str[start:end])
00289       return self
00290     except struct.error as e:
00291       raise genpy.DeserializationError(e) #most likely buffer underfill
00292 
00293 
00294   def serialize_numpy(self, buff, numpy):
00295     """
00296     serialize message with numpy array types into buffer
00297     :param buff: buffer, ``StringIO``
00298     :param numpy: numpy python module
00299     """
00300     try:
00301       _x = self
00302       buff.write(_struct_3I.pack(_x.sub_map.header.seq, _x.sub_map.header.stamp.secs, _x.sub_map.header.stamp.nsecs))
00303       _x = self.sub_map.header.frame_id
00304       length = len(_x)
00305       if python3 or type(_x) == unicode:
00306         _x = _x.encode('utf-8')
00307         length = len(_x)
00308       buff.write(struct.pack('<I%ss'%length, length, _x))
00309       _x = self
00310       buff.write(_struct_2If2I7d.pack(_x.sub_map.info.map_load_time.secs, _x.sub_map.info.map_load_time.nsecs, _x.sub_map.info.resolution, _x.sub_map.info.width, _x.sub_map.info.height, _x.sub_map.info.origin.position.x, _x.sub_map.info.origin.position.y, _x.sub_map.info.origin.position.z, _x.sub_map.info.origin.orientation.x, _x.sub_map.info.origin.orientation.y, _x.sub_map.info.origin.orientation.z, _x.sub_map.info.origin.orientation.w))
00311       length = len(self.sub_map.data)
00312       buff.write(_struct_I.pack(length))
00313       pattern = '<%sb'%length
00314       buff.write(self.sub_map.data.tostring())
00315     except struct.error as se: self._check_types(se)
00316     except TypeError as te: self._check_types(te)
00317 
00318   def deserialize_numpy(self, str, numpy):
00319     """
00320     unpack serialized message in str into this message instance using numpy for array types
00321     :param str: byte array of serialized message, ``str``
00322     :param numpy: numpy python module
00323     """
00324     try:
00325       if self.sub_map is None:
00326         self.sub_map = nav_msgs.msg.OccupancyGrid()
00327       end = 0
00328       _x = self
00329       start = end
00330       end += 12
00331       (_x.sub_map.header.seq, _x.sub_map.header.stamp.secs, _x.sub_map.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00332       start = end
00333       end += 4
00334       (length,) = _struct_I.unpack(str[start:end])
00335       start = end
00336       end += length
00337       if python3:
00338         self.sub_map.header.frame_id = str[start:end].decode('utf-8')
00339       else:
00340         self.sub_map.header.frame_id = str[start:end]
00341       _x = self
00342       start = end
00343       end += 76
00344       (_x.sub_map.info.map_load_time.secs, _x.sub_map.info.map_load_time.nsecs, _x.sub_map.info.resolution, _x.sub_map.info.width, _x.sub_map.info.height, _x.sub_map.info.origin.position.x, _x.sub_map.info.origin.position.y, _x.sub_map.info.origin.position.z, _x.sub_map.info.origin.orientation.x, _x.sub_map.info.origin.orientation.y, _x.sub_map.info.origin.orientation.z, _x.sub_map.info.origin.orientation.w,) = _struct_2If2I7d.unpack(str[start:end])
00345       start = end
00346       end += 4
00347       (length,) = _struct_I.unpack(str[start:end])
00348       pattern = '<%sb'%length
00349       start = end
00350       end += struct.calcsize(pattern)
00351       self.sub_map.data = numpy.frombuffer(str[start:end], dtype=numpy.int8, count=length)
00352       return self
00353     except struct.error as e:
00354       raise genpy.DeserializationError(e) #most likely buffer underfill
00355 
00356 _struct_I = genpy.struct_I
00357 _struct_3I = struct.Struct("<3I")
00358 _struct_2If2I7d = struct.Struct("<2If2I7d")
00359 class GetMapROI(object):
00360   _type          = 'map_msgs/GetMapROI'
00361   _md5sum = '81aa75ecf00f4571a9be0d9dc6dea512'
00362   _request_class  = GetMapROIRequest
00363   _response_class = GetMapROIResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends


map_msgs
Author(s): Stéphane Magnenat
autogenerated on Fri May 31 2013 08:22:01