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