_GeoPose.py
Go to the documentation of this file.
00001 """autogenerated by genpy from geographic_msgs/GeoPose.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 geometry_msgs.msg
00008 import geographic_msgs.msg
00009 
00010 class GeoPose(genpy.Message):
00011   _md5sum = "778680b5172de58b7c057d973576c784"
00012   _type = "geographic_msgs/GeoPose"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """# Geographic pose, using the WGS 84 reference ellipsoid.
00015 #
00016 # Orientation uses the East-North-Up (ENU) frame of reference.
00017 # (But, what about singularities at the poles?)
00018 
00019 GeoPoint position
00020 geometry_msgs/Quaternion orientation
00021 
00022 ================================================================================
00023 MSG: geographic_msgs/GeoPoint
00024 # Geographic point, using the WGS 84 reference ellipsoid.
00025 
00026 # Latitude [degrees]. Positive is north of equator; negative is south
00027 # (-90 <= latitude <= +90).
00028 float64 latitude
00029 
00030 # Longitude [degrees]. Positive is east of prime meridian; negative is
00031 # west (-180 <= longitude <= +180). At the poles, latitude is -90 or
00032 # +90, and longitude is irrelevant, but must be in range.
00033 float64 longitude
00034 
00035 # Altitude [m]. Positive is above the WGS 84 ellipsoid (NaN if unspecified).
00036 float64 altitude
00037 
00038 ================================================================================
00039 MSG: geometry_msgs/Quaternion
00040 # This represents an orientation in free space in quaternion form.
00041 
00042 float64 x
00043 float64 y
00044 float64 z
00045 float64 w
00046 
00047 """
00048   __slots__ = ['position','orientation']
00049   _slot_types = ['geographic_msgs/GeoPoint','geometry_msgs/Quaternion']
00050 
00051   def __init__(self, *args, **kwds):
00052     """
00053     Constructor. Any message fields that are implicitly/explicitly
00054     set to None will be assigned a default value. The recommend
00055     use is keyword arguments as this is more robust to future message
00056     changes.  You cannot mix in-order arguments and keyword arguments.
00057 
00058     The available fields are:
00059        position,orientation
00060 
00061     :param args: complete set of field values, in .msg order
00062     :param kwds: use keyword arguments corresponding to message field names
00063     to set specific fields.
00064     """
00065     if args or kwds:
00066       super(GeoPose, self).__init__(*args, **kwds)
00067       #message fields cannot be None, assign default values for those that are
00068       if self.position is None:
00069         self.position = geographic_msgs.msg.GeoPoint()
00070       if self.orientation is None:
00071         self.orientation = geometry_msgs.msg.Quaternion()
00072     else:
00073       self.position = geographic_msgs.msg.GeoPoint()
00074       self.orientation = geometry_msgs.msg.Quaternion()
00075 
00076   def _get_types(self):
00077     """
00078     internal API method
00079     """
00080     return self._slot_types
00081 
00082   def serialize(self, buff):
00083     """
00084     serialize message into buffer
00085     :param buff: buffer, ``StringIO``
00086     """
00087     try:
00088       _x = self
00089       buff.write(_struct_7d.pack(_x.position.latitude, _x.position.longitude, _x.position.altitude, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w))
00090     except struct.error as se: self._check_types(se)
00091     except TypeError as te: self._check_types(te)
00092 
00093   def deserialize(self, str):
00094     """
00095     unpack serialized message in str into this message instance
00096     :param str: byte array of serialized message, ``str``
00097     """
00098     try:
00099       if self.position is None:
00100         self.position = geographic_msgs.msg.GeoPoint()
00101       if self.orientation is None:
00102         self.orientation = geometry_msgs.msg.Quaternion()
00103       end = 0
00104       _x = self
00105       start = end
00106       end += 56
00107       (_x.position.latitude, _x.position.longitude, _x.position.altitude, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w,) = _struct_7d.unpack(str[start:end])
00108       return self
00109     except struct.error as e:
00110       raise genpy.DeserializationError(e) #most likely buffer underfill
00111 
00112 
00113   def serialize_numpy(self, buff, numpy):
00114     """
00115     serialize message with numpy array types into buffer
00116     :param buff: buffer, ``StringIO``
00117     :param numpy: numpy python module
00118     """
00119     try:
00120       _x = self
00121       buff.write(_struct_7d.pack(_x.position.latitude, _x.position.longitude, _x.position.altitude, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w))
00122     except struct.error as se: self._check_types(se)
00123     except TypeError as te: self._check_types(te)
00124 
00125   def deserialize_numpy(self, str, numpy):
00126     """
00127     unpack serialized message in str into this message instance using numpy for array types
00128     :param str: byte array of serialized message, ``str``
00129     :param numpy: numpy python module
00130     """
00131     try:
00132       if self.position is None:
00133         self.position = geographic_msgs.msg.GeoPoint()
00134       if self.orientation is None:
00135         self.orientation = geometry_msgs.msg.Quaternion()
00136       end = 0
00137       _x = self
00138       start = end
00139       end += 56
00140       (_x.position.latitude, _x.position.longitude, _x.position.altitude, _x.orientation.x, _x.orientation.y, _x.orientation.z, _x.orientation.w,) = _struct_7d.unpack(str[start:end])
00141       return self
00142     except struct.error as e:
00143       raise genpy.DeserializationError(e) #most likely buffer underfill
00144 
00145 _struct_I = genpy.struct_I
00146 _struct_7d = struct.Struct("<7d")


geographic_msgs
Author(s): Jack O'Quin
autogenerated on Sat Dec 28 2013 17:02:27