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