_GPSPoint.py
Go to the documentation of this file.
00001 """autogenerated by genpy from corobot_teleop/GPSPoint.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 sensor_msgs.msg
00008 import std_msgs.msg
00009 
00010 class GPSPoint(genpy.Message):
00011   _md5sum = "2d3a8cd499b9b4a0249fb98fd05cfa48"
00012   _type = "corobot_teleop/GPSPoint"
00013   _has_header = True #flag to mark the presence of a Header object
00014   _full_text = """# Navigation Satellite fix for any Global Navigation Satellite System
00015 #
00016 # Specified using the WGS 84 reference ellipsoid
00017 
00018 # Header specifies ROS time and frame of reference for this fix.
00019 Header header
00020 
00021 # satellite fix status information
00022 sensor_msgs/NavSatStatus status
00023 
00024 # Latitude [degrees]. Positive is north of equator; negative is south.
00025 float64 latitude
00026 
00027 # Longitude [degrees]. Positive is east of prime meridian; negative is west.
00028 float64 longitude
00029 
00030 # Altitude [m]. Positive is above the WGS 84 ellipsoid.
00031 float64 altitude
00032 
00033 # Position covariance [m^2] defined relative to a tangential plane
00034 # through the reported position. The components are East, North, and
00035 # Up (ENU), in row-major order.
00036 #
00037 # Beware: this coordinate system exhibits singularities at the poles.
00038 
00039 float64[9] position_covariance
00040 
00041 # If the covariance of the fix is known, fill it in completely. If the
00042 # GPS receiver provides the variance of each measurement, put them
00043 # along the diagonal. If only Dilution of Precision is available,
00044 # estimate an approximate covariance from that.
00045 
00046 uint8 COVARIANCE_TYPE_UNKNOWN = 0
00047 uint8 COVARIANCE_TYPE_APPROXIMATED = 1
00048 uint8 COVARIANCE_TYPE_DIAGONAL_KNOWN = 2
00049 uint8 COVARIANCE_TYPE_KNOWN = 3
00050 
00051 uint8 position_covariance_type
00052 
00053 ================================================================================
00054 MSG: std_msgs/Header
00055 # Standard metadata for higher-level stamped data types.
00056 # This is generally used to communicate timestamped data 
00057 # in a particular coordinate frame.
00058 # 
00059 # sequence ID: consecutively increasing ID 
00060 uint32 seq
00061 #Two-integer timestamp that is expressed as:
00062 # * stamp.secs: seconds (stamp_secs) since epoch
00063 # * stamp.nsecs: nanoseconds since stamp_secs
00064 # time-handling sugar is provided by the client library
00065 time stamp
00066 #Frame this data is associated with
00067 # 0: no frame
00068 # 1: global frame
00069 string frame_id
00070 
00071 ================================================================================
00072 MSG: sensor_msgs/NavSatStatus
00073 # Navigation Satellite fix status for any Global Navigation Satellite System
00074 
00075 # Whether to output an augmented fix is determined by both the fix
00076 # type and the last time differential corrections were received.  A
00077 # fix is valid when status >= STATUS_FIX.
00078 
00079 int8 STATUS_NO_FIX =  -1        # unable to fix position
00080 int8 STATUS_FIX =      0        # unaugmented fix
00081 int8 STATUS_SBAS_FIX = 1        # with satellite-based augmentation
00082 int8 STATUS_GBAS_FIX = 2        # with ground-based augmentation
00083 
00084 int8 status
00085 
00086 # Bits defining which Global Navigation Satellite System signals were
00087 # used by the receiver.
00088 
00089 uint16 SERVICE_GPS =     1
00090 uint16 SERVICE_GLONASS = 2
00091 uint16 SERVICE_COMPASS = 4      # includes BeiDou.
00092 uint16 SERVICE_GALILEO = 8
00093 
00094 uint16 service
00095 
00096 """
00097   # Pseudo-constants
00098   COVARIANCE_TYPE_UNKNOWN = 0
00099   COVARIANCE_TYPE_APPROXIMATED = 1
00100   COVARIANCE_TYPE_DIAGONAL_KNOWN = 2
00101   COVARIANCE_TYPE_KNOWN = 3
00102 
00103   __slots__ = ['header','status','latitude','longitude','altitude','position_covariance','position_covariance_type']
00104   _slot_types = ['std_msgs/Header','sensor_msgs/NavSatStatus','float64','float64','float64','float64[9]','uint8']
00105 
00106   def __init__(self, *args, **kwds):
00107     """
00108     Constructor. Any message fields that are implicitly/explicitly
00109     set to None will be assigned a default value. The recommend
00110     use is keyword arguments as this is more robust to future message
00111     changes.  You cannot mix in-order arguments and keyword arguments.
00112 
00113     The available fields are:
00114        header,status,latitude,longitude,altitude,position_covariance,position_covariance_type
00115 
00116     :param args: complete set of field values, in .msg order
00117     :param kwds: use keyword arguments corresponding to message field names
00118     to set specific fields.
00119     """
00120     if args or kwds:
00121       super(GPSPoint, self).__init__(*args, **kwds)
00122       #message fields cannot be None, assign default values for those that are
00123       if self.header is None:
00124         self.header = std_msgs.msg.Header()
00125       if self.status is None:
00126         self.status = sensor_msgs.msg.NavSatStatus()
00127       if self.latitude is None:
00128         self.latitude = 0.
00129       if self.longitude is None:
00130         self.longitude = 0.
00131       if self.altitude is None:
00132         self.altitude = 0.
00133       if self.position_covariance is None:
00134         self.position_covariance = [0.,0.,0.,0.,0.,0.,0.,0.,0.]
00135       if self.position_covariance_type is None:
00136         self.position_covariance_type = 0
00137     else:
00138       self.header = std_msgs.msg.Header()
00139       self.status = sensor_msgs.msg.NavSatStatus()
00140       self.latitude = 0.
00141       self.longitude = 0.
00142       self.altitude = 0.
00143       self.position_covariance = [0.,0.,0.,0.,0.,0.,0.,0.,0.]
00144       self.position_covariance_type = 0
00145 
00146   def _get_types(self):
00147     """
00148     internal API method
00149     """
00150     return self._slot_types
00151 
00152   def serialize(self, buff):
00153     """
00154     serialize message into buffer
00155     :param buff: buffer, ``StringIO``
00156     """
00157     try:
00158       _x = self
00159       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00160       _x = self.header.frame_id
00161       length = len(_x)
00162       if python3 or type(_x) == unicode:
00163         _x = _x.encode('utf-8')
00164         length = len(_x)
00165       buff.write(struct.pack('<I%ss'%length, length, _x))
00166       _x = self
00167       buff.write(_struct_bH3d.pack(_x.status.status, _x.status.service, _x.latitude, _x.longitude, _x.altitude))
00168       buff.write(_struct_9d.pack(*self.position_covariance))
00169       buff.write(_struct_B.pack(self.position_covariance_type))
00170     except struct.error as se: self._check_types(se)
00171     except TypeError as te: self._check_types(te)
00172 
00173   def deserialize(self, str):
00174     """
00175     unpack serialized message in str into this message instance
00176     :param str: byte array of serialized message, ``str``
00177     """
00178     try:
00179       if self.header is None:
00180         self.header = std_msgs.msg.Header()
00181       if self.status is None:
00182         self.status = sensor_msgs.msg.NavSatStatus()
00183       end = 0
00184       _x = self
00185       start = end
00186       end += 12
00187       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00188       start = end
00189       end += 4
00190       (length,) = _struct_I.unpack(str[start:end])
00191       start = end
00192       end += length
00193       if python3:
00194         self.header.frame_id = str[start:end].decode('utf-8')
00195       else:
00196         self.header.frame_id = str[start:end]
00197       _x = self
00198       start = end
00199       end += 27
00200       (_x.status.status, _x.status.service, _x.latitude, _x.longitude, _x.altitude,) = _struct_bH3d.unpack(str[start:end])
00201       start = end
00202       end += 72
00203       self.position_covariance = _struct_9d.unpack(str[start:end])
00204       start = end
00205       end += 1
00206       (self.position_covariance_type,) = _struct_B.unpack(str[start:end])
00207       return self
00208     except struct.error as e:
00209       raise genpy.DeserializationError(e) #most likely buffer underfill
00210 
00211 
00212   def serialize_numpy(self, buff, numpy):
00213     """
00214     serialize message with numpy array types into buffer
00215     :param buff: buffer, ``StringIO``
00216     :param numpy: numpy python module
00217     """
00218     try:
00219       _x = self
00220       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00221       _x = self.header.frame_id
00222       length = len(_x)
00223       if python3 or type(_x) == unicode:
00224         _x = _x.encode('utf-8')
00225         length = len(_x)
00226       buff.write(struct.pack('<I%ss'%length, length, _x))
00227       _x = self
00228       buff.write(_struct_bH3d.pack(_x.status.status, _x.status.service, _x.latitude, _x.longitude, _x.altitude))
00229       buff.write(self.position_covariance.tostring())
00230       buff.write(_struct_B.pack(self.position_covariance_type))
00231     except struct.error as se: self._check_types(se)
00232     except TypeError as te: self._check_types(te)
00233 
00234   def deserialize_numpy(self, str, numpy):
00235     """
00236     unpack serialized message in str into this message instance using numpy for array types
00237     :param str: byte array of serialized message, ``str``
00238     :param numpy: numpy python module
00239     """
00240     try:
00241       if self.header is None:
00242         self.header = std_msgs.msg.Header()
00243       if self.status is None:
00244         self.status = sensor_msgs.msg.NavSatStatus()
00245       end = 0
00246       _x = self
00247       start = end
00248       end += 12
00249       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00250       start = end
00251       end += 4
00252       (length,) = _struct_I.unpack(str[start:end])
00253       start = end
00254       end += length
00255       if python3:
00256         self.header.frame_id = str[start:end].decode('utf-8')
00257       else:
00258         self.header.frame_id = str[start:end]
00259       _x = self
00260       start = end
00261       end += 27
00262       (_x.status.status, _x.status.service, _x.latitude, _x.longitude, _x.altitude,) = _struct_bH3d.unpack(str[start:end])
00263       start = end
00264       end += 72
00265       self.position_covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
00266       start = end
00267       end += 1
00268       (self.position_covariance_type,) = _struct_B.unpack(str[start:end])
00269       return self
00270     except struct.error as e:
00271       raise genpy.DeserializationError(e) #most likely buffer underfill
00272 
00273 _struct_I = genpy.struct_I
00274 _struct_3I = struct.Struct("<3I")
00275 _struct_bH3d = struct.Struct("<bH3d")
00276 _struct_9d = struct.Struct("<9d")
00277 _struct_B = struct.Struct("<B")


corobot_teleop
Author(s):
autogenerated on Sun Oct 5 2014 23:18:16