00001 """autogenerated by genmsg_py from GeographicMap.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geographic_msgs.msg
00006 import std_msgs.msg
00007
00008 class GeographicMap(roslib.message.Message):
00009 _md5sum = "0ae153e643d20c998e18a72743eb7f40"
00010 _type = "geographic_msgs/GeographicMap"
00011 _has_header = True
00012 _full_text = """# Geographic map for a specified region.
00013
00014 Header header # stamp specifies time
00015 # frame_id (normally /map)
00016
00017 UniqueID id # identifier for this map
00018 BoundingBox bounds # 2D bounding box containing map
00019
00020 WayPoint[] points # way-points
00021 MapFeature[] features # map features
00022 KeyValue[] props # map properties
00023
00024 ================================================================================
00025 MSG: std_msgs/Header
00026 # Standard metadata for higher-level stamped data types.
00027 # This is generally used to communicate timestamped data
00028 # in a particular coordinate frame.
00029 #
00030 # sequence ID: consecutively increasing ID
00031 uint32 seq
00032 #Two-integer timestamp that is expressed as:
00033 # * stamp.secs: seconds (stamp_secs) since epoch
00034 # * stamp.nsecs: nanoseconds since stamp_secs
00035 # time-handling sugar is provided by the client library
00036 time stamp
00037 #Frame this data is associated with
00038 # 0: no frame
00039 # 1: global frame
00040 string frame_id
00041
00042 ================================================================================
00043 MSG: geographic_msgs/UniqueID
00044 # A universally unique identifier (UUID) for a geographic feature.
00045 #
00046 # http://en.wikipedia.org/wiki/Universally_unique_identifier
00047 # http://tools.ietf.org/html/rfc4122.html
00048 #
00049 # For simplicity and human readability, the UUID is represented as a
00050 # string of hex digits and dashes.
00051 #
00052 # UUID generation is up to the programmer, but the intent is for
00053 # matching features within a domain such as Open Street Map to yield
00054 # the same UUID. The recommended method is RFC 4122 variant 5,
00055 # computing the SHA-1 hash of a URL encoded using the map source. For
00056 # example:
00057 #
00058 # http://openstreetmap.org/node/NUMBER
00059 # http://openstreetmap.org/way/NUMBER
00060 # http://openstreetmap.org/relation/NUMBER
00061 #
00062 # Here NUMBER is the decimal representation of the OSM node, way, or
00063 # relation ID without leading zeros.
00064 #
00065 # Other map sources should use similar conventions.
00066
00067 string uuid # format: 01234567-89ab-cdef-0123-456789abcdef
00068
00069 ================================================================================
00070 MSG: geographic_msgs/BoundingBox
00071 # Two-dimensional geographic map bounding box.
00072
00073 # Latitudes are in degrees [-90 .. +90]. Positive is north of equator;
00074 # negative is south.
00075
00076 # Longitudes are in degrees [-180 .. +180]. Positive is east of prime
00077 # meridian; negative is west. At the poles, latitude is -90 or +90,
00078 # and longitude is irrelevant, but must be in range.
00079
00080 # If all bounds are zeros, the bounding box includes the whole world.
00081
00082 float64 min_latitude
00083 float64 min_longitude
00084 float64 max_latitude
00085 float64 max_longitude
00086
00087 ================================================================================
00088 MSG: geographic_msgs/WayPoint
00089 # Way-point element for a geographic map.
00090
00091 UniqueID id # Unique way-point identifier
00092 GeoPoint position # Position relative to WGS 84 ellipsoid
00093 KeyValue[] props # Key/value properties for this point
00094
00095 ================================================================================
00096 MSG: geographic_msgs/GeoPoint
00097 # Geographic point, using the WGS 84 reference ellipsoid.
00098
00099 # Latitude [degrees]. Positive is north of equator; negative is south
00100 # (-90 <= latitude <= +90).
00101 float64 latitude
00102
00103 # Longitude [degrees]. Positive is east of prime meridian; negative is
00104 # west (-180 <= longitude <= +180). At the poles, latitude is -90 or
00105 # +90, and longitude is irrelevant, but must be in range.
00106 float64 longitude
00107
00108 # Altitude [m]. Positive is above the WGS 84 ellipsoid (NaN if unspecified).
00109 float64 altitude
00110
00111 ================================================================================
00112 MSG: geographic_msgs/KeyValue
00113 # Geographic map tag (key, value) pair
00114 #
00115 # This is equivalent to diagnostic_msgs/KeyValue, repeated here to
00116 # avoid introducing a trivial stack dependency.
00117
00118 string key # tag label
00119 string value # corresponding value
00120
00121 ================================================================================
00122 MSG: geographic_msgs/MapFeature
00123 # Geographic map feature.
00124 #
00125 # A list of WayPoint IDs for features like streets, highways, hiking
00126 # trails, the outlines of buildings and parking lots in sequential
00127 # order.
00128 #
00129 # Feature lists may also contain other feature lists as members.
00130
00131 UniqueID id # Unique feature identifier
00132 UniqueID[] components # Sequence of feature components
00133 KeyValue[] props # Key/value properties for this feature
00134
00135 """
00136 __slots__ = ['header','id','bounds','points','features','props']
00137 _slot_types = ['Header','geographic_msgs/UniqueID','geographic_msgs/BoundingBox','geographic_msgs/WayPoint[]','geographic_msgs/MapFeature[]','geographic_msgs/KeyValue[]']
00138
00139 def __init__(self, *args, **kwds):
00140 """
00141 Constructor. Any message fields that are implicitly/explicitly
00142 set to None will be assigned a default value. The recommend
00143 use is keyword arguments as this is more robust to future message
00144 changes. You cannot mix in-order arguments and keyword arguments.
00145
00146 The available fields are:
00147 header,id,bounds,points,features,props
00148
00149 @param args: complete set of field values, in .msg order
00150 @param kwds: use keyword arguments corresponding to message field names
00151 to set specific fields.
00152 """
00153 if args or kwds:
00154 super(GeographicMap, self).__init__(*args, **kwds)
00155
00156 if self.header is None:
00157 self.header = std_msgs.msg._Header.Header()
00158 if self.id is None:
00159 self.id = geographic_msgs.msg.UniqueID()
00160 if self.bounds is None:
00161 self.bounds = geographic_msgs.msg.BoundingBox()
00162 if self.points is None:
00163 self.points = []
00164 if self.features is None:
00165 self.features = []
00166 if self.props is None:
00167 self.props = []
00168 else:
00169 self.header = std_msgs.msg._Header.Header()
00170 self.id = geographic_msgs.msg.UniqueID()
00171 self.bounds = geographic_msgs.msg.BoundingBox()
00172 self.points = []
00173 self.features = []
00174 self.props = []
00175
00176 def _get_types(self):
00177 """
00178 internal API method
00179 """
00180 return self._slot_types
00181
00182 def serialize(self, buff):
00183 """
00184 serialize message into buffer
00185 @param buff: buffer
00186 @type buff: StringIO
00187 """
00188 try:
00189 _x = self
00190 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00191 _x = self.header.frame_id
00192 length = len(_x)
00193 buff.write(struct.pack('<I%ss'%length, length, _x))
00194 _x = self.id.uuid
00195 length = len(_x)
00196 buff.write(struct.pack('<I%ss'%length, length, _x))
00197 _x = self
00198 buff.write(_struct_4d.pack(_x.bounds.min_latitude, _x.bounds.min_longitude, _x.bounds.max_latitude, _x.bounds.max_longitude))
00199 length = len(self.points)
00200 buff.write(_struct_I.pack(length))
00201 for val1 in self.points:
00202 _v1 = val1.id
00203 _x = _v1.uuid
00204 length = len(_x)
00205 buff.write(struct.pack('<I%ss'%length, length, _x))
00206 _v2 = val1.position
00207 _x = _v2
00208 buff.write(_struct_3d.pack(_x.latitude, _x.longitude, _x.altitude))
00209 length = len(val1.props)
00210 buff.write(_struct_I.pack(length))
00211 for val2 in val1.props:
00212 _x = val2.key
00213 length = len(_x)
00214 buff.write(struct.pack('<I%ss'%length, length, _x))
00215 _x = val2.value
00216 length = len(_x)
00217 buff.write(struct.pack('<I%ss'%length, length, _x))
00218 length = len(self.features)
00219 buff.write(_struct_I.pack(length))
00220 for val1 in self.features:
00221 _v3 = val1.id
00222 _x = _v3.uuid
00223 length = len(_x)
00224 buff.write(struct.pack('<I%ss'%length, length, _x))
00225 length = len(val1.components)
00226 buff.write(_struct_I.pack(length))
00227 for val2 in val1.components:
00228 _x = val2.uuid
00229 length = len(_x)
00230 buff.write(struct.pack('<I%ss'%length, length, _x))
00231 length = len(val1.props)
00232 buff.write(_struct_I.pack(length))
00233 for val2 in val1.props:
00234 _x = val2.key
00235 length = len(_x)
00236 buff.write(struct.pack('<I%ss'%length, length, _x))
00237 _x = val2.value
00238 length = len(_x)
00239 buff.write(struct.pack('<I%ss'%length, length, _x))
00240 length = len(self.props)
00241 buff.write(_struct_I.pack(length))
00242 for val1 in self.props:
00243 _x = val1.key
00244 length = len(_x)
00245 buff.write(struct.pack('<I%ss'%length, length, _x))
00246 _x = val1.value
00247 length = len(_x)
00248 buff.write(struct.pack('<I%ss'%length, length, _x))
00249 except struct.error as se: self._check_types(se)
00250 except TypeError as te: self._check_types(te)
00251
00252 def deserialize(self, str):
00253 """
00254 unpack serialized message in str into this message instance
00255 @param str: byte array of serialized message
00256 @type str: str
00257 """
00258 try:
00259 if self.header is None:
00260 self.header = std_msgs.msg._Header.Header()
00261 if self.id is None:
00262 self.id = geographic_msgs.msg.UniqueID()
00263 if self.bounds is None:
00264 self.bounds = geographic_msgs.msg.BoundingBox()
00265 end = 0
00266 _x = self
00267 start = end
00268 end += 12
00269 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00270 start = end
00271 end += 4
00272 (length,) = _struct_I.unpack(str[start:end])
00273 start = end
00274 end += length
00275 self.header.frame_id = str[start:end]
00276 start = end
00277 end += 4
00278 (length,) = _struct_I.unpack(str[start:end])
00279 start = end
00280 end += length
00281 self.id.uuid = str[start:end]
00282 _x = self
00283 start = end
00284 end += 32
00285 (_x.bounds.min_latitude, _x.bounds.min_longitude, _x.bounds.max_latitude, _x.bounds.max_longitude,) = _struct_4d.unpack(str[start:end])
00286 start = end
00287 end += 4
00288 (length,) = _struct_I.unpack(str[start:end])
00289 self.points = []
00290 for i in range(0, length):
00291 val1 = geographic_msgs.msg.WayPoint()
00292 _v4 = val1.id
00293 start = end
00294 end += 4
00295 (length,) = _struct_I.unpack(str[start:end])
00296 start = end
00297 end += length
00298 _v4.uuid = str[start:end]
00299 _v5 = val1.position
00300 _x = _v5
00301 start = end
00302 end += 24
00303 (_x.latitude, _x.longitude, _x.altitude,) = _struct_3d.unpack(str[start:end])
00304 start = end
00305 end += 4
00306 (length,) = _struct_I.unpack(str[start:end])
00307 val1.props = []
00308 for i in range(0, length):
00309 val2 = geographic_msgs.msg.KeyValue()
00310 start = end
00311 end += 4
00312 (length,) = _struct_I.unpack(str[start:end])
00313 start = end
00314 end += length
00315 val2.key = str[start:end]
00316 start = end
00317 end += 4
00318 (length,) = _struct_I.unpack(str[start:end])
00319 start = end
00320 end += length
00321 val2.value = str[start:end]
00322 val1.props.append(val2)
00323 self.points.append(val1)
00324 start = end
00325 end += 4
00326 (length,) = _struct_I.unpack(str[start:end])
00327 self.features = []
00328 for i in range(0, length):
00329 val1 = geographic_msgs.msg.MapFeature()
00330 _v6 = val1.id
00331 start = end
00332 end += 4
00333 (length,) = _struct_I.unpack(str[start:end])
00334 start = end
00335 end += length
00336 _v6.uuid = str[start:end]
00337 start = end
00338 end += 4
00339 (length,) = _struct_I.unpack(str[start:end])
00340 val1.components = []
00341 for i in range(0, length):
00342 val2 = geographic_msgs.msg.UniqueID()
00343 start = end
00344 end += 4
00345 (length,) = _struct_I.unpack(str[start:end])
00346 start = end
00347 end += length
00348 val2.uuid = str[start:end]
00349 val1.components.append(val2)
00350 start = end
00351 end += 4
00352 (length,) = _struct_I.unpack(str[start:end])
00353 val1.props = []
00354 for i in range(0, length):
00355 val2 = geographic_msgs.msg.KeyValue()
00356 start = end
00357 end += 4
00358 (length,) = _struct_I.unpack(str[start:end])
00359 start = end
00360 end += length
00361 val2.key = str[start:end]
00362 start = end
00363 end += 4
00364 (length,) = _struct_I.unpack(str[start:end])
00365 start = end
00366 end += length
00367 val2.value = str[start:end]
00368 val1.props.append(val2)
00369 self.features.append(val1)
00370 start = end
00371 end += 4
00372 (length,) = _struct_I.unpack(str[start:end])
00373 self.props = []
00374 for i in range(0, length):
00375 val1 = geographic_msgs.msg.KeyValue()
00376 start = end
00377 end += 4
00378 (length,) = _struct_I.unpack(str[start:end])
00379 start = end
00380 end += length
00381 val1.key = str[start:end]
00382 start = end
00383 end += 4
00384 (length,) = _struct_I.unpack(str[start:end])
00385 start = end
00386 end += length
00387 val1.value = str[start:end]
00388 self.props.append(val1)
00389 return self
00390 except struct.error as e:
00391 raise roslib.message.DeserializationError(e)
00392
00393
00394 def serialize_numpy(self, buff, numpy):
00395 """
00396 serialize message with numpy array types into buffer
00397 @param buff: buffer
00398 @type buff: StringIO
00399 @param numpy: numpy python module
00400 @type numpy module
00401 """
00402 try:
00403 _x = self
00404 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00405 _x = self.header.frame_id
00406 length = len(_x)
00407 buff.write(struct.pack('<I%ss'%length, length, _x))
00408 _x = self.id.uuid
00409 length = len(_x)
00410 buff.write(struct.pack('<I%ss'%length, length, _x))
00411 _x = self
00412 buff.write(_struct_4d.pack(_x.bounds.min_latitude, _x.bounds.min_longitude, _x.bounds.max_latitude, _x.bounds.max_longitude))
00413 length = len(self.points)
00414 buff.write(_struct_I.pack(length))
00415 for val1 in self.points:
00416 _v7 = val1.id
00417 _x = _v7.uuid
00418 length = len(_x)
00419 buff.write(struct.pack('<I%ss'%length, length, _x))
00420 _v8 = val1.position
00421 _x = _v8
00422 buff.write(_struct_3d.pack(_x.latitude, _x.longitude, _x.altitude))
00423 length = len(val1.props)
00424 buff.write(_struct_I.pack(length))
00425 for val2 in val1.props:
00426 _x = val2.key
00427 length = len(_x)
00428 buff.write(struct.pack('<I%ss'%length, length, _x))
00429 _x = val2.value
00430 length = len(_x)
00431 buff.write(struct.pack('<I%ss'%length, length, _x))
00432 length = len(self.features)
00433 buff.write(_struct_I.pack(length))
00434 for val1 in self.features:
00435 _v9 = val1.id
00436 _x = _v9.uuid
00437 length = len(_x)
00438 buff.write(struct.pack('<I%ss'%length, length, _x))
00439 length = len(val1.components)
00440 buff.write(_struct_I.pack(length))
00441 for val2 in val1.components:
00442 _x = val2.uuid
00443 length = len(_x)
00444 buff.write(struct.pack('<I%ss'%length, length, _x))
00445 length = len(val1.props)
00446 buff.write(_struct_I.pack(length))
00447 for val2 in val1.props:
00448 _x = val2.key
00449 length = len(_x)
00450 buff.write(struct.pack('<I%ss'%length, length, _x))
00451 _x = val2.value
00452 length = len(_x)
00453 buff.write(struct.pack('<I%ss'%length, length, _x))
00454 length = len(self.props)
00455 buff.write(_struct_I.pack(length))
00456 for val1 in self.props:
00457 _x = val1.key
00458 length = len(_x)
00459 buff.write(struct.pack('<I%ss'%length, length, _x))
00460 _x = val1.value
00461 length = len(_x)
00462 buff.write(struct.pack('<I%ss'%length, length, _x))
00463 except struct.error as se: self._check_types(se)
00464 except TypeError as te: self._check_types(te)
00465
00466 def deserialize_numpy(self, str, numpy):
00467 """
00468 unpack serialized message in str into this message instance using numpy for array types
00469 @param str: byte array of serialized message
00470 @type str: str
00471 @param numpy: numpy python module
00472 @type numpy: module
00473 """
00474 try:
00475 if self.header is None:
00476 self.header = std_msgs.msg._Header.Header()
00477 if self.id is None:
00478 self.id = geographic_msgs.msg.UniqueID()
00479 if self.bounds is None:
00480 self.bounds = geographic_msgs.msg.BoundingBox()
00481 end = 0
00482 _x = self
00483 start = end
00484 end += 12
00485 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00486 start = end
00487 end += 4
00488 (length,) = _struct_I.unpack(str[start:end])
00489 start = end
00490 end += length
00491 self.header.frame_id = str[start:end]
00492 start = end
00493 end += 4
00494 (length,) = _struct_I.unpack(str[start:end])
00495 start = end
00496 end += length
00497 self.id.uuid = str[start:end]
00498 _x = self
00499 start = end
00500 end += 32
00501 (_x.bounds.min_latitude, _x.bounds.min_longitude, _x.bounds.max_latitude, _x.bounds.max_longitude,) = _struct_4d.unpack(str[start:end])
00502 start = end
00503 end += 4
00504 (length,) = _struct_I.unpack(str[start:end])
00505 self.points = []
00506 for i in range(0, length):
00507 val1 = geographic_msgs.msg.WayPoint()
00508 _v10 = val1.id
00509 start = end
00510 end += 4
00511 (length,) = _struct_I.unpack(str[start:end])
00512 start = end
00513 end += length
00514 _v10.uuid = str[start:end]
00515 _v11 = val1.position
00516 _x = _v11
00517 start = end
00518 end += 24
00519 (_x.latitude, _x.longitude, _x.altitude,) = _struct_3d.unpack(str[start:end])
00520 start = end
00521 end += 4
00522 (length,) = _struct_I.unpack(str[start:end])
00523 val1.props = []
00524 for i in range(0, length):
00525 val2 = geographic_msgs.msg.KeyValue()
00526 start = end
00527 end += 4
00528 (length,) = _struct_I.unpack(str[start:end])
00529 start = end
00530 end += length
00531 val2.key = str[start:end]
00532 start = end
00533 end += 4
00534 (length,) = _struct_I.unpack(str[start:end])
00535 start = end
00536 end += length
00537 val2.value = str[start:end]
00538 val1.props.append(val2)
00539 self.points.append(val1)
00540 start = end
00541 end += 4
00542 (length,) = _struct_I.unpack(str[start:end])
00543 self.features = []
00544 for i in range(0, length):
00545 val1 = geographic_msgs.msg.MapFeature()
00546 _v12 = val1.id
00547 start = end
00548 end += 4
00549 (length,) = _struct_I.unpack(str[start:end])
00550 start = end
00551 end += length
00552 _v12.uuid = str[start:end]
00553 start = end
00554 end += 4
00555 (length,) = _struct_I.unpack(str[start:end])
00556 val1.components = []
00557 for i in range(0, length):
00558 val2 = geographic_msgs.msg.UniqueID()
00559 start = end
00560 end += 4
00561 (length,) = _struct_I.unpack(str[start:end])
00562 start = end
00563 end += length
00564 val2.uuid = str[start:end]
00565 val1.components.append(val2)
00566 start = end
00567 end += 4
00568 (length,) = _struct_I.unpack(str[start:end])
00569 val1.props = []
00570 for i in range(0, length):
00571 val2 = geographic_msgs.msg.KeyValue()
00572 start = end
00573 end += 4
00574 (length,) = _struct_I.unpack(str[start:end])
00575 start = end
00576 end += length
00577 val2.key = str[start:end]
00578 start = end
00579 end += 4
00580 (length,) = _struct_I.unpack(str[start:end])
00581 start = end
00582 end += length
00583 val2.value = str[start:end]
00584 val1.props.append(val2)
00585 self.features.append(val1)
00586 start = end
00587 end += 4
00588 (length,) = _struct_I.unpack(str[start:end])
00589 self.props = []
00590 for i in range(0, length):
00591 val1 = geographic_msgs.msg.KeyValue()
00592 start = end
00593 end += 4
00594 (length,) = _struct_I.unpack(str[start:end])
00595 start = end
00596 end += length
00597 val1.key = str[start:end]
00598 start = end
00599 end += 4
00600 (length,) = _struct_I.unpack(str[start:end])
00601 start = end
00602 end += length
00603 val1.value = str[start:end]
00604 self.props.append(val1)
00605 return self
00606 except struct.error as e:
00607 raise roslib.message.DeserializationError(e)
00608
00609 _struct_I = roslib.message.struct_I
00610 _struct_3I = struct.Struct("<3I")
00611 _struct_4d = struct.Struct("<4d")
00612 _struct_3d = struct.Struct("<3d")