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