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