_GetGeographicMap.py
Go to the documentation of this file.
00001 """autogenerated by genpy from geographic_msgs/GetGeographicMapRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import geographic_msgs.msg
00008 
00009 class GetGeographicMapRequest(genpy.Message):
00010   _md5sum = "505cc89008cb1745810d2ee4ea646d6e"
00011   _type = "geographic_msgs/GetGeographicMapRequest"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """
00014 
00015 string url
00016 
00017 
00018 
00019 BoundingBox bounds
00020 
00021 
00022 ================================================================================
00023 MSG: geographic_msgs/BoundingBox
00024 # Geographic map bounding box. 
00025 #
00026 # The two GeoPoints denote diagonally opposite corners of the box.
00027 #
00028 # If min_pt.latitude is NaN, the bounding box is "global", matching
00029 # any valid latitude, longitude and altitude.
00030 #
00031 # If min_pt.altitude is NaN, the bounding box is two-dimensional and
00032 # matches any altitude within the specified latitude and longitude
00033 # range.
00034 
00035 GeoPoint min_pt         # lowest and most Southwestern corner
00036 GeoPoint max_pt         # highest and most Northeastern corner
00037 
00038 ================================================================================
00039 MSG: geographic_msgs/GeoPoint
00040 # Geographic point, using the WGS 84 reference ellipsoid.
00041 
00042 # Latitude [degrees]. Positive is north of equator; negative is south
00043 # (-90 <= latitude <= +90).
00044 float64 latitude
00045 
00046 # Longitude [degrees]. Positive is east of prime meridian; negative is
00047 # west (-180 <= longitude <= +180). At the poles, latitude is -90 or
00048 # +90, and longitude is irrelevant, but must be in range.
00049 float64 longitude
00050 
00051 # Altitude [m]. Positive is above the WGS 84 ellipsoid (NaN if unspecified).
00052 float64 altitude
00053 
00054 """
00055   __slots__ = ['url','bounds']
00056   _slot_types = ['string','geographic_msgs/BoundingBox']
00057 
00058   def __init__(self, *args, **kwds):
00059     """
00060     Constructor. Any message fields that are implicitly/explicitly
00061     set to None will be assigned a default value. The recommend
00062     use is keyword arguments as this is more robust to future message
00063     changes.  You cannot mix in-order arguments and keyword arguments.
00064 
00065     The available fields are:
00066        url,bounds
00067 
00068     :param args: complete set of field values, in .msg order
00069     :param kwds: use keyword arguments corresponding to message field names
00070     to set specific fields.
00071     """
00072     if args or kwds:
00073       super(GetGeographicMapRequest, self).__init__(*args, **kwds)
00074       #message fields cannot be None, assign default values for those that are
00075       if self.url is None:
00076         self.url = ''
00077       if self.bounds is None:
00078         self.bounds = geographic_msgs.msg.BoundingBox()
00079     else:
00080       self.url = ''
00081       self.bounds = geographic_msgs.msg.BoundingBox()
00082 
00083   def _get_types(self):
00084     """
00085     internal API method
00086     """
00087     return self._slot_types
00088 
00089   def serialize(self, buff):
00090     """
00091     serialize message into buffer
00092     :param buff: buffer, ``StringIO``
00093     """
00094     try:
00095       _x = self.url
00096       length = len(_x)
00097       if python3 or type(_x) == unicode:
00098         _x = _x.encode('utf-8')
00099         length = len(_x)
00100       buff.write(struct.pack('<I%ss'%length, length, _x))
00101       _x = self
00102       buff.write(_struct_6d.pack(_x.bounds.min_pt.latitude, _x.bounds.min_pt.longitude, _x.bounds.min_pt.altitude, _x.bounds.max_pt.latitude, _x.bounds.max_pt.longitude, _x.bounds.max_pt.altitude))
00103     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00104     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00105 
00106   def deserialize(self, str):
00107     """
00108     unpack serialized message in str into this message instance
00109     :param str: byte array of serialized message, ``str``
00110     """
00111     try:
00112       if self.bounds is None:
00113         self.bounds = geographic_msgs.msg.BoundingBox()
00114       end = 0
00115       start = end
00116       end += 4
00117       (length,) = _struct_I.unpack(str[start:end])
00118       start = end
00119       end += length
00120       if python3:
00121         self.url = str[start:end].decode('utf-8')
00122       else:
00123         self.url = str[start:end]
00124       _x = self
00125       start = end
00126       end += 48
00127       (_x.bounds.min_pt.latitude, _x.bounds.min_pt.longitude, _x.bounds.min_pt.altitude, _x.bounds.max_pt.latitude, _x.bounds.max_pt.longitude, _x.bounds.max_pt.altitude,) = _struct_6d.unpack(str[start:end])
00128       return self
00129     except struct.error as e:
00130       raise genpy.DeserializationError(e) #most likely buffer underfill
00131 
00132 
00133   def serialize_numpy(self, buff, numpy):
00134     """
00135     serialize message with numpy array types into buffer
00136     :param buff: buffer, ``StringIO``
00137     :param numpy: numpy python module
00138     """
00139     try:
00140       _x = self.url
00141       length = len(_x)
00142       if python3 or type(_x) == unicode:
00143         _x = _x.encode('utf-8')
00144         length = len(_x)
00145       buff.write(struct.pack('<I%ss'%length, length, _x))
00146       _x = self
00147       buff.write(_struct_6d.pack(_x.bounds.min_pt.latitude, _x.bounds.min_pt.longitude, _x.bounds.min_pt.altitude, _x.bounds.max_pt.latitude, _x.bounds.max_pt.longitude, _x.bounds.max_pt.altitude))
00148     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00149     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00150 
00151   def deserialize_numpy(self, str, numpy):
00152     """
00153     unpack serialized message in str into this message instance using numpy for array types
00154     :param str: byte array of serialized message, ``str``
00155     :param numpy: numpy python module
00156     """
00157     try:
00158       if self.bounds is None:
00159         self.bounds = geographic_msgs.msg.BoundingBox()
00160       end = 0
00161       start = end
00162       end += 4
00163       (length,) = _struct_I.unpack(str[start:end])
00164       start = end
00165       end += length
00166       if python3:
00167         self.url = str[start:end].decode('utf-8')
00168       else:
00169         self.url = str[start:end]
00170       _x = self
00171       start = end
00172       end += 48
00173       (_x.bounds.min_pt.latitude, _x.bounds.min_pt.longitude, _x.bounds.min_pt.altitude, _x.bounds.max_pt.latitude, _x.bounds.max_pt.longitude, _x.bounds.max_pt.altitude,) = _struct_6d.unpack(str[start:end])
00174       return self
00175     except struct.error as e:
00176       raise genpy.DeserializationError(e) #most likely buffer underfill
00177 
00178 _struct_I = genpy.struct_I
00179 _struct_6d = struct.Struct("<6d")
00180 """autogenerated by genpy from geographic_msgs/GetGeographicMapResponse.msg. Do not edit."""
00181 import sys
00182 python3 = True if sys.hexversion > 0x03000000 else False
00183 import genpy
00184 import struct
00185 
00186 import uuid_msgs.msg
00187 import geographic_msgs.msg
00188 import std_msgs.msg
00189 
00190 class GetGeographicMapResponse(genpy.Message):
00191   _md5sum = "0910332806c65953a4f4252eb780811a"
00192   _type = "geographic_msgs/GetGeographicMapResponse"
00193   _has_header = False #flag to mark the presence of a Header object
00194   _full_text = """
00195 bool success
00196 string status
00197 
00198 
00199 GeographicMap map
00200 
00201 
00202 ================================================================================
00203 MSG: geographic_msgs/GeographicMap
00204 # Geographic map for a specified region.
00205 
00206 Header header            # stamp specifies time
00207                          # frame_id (normally /map)
00208 
00209 uuid_msgs/UniqueID id    # identifier for this map
00210 BoundingBox  bounds      # 2D bounding box containing map
00211 
00212 WayPoint[]   points      # way-points
00213 MapFeature[] features    # map features
00214 KeyValue[]   props       # map properties
00215 
00216 ================================================================================
00217 MSG: std_msgs/Header
00218 # Standard metadata for higher-level stamped data types.
00219 # This is generally used to communicate timestamped data 
00220 # in a particular coordinate frame.
00221 # 
00222 # sequence ID: consecutively increasing ID 
00223 uint32 seq
00224 #Two-integer timestamp that is expressed as:
00225 # * stamp.secs: seconds (stamp_secs) since epoch
00226 # * stamp.nsecs: nanoseconds since stamp_secs
00227 # time-handling sugar is provided by the client library
00228 time stamp
00229 #Frame this data is associated with
00230 # 0: no frame
00231 # 1: global frame
00232 string frame_id
00233 
00234 ================================================================================
00235 MSG: uuid_msgs/UniqueID
00236 # A universally unique identifier (UUID).
00237 #
00238 #  http://en.wikipedia.org/wiki/Universally_unique_identifier
00239 #  http://tools.ietf.org/html/rfc4122.html
00240 
00241 uint8[16] uuid
00242 
00243 ================================================================================
00244 MSG: geographic_msgs/BoundingBox
00245 # Geographic map bounding box. 
00246 #
00247 # The two GeoPoints denote diagonally opposite corners of the box.
00248 #
00249 # If min_pt.latitude is NaN, the bounding box is "global", matching
00250 # any valid latitude, longitude and altitude.
00251 #
00252 # If min_pt.altitude is NaN, the bounding box is two-dimensional and
00253 # matches any altitude within the specified latitude and longitude
00254 # range.
00255 
00256 GeoPoint min_pt         # lowest and most Southwestern corner
00257 GeoPoint max_pt         # highest and most Northeastern corner
00258 
00259 ================================================================================
00260 MSG: geographic_msgs/GeoPoint
00261 # Geographic point, using the WGS 84 reference ellipsoid.
00262 
00263 # Latitude [degrees]. Positive is north of equator; negative is south
00264 # (-90 <= latitude <= +90).
00265 float64 latitude
00266 
00267 # Longitude [degrees]. Positive is east of prime meridian; negative is
00268 # west (-180 <= longitude <= +180). At the poles, latitude is -90 or
00269 # +90, and longitude is irrelevant, but must be in range.
00270 float64 longitude
00271 
00272 # Altitude [m]. Positive is above the WGS 84 ellipsoid (NaN if unspecified).
00273 float64 altitude
00274 
00275 ================================================================================
00276 MSG: geographic_msgs/WayPoint
00277 # Way-point element for a geographic map.
00278 
00279 uuid_msgs/UniqueID id   # Unique way-point identifier
00280 GeoPoint   position     # Position relative to WGS 84 ellipsoid
00281 KeyValue[] props        # Key/value properties for this point
00282 
00283 ================================================================================
00284 MSG: geographic_msgs/KeyValue
00285 # Geographic map tag (key, value) pair
00286 #
00287 # This is equivalent to diagnostic_msgs/KeyValue, repeated here to
00288 # avoid introducing a trivial stack dependency.
00289 
00290 string key                     # tag label
00291 string value                   # corresponding value
00292 
00293 ================================================================================
00294 MSG: geographic_msgs/MapFeature
00295 # Geographic map feature.
00296 #
00297 # A list of WayPoint IDs for features like streets, highways, hiking
00298 # trails, the outlines of buildings and parking lots in sequential
00299 # order.
00300 #
00301 # Feature lists may also contain other feature lists as members.
00302 
00303 uuid_msgs/UniqueID   id         # Unique feature identifier
00304 uuid_msgs/UniqueID[] components # Sequence of feature components
00305 KeyValue[] props                # Key/value properties for this feature
00306 
00307 """
00308   __slots__ = ['success','status','map']
00309   _slot_types = ['bool','string','geographic_msgs/GeographicMap']
00310 
00311   def __init__(self, *args, **kwds):
00312     """
00313     Constructor. Any message fields that are implicitly/explicitly
00314     set to None will be assigned a default value. The recommend
00315     use is keyword arguments as this is more robust to future message
00316     changes.  You cannot mix in-order arguments and keyword arguments.
00317 
00318     The available fields are:
00319        success,status,map
00320 
00321     :param args: complete set of field values, in .msg order
00322     :param kwds: use keyword arguments corresponding to message field names
00323     to set specific fields.
00324     """
00325     if args or kwds:
00326       super(GetGeographicMapResponse, self).__init__(*args, **kwds)
00327       #message fields cannot be None, assign default values for those that are
00328       if self.success is None:
00329         self.success = False
00330       if self.status is None:
00331         self.status = ''
00332       if self.map is None:
00333         self.map = geographic_msgs.msg.GeographicMap()
00334     else:
00335       self.success = False
00336       self.status = ''
00337       self.map = geographic_msgs.msg.GeographicMap()
00338 
00339   def _get_types(self):
00340     """
00341     internal API method
00342     """
00343     return self._slot_types
00344 
00345   def serialize(self, buff):
00346     """
00347     serialize message into buffer
00348     :param buff: buffer, ``StringIO``
00349     """
00350     try:
00351       buff.write(_struct_B.pack(self.success))
00352       _x = self.status
00353       length = len(_x)
00354       if python3 or type(_x) == unicode:
00355         _x = _x.encode('utf-8')
00356         length = len(_x)
00357       buff.write(struct.pack('<I%ss'%length, length, _x))
00358       _x = self
00359       buff.write(_struct_3I.pack(_x.map.header.seq, _x.map.header.stamp.secs, _x.map.header.stamp.nsecs))
00360       _x = self.map.header.frame_id
00361       length = len(_x)
00362       if python3 or type(_x) == unicode:
00363         _x = _x.encode('utf-8')
00364         length = len(_x)
00365       buff.write(struct.pack('<I%ss'%length, length, _x))
00366       _x = self.map.id.uuid
00367       # - if encoded as a list instead, serialize as bytes instead of string
00368       if type(_x) in [list, tuple]:
00369         buff.write(_struct_16B.pack(*_x))
00370       else:
00371         buff.write(_struct_16s.pack(_x))
00372       _x = self
00373       buff.write(_struct_6d.pack(_x.map.bounds.min_pt.latitude, _x.map.bounds.min_pt.longitude, _x.map.bounds.min_pt.altitude, _x.map.bounds.max_pt.latitude, _x.map.bounds.max_pt.longitude, _x.map.bounds.max_pt.altitude))
00374       length = len(self.map.points)
00375       buff.write(_struct_I.pack(length))
00376       for val1 in self.map.points:
00377         _v1 = val1.id
00378         _x = _v1.uuid
00379         # - if encoded as a list instead, serialize as bytes instead of string
00380         if type(_x) in [list, tuple]:
00381           buff.write(_struct_16B.pack(*_x))
00382         else:
00383           buff.write(_struct_16s.pack(_x))
00384         _v2 = val1.position
00385         _x = _v2
00386         buff.write(_struct_3d.pack(_x.latitude, _x.longitude, _x.altitude))
00387         length = len(val1.props)
00388         buff.write(_struct_I.pack(length))
00389         for val2 in val1.props:
00390           _x = val2.key
00391           length = len(_x)
00392           if python3 or type(_x) == unicode:
00393             _x = _x.encode('utf-8')
00394             length = len(_x)
00395           buff.write(struct.pack('<I%ss'%length, length, _x))
00396           _x = val2.value
00397           length = len(_x)
00398           if python3 or type(_x) == unicode:
00399             _x = _x.encode('utf-8')
00400             length = len(_x)
00401           buff.write(struct.pack('<I%ss'%length, length, _x))
00402       length = len(self.map.features)
00403       buff.write(_struct_I.pack(length))
00404       for val1 in self.map.features:
00405         _v3 = val1.id
00406         _x = _v3.uuid
00407         # - if encoded as a list instead, serialize as bytes instead of string
00408         if type(_x) in [list, tuple]:
00409           buff.write(_struct_16B.pack(*_x))
00410         else:
00411           buff.write(_struct_16s.pack(_x))
00412         length = len(val1.components)
00413         buff.write(_struct_I.pack(length))
00414         for val2 in val1.components:
00415           _x = val2.uuid
00416           # - if encoded as a list instead, serialize as bytes instead of string
00417           if type(_x) in [list, tuple]:
00418             buff.write(_struct_16B.pack(*_x))
00419           else:
00420             buff.write(_struct_16s.pack(_x))
00421         length = len(val1.props)
00422         buff.write(_struct_I.pack(length))
00423         for val2 in val1.props:
00424           _x = val2.key
00425           length = len(_x)
00426           if python3 or type(_x) == unicode:
00427             _x = _x.encode('utf-8')
00428             length = len(_x)
00429           buff.write(struct.pack('<I%ss'%length, length, _x))
00430           _x = val2.value
00431           length = len(_x)
00432           if python3 or type(_x) == unicode:
00433             _x = _x.encode('utf-8')
00434             length = len(_x)
00435           buff.write(struct.pack('<I%ss'%length, length, _x))
00436       length = len(self.map.props)
00437       buff.write(_struct_I.pack(length))
00438       for val1 in self.map.props:
00439         _x = val1.key
00440         length = len(_x)
00441         if python3 or type(_x) == unicode:
00442           _x = _x.encode('utf-8')
00443           length = len(_x)
00444         buff.write(struct.pack('<I%ss'%length, length, _x))
00445         _x = val1.value
00446         length = len(_x)
00447         if python3 or type(_x) == unicode:
00448           _x = _x.encode('utf-8')
00449           length = len(_x)
00450         buff.write(struct.pack('<I%ss'%length, length, _x))
00451     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00452     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00453 
00454   def deserialize(self, str):
00455     """
00456     unpack serialized message in str into this message instance
00457     :param str: byte array of serialized message, ``str``
00458     """
00459     try:
00460       if self.map is None:
00461         self.map = geographic_msgs.msg.GeographicMap()
00462       end = 0
00463       start = end
00464       end += 1
00465       (self.success,) = _struct_B.unpack(str[start:end])
00466       self.success = bool(self.success)
00467       start = end
00468       end += 4
00469       (length,) = _struct_I.unpack(str[start:end])
00470       start = end
00471       end += length
00472       if python3:
00473         self.status = str[start:end].decode('utf-8')
00474       else:
00475         self.status = str[start:end]
00476       _x = self
00477       start = end
00478       end += 12
00479       (_x.map.header.seq, _x.map.header.stamp.secs, _x.map.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00480       start = end
00481       end += 4
00482       (length,) = _struct_I.unpack(str[start:end])
00483       start = end
00484       end += length
00485       if python3:
00486         self.map.header.frame_id = str[start:end].decode('utf-8')
00487       else:
00488         self.map.header.frame_id = str[start:end]
00489       start = end
00490       end += 16
00491       self.map.id.uuid = str[start:end]
00492       _x = self
00493       start = end
00494       end += 48
00495       (_x.map.bounds.min_pt.latitude, _x.map.bounds.min_pt.longitude, _x.map.bounds.min_pt.altitude, _x.map.bounds.max_pt.latitude, _x.map.bounds.max_pt.longitude, _x.map.bounds.max_pt.altitude,) = _struct_6d.unpack(str[start:end])
00496       start = end
00497       end += 4
00498       (length,) = _struct_I.unpack(str[start:end])
00499       self.map.points = []
00500       for i in range(0, length):
00501         val1 = geographic_msgs.msg.WayPoint()
00502         _v4 = val1.id
00503         start = end
00504         end += 16
00505         _v4.uuid = str[start:end]
00506         _v5 = val1.position
00507         _x = _v5
00508         start = end
00509         end += 24
00510         (_x.latitude, _x.longitude, _x.altitude,) = _struct_3d.unpack(str[start:end])
00511         start = end
00512         end += 4
00513         (length,) = _struct_I.unpack(str[start:end])
00514         val1.props = []
00515         for i in range(0, length):
00516           val2 = geographic_msgs.msg.KeyValue()
00517           start = end
00518           end += 4
00519           (length,) = _struct_I.unpack(str[start:end])
00520           start = end
00521           end += length
00522           if python3:
00523             val2.key = str[start:end].decode('utf-8')
00524           else:
00525             val2.key = str[start:end]
00526           start = end
00527           end += 4
00528           (length,) = _struct_I.unpack(str[start:end])
00529           start = end
00530           end += length
00531           if python3:
00532             val2.value = str[start:end].decode('utf-8')
00533           else:
00534             val2.value = str[start:end]
00535           val1.props.append(val2)
00536         self.map.points.append(val1)
00537       start = end
00538       end += 4
00539       (length,) = _struct_I.unpack(str[start:end])
00540       self.map.features = []
00541       for i in range(0, length):
00542         val1 = geographic_msgs.msg.MapFeature()
00543         _v6 = val1.id
00544         start = end
00545         end += 16
00546         _v6.uuid = str[start:end]
00547         start = end
00548         end += 4
00549         (length,) = _struct_I.unpack(str[start:end])
00550         val1.components = []
00551         for i in range(0, length):
00552           val2 = uuid_msgs.msg.UniqueID()
00553           start = end
00554           end += 16
00555           val2.uuid = str[start:end]
00556           val1.components.append(val2)
00557         start = end
00558         end += 4
00559         (length,) = _struct_I.unpack(str[start:end])
00560         val1.props = []
00561         for i in range(0, length):
00562           val2 = geographic_msgs.msg.KeyValue()
00563           start = end
00564           end += 4
00565           (length,) = _struct_I.unpack(str[start:end])
00566           start = end
00567           end += length
00568           if python3:
00569             val2.key = str[start:end].decode('utf-8')
00570           else:
00571             val2.key = str[start:end]
00572           start = end
00573           end += 4
00574           (length,) = _struct_I.unpack(str[start:end])
00575           start = end
00576           end += length
00577           if python3:
00578             val2.value = str[start:end].decode('utf-8')
00579           else:
00580             val2.value = str[start:end]
00581           val1.props.append(val2)
00582         self.map.features.append(val1)
00583       start = end
00584       end += 4
00585       (length,) = _struct_I.unpack(str[start:end])
00586       self.map.props = []
00587       for i in range(0, length):
00588         val1 = geographic_msgs.msg.KeyValue()
00589         start = end
00590         end += 4
00591         (length,) = _struct_I.unpack(str[start:end])
00592         start = end
00593         end += length
00594         if python3:
00595           val1.key = str[start:end].decode('utf-8')
00596         else:
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         if python3:
00604           val1.value = str[start:end].decode('utf-8')
00605         else:
00606           val1.value = str[start:end]
00607         self.map.props.append(val1)
00608       return self
00609     except struct.error as e:
00610       raise genpy.DeserializationError(e) #most likely buffer underfill
00611 
00612 
00613   def serialize_numpy(self, buff, numpy):
00614     """
00615     serialize message with numpy array types into buffer
00616     :param buff: buffer, ``StringIO``
00617     :param numpy: numpy python module
00618     """
00619     try:
00620       buff.write(_struct_B.pack(self.success))
00621       _x = self.status
00622       length = len(_x)
00623       if python3 or type(_x) == unicode:
00624         _x = _x.encode('utf-8')
00625         length = len(_x)
00626       buff.write(struct.pack('<I%ss'%length, length, _x))
00627       _x = self
00628       buff.write(_struct_3I.pack(_x.map.header.seq, _x.map.header.stamp.secs, _x.map.header.stamp.nsecs))
00629       _x = self.map.header.frame_id
00630       length = len(_x)
00631       if python3 or type(_x) == unicode:
00632         _x = _x.encode('utf-8')
00633         length = len(_x)
00634       buff.write(struct.pack('<I%ss'%length, length, _x))
00635       _x = self.map.id.uuid
00636       # - if encoded as a list instead, serialize as bytes instead of string
00637       if type(_x) in [list, tuple]:
00638         buff.write(_struct_16B.pack(*_x))
00639       else:
00640         buff.write(_struct_16s.pack(_x))
00641       _x = self
00642       buff.write(_struct_6d.pack(_x.map.bounds.min_pt.latitude, _x.map.bounds.min_pt.longitude, _x.map.bounds.min_pt.altitude, _x.map.bounds.max_pt.latitude, _x.map.bounds.max_pt.longitude, _x.map.bounds.max_pt.altitude))
00643       length = len(self.map.points)
00644       buff.write(_struct_I.pack(length))
00645       for val1 in self.map.points:
00646         _v7 = val1.id
00647         _x = _v7.uuid
00648         # - if encoded as a list instead, serialize as bytes instead of string
00649         if type(_x) in [list, tuple]:
00650           buff.write(_struct_16B.pack(*_x))
00651         else:
00652           buff.write(_struct_16s.pack(_x))
00653         _v8 = val1.position
00654         _x = _v8
00655         buff.write(_struct_3d.pack(_x.latitude, _x.longitude, _x.altitude))
00656         length = len(val1.props)
00657         buff.write(_struct_I.pack(length))
00658         for val2 in val1.props:
00659           _x = val2.key
00660           length = len(_x)
00661           if python3 or type(_x) == unicode:
00662             _x = _x.encode('utf-8')
00663             length = len(_x)
00664           buff.write(struct.pack('<I%ss'%length, length, _x))
00665           _x = val2.value
00666           length = len(_x)
00667           if python3 or type(_x) == unicode:
00668             _x = _x.encode('utf-8')
00669             length = len(_x)
00670           buff.write(struct.pack('<I%ss'%length, length, _x))
00671       length = len(self.map.features)
00672       buff.write(_struct_I.pack(length))
00673       for val1 in self.map.features:
00674         _v9 = val1.id
00675         _x = _v9.uuid
00676         # - if encoded as a list instead, serialize as bytes instead of string
00677         if type(_x) in [list, tuple]:
00678           buff.write(_struct_16B.pack(*_x))
00679         else:
00680           buff.write(_struct_16s.pack(_x))
00681         length = len(val1.components)
00682         buff.write(_struct_I.pack(length))
00683         for val2 in val1.components:
00684           _x = val2.uuid
00685           # - if encoded as a list instead, serialize as bytes instead of string
00686           if type(_x) in [list, tuple]:
00687             buff.write(_struct_16B.pack(*_x))
00688           else:
00689             buff.write(_struct_16s.pack(_x))
00690         length = len(val1.props)
00691         buff.write(_struct_I.pack(length))
00692         for val2 in val1.props:
00693           _x = val2.key
00694           length = len(_x)
00695           if python3 or type(_x) == unicode:
00696             _x = _x.encode('utf-8')
00697             length = len(_x)
00698           buff.write(struct.pack('<I%ss'%length, length, _x))
00699           _x = val2.value
00700           length = len(_x)
00701           if python3 or type(_x) == unicode:
00702             _x = _x.encode('utf-8')
00703             length = len(_x)
00704           buff.write(struct.pack('<I%ss'%length, length, _x))
00705       length = len(self.map.props)
00706       buff.write(_struct_I.pack(length))
00707       for val1 in self.map.props:
00708         _x = val1.key
00709         length = len(_x)
00710         if python3 or type(_x) == unicode:
00711           _x = _x.encode('utf-8')
00712           length = len(_x)
00713         buff.write(struct.pack('<I%ss'%length, length, _x))
00714         _x = val1.value
00715         length = len(_x)
00716         if python3 or type(_x) == unicode:
00717           _x = _x.encode('utf-8')
00718           length = len(_x)
00719         buff.write(struct.pack('<I%ss'%length, length, _x))
00720     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00721     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00722 
00723   def deserialize_numpy(self, str, numpy):
00724     """
00725     unpack serialized message in str into this message instance using numpy for array types
00726     :param str: byte array of serialized message, ``str``
00727     :param numpy: numpy python module
00728     """
00729     try:
00730       if self.map is None:
00731         self.map = geographic_msgs.msg.GeographicMap()
00732       end = 0
00733       start = end
00734       end += 1
00735       (self.success,) = _struct_B.unpack(str[start:end])
00736       self.success = bool(self.success)
00737       start = end
00738       end += 4
00739       (length,) = _struct_I.unpack(str[start:end])
00740       start = end
00741       end += length
00742       if python3:
00743         self.status = str[start:end].decode('utf-8')
00744       else:
00745         self.status = str[start:end]
00746       _x = self
00747       start = end
00748       end += 12
00749       (_x.map.header.seq, _x.map.header.stamp.secs, _x.map.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00750       start = end
00751       end += 4
00752       (length,) = _struct_I.unpack(str[start:end])
00753       start = end
00754       end += length
00755       if python3:
00756         self.map.header.frame_id = str[start:end].decode('utf-8')
00757       else:
00758         self.map.header.frame_id = str[start:end]
00759       start = end
00760       end += 16
00761       self.map.id.uuid = str[start:end]
00762       _x = self
00763       start = end
00764       end += 48
00765       (_x.map.bounds.min_pt.latitude, _x.map.bounds.min_pt.longitude, _x.map.bounds.min_pt.altitude, _x.map.bounds.max_pt.latitude, _x.map.bounds.max_pt.longitude, _x.map.bounds.max_pt.altitude,) = _struct_6d.unpack(str[start:end])
00766       start = end
00767       end += 4
00768       (length,) = _struct_I.unpack(str[start:end])
00769       self.map.points = []
00770       for i in range(0, length):
00771         val1 = geographic_msgs.msg.WayPoint()
00772         _v10 = val1.id
00773         start = end
00774         end += 16
00775         _v10.uuid = str[start:end]
00776         _v11 = val1.position
00777         _x = _v11
00778         start = end
00779         end += 24
00780         (_x.latitude, _x.longitude, _x.altitude,) = _struct_3d.unpack(str[start:end])
00781         start = end
00782         end += 4
00783         (length,) = _struct_I.unpack(str[start:end])
00784         val1.props = []
00785         for i in range(0, length):
00786           val2 = geographic_msgs.msg.KeyValue()
00787           start = end
00788           end += 4
00789           (length,) = _struct_I.unpack(str[start:end])
00790           start = end
00791           end += length
00792           if python3:
00793             val2.key = str[start:end].decode('utf-8')
00794           else:
00795             val2.key = str[start:end]
00796           start = end
00797           end += 4
00798           (length,) = _struct_I.unpack(str[start:end])
00799           start = end
00800           end += length
00801           if python3:
00802             val2.value = str[start:end].decode('utf-8')
00803           else:
00804             val2.value = str[start:end]
00805           val1.props.append(val2)
00806         self.map.points.append(val1)
00807       start = end
00808       end += 4
00809       (length,) = _struct_I.unpack(str[start:end])
00810       self.map.features = []
00811       for i in range(0, length):
00812         val1 = geographic_msgs.msg.MapFeature()
00813         _v12 = val1.id
00814         start = end
00815         end += 16
00816         _v12.uuid = str[start:end]
00817         start = end
00818         end += 4
00819         (length,) = _struct_I.unpack(str[start:end])
00820         val1.components = []
00821         for i in range(0, length):
00822           val2 = uuid_msgs.msg.UniqueID()
00823           start = end
00824           end += 16
00825           val2.uuid = str[start:end]
00826           val1.components.append(val2)
00827         start = end
00828         end += 4
00829         (length,) = _struct_I.unpack(str[start:end])
00830         val1.props = []
00831         for i in range(0, length):
00832           val2 = geographic_msgs.msg.KeyValue()
00833           start = end
00834           end += 4
00835           (length,) = _struct_I.unpack(str[start:end])
00836           start = end
00837           end += length
00838           if python3:
00839             val2.key = str[start:end].decode('utf-8')
00840           else:
00841             val2.key = str[start:end]
00842           start = end
00843           end += 4
00844           (length,) = _struct_I.unpack(str[start:end])
00845           start = end
00846           end += length
00847           if python3:
00848             val2.value = str[start:end].decode('utf-8')
00849           else:
00850             val2.value = str[start:end]
00851           val1.props.append(val2)
00852         self.map.features.append(val1)
00853       start = end
00854       end += 4
00855       (length,) = _struct_I.unpack(str[start:end])
00856       self.map.props = []
00857       for i in range(0, length):
00858         val1 = geographic_msgs.msg.KeyValue()
00859         start = end
00860         end += 4
00861         (length,) = _struct_I.unpack(str[start:end])
00862         start = end
00863         end += length
00864         if python3:
00865           val1.key = str[start:end].decode('utf-8')
00866         else:
00867           val1.key = str[start:end]
00868         start = end
00869         end += 4
00870         (length,) = _struct_I.unpack(str[start:end])
00871         start = end
00872         end += length
00873         if python3:
00874           val1.value = str[start:end].decode('utf-8')
00875         else:
00876           val1.value = str[start:end]
00877         self.map.props.append(val1)
00878       return self
00879     except struct.error as e:
00880       raise genpy.DeserializationError(e) #most likely buffer underfill
00881 
00882 _struct_I = genpy.struct_I
00883 _struct_B = struct.Struct("<B")
00884 _struct_6d = struct.Struct("<6d")
00885 _struct_16B = struct.Struct("<16B")
00886 _struct_3I = struct.Struct("<3I")
00887 _struct_16s = struct.Struct("<16s")
00888 _struct_3d = struct.Struct("<3d")
00889 class GetGeographicMap(object):
00890   _type          = 'geographic_msgs/GetGeographicMap'
00891   _md5sum = 'c0278e653eee0ad79600510650e7be39'
00892   _request_class  = GetGeographicMapRequest
00893   _response_class = GetGeographicMapResponse


geographic_msgs
Author(s): Jack O'Quin
autogenerated on Mon Oct 6 2014 00:09:26