_Height.py
Go to the documentation of this file.
00001 """autogenerated by genpy from mav_msgs/Height.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 std_msgs.msg
00008 
00009 class Height(genpy.Message):
00010   _md5sum = "a78e1294ab4281402b080d0478dd360c"
00011   _type = "mav_msgs/Height"
00012   _has_header = True #flag to mark the presence of a Header object
00013   _full_text = """# Software License Agreement (BSD License)
00014 #
00015 # Copyright (c) 2010
00016 #  Ivan Dryanovski <ivan.dryanovski@gmail.com>
00017 # All rights reserved.
00018 #
00019 # Redistribution and use in source and binary forms, with or without
00020 # modification, are permitted provided that the following conditions
00021 # are met:
00022 #
00023 #  * Redistributions of source code must retain the above copyright
00024 #    notice, this list of conditions and the following disclaimer.
00025 #  * Redistributions in binary form must reproduce the above
00026 #    copyright notice, this list of conditions and the following
00027 #    disclaimer in the documentation and/or other materials provided
00028 #    with the distribution.
00029 #  * Neither the name of CCNY Robotics Lab nor the names of its
00030 #    contributors may be used to endorse or promote products derived
00031 #    from this software without specific prior written permission.
00032 #
00033 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00034 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00035 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00036 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00037 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00038 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00039 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00040 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00041 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00042 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00043 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00044 # POSSIBILITY OF SUCH DAMAGE.
00045 
00046 Header header
00047 
00048 float64 height
00049 float64 height_variance
00050 
00051 float64 climb
00052 float64 climb_variance
00053 
00054 ================================================================================
00055 MSG: std_msgs/Header
00056 # Standard metadata for higher-level stamped data types.
00057 # This is generally used to communicate timestamped data 
00058 # in a particular coordinate frame.
00059 # 
00060 # sequence ID: consecutively increasing ID 
00061 uint32 seq
00062 #Two-integer timestamp that is expressed as:
00063 # * stamp.secs: seconds (stamp_secs) since epoch
00064 # * stamp.nsecs: nanoseconds since stamp_secs
00065 # time-handling sugar is provided by the client library
00066 time stamp
00067 #Frame this data is associated with
00068 # 0: no frame
00069 # 1: global frame
00070 string frame_id
00071 
00072 """
00073   __slots__ = ['header','height','height_variance','climb','climb_variance']
00074   _slot_types = ['std_msgs/Header','float64','float64','float64','float64']
00075 
00076   def __init__(self, *args, **kwds):
00077     """
00078     Constructor. Any message fields that are implicitly/explicitly
00079     set to None will be assigned a default value. The recommend
00080     use is keyword arguments as this is more robust to future message
00081     changes.  You cannot mix in-order arguments and keyword arguments.
00082 
00083     The available fields are:
00084        header,height,height_variance,climb,climb_variance
00085 
00086     :param args: complete set of field values, in .msg order
00087     :param kwds: use keyword arguments corresponding to message field names
00088     to set specific fields.
00089     """
00090     if args or kwds:
00091       super(Height, self).__init__(*args, **kwds)
00092       #message fields cannot be None, assign default values for those that are
00093       if self.header is None:
00094         self.header = std_msgs.msg.Header()
00095       if self.height is None:
00096         self.height = 0.
00097       if self.height_variance is None:
00098         self.height_variance = 0.
00099       if self.climb is None:
00100         self.climb = 0.
00101       if self.climb_variance is None:
00102         self.climb_variance = 0.
00103     else:
00104       self.header = std_msgs.msg.Header()
00105       self.height = 0.
00106       self.height_variance = 0.
00107       self.climb = 0.
00108       self.climb_variance = 0.
00109 
00110   def _get_types(self):
00111     """
00112     internal API method
00113     """
00114     return self._slot_types
00115 
00116   def serialize(self, buff):
00117     """
00118     serialize message into buffer
00119     :param buff: buffer, ``StringIO``
00120     """
00121     try:
00122       _x = self
00123       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00124       _x = self.header.frame_id
00125       length = len(_x)
00126       if python3 or type(_x) == unicode:
00127         _x = _x.encode('utf-8')
00128         length = len(_x)
00129       buff.write(struct.pack('<I%ss'%length, length, _x))
00130       _x = self
00131       buff.write(_struct_4d.pack(_x.height, _x.height_variance, _x.climb, _x.climb_variance))
00132     except struct.error as se: self._check_types(se)
00133     except TypeError as te: self._check_types(te)
00134 
00135   def deserialize(self, str):
00136     """
00137     unpack serialized message in str into this message instance
00138     :param str: byte array of serialized message, ``str``
00139     """
00140     try:
00141       if self.header is None:
00142         self.header = std_msgs.msg.Header()
00143       end = 0
00144       _x = self
00145       start = end
00146       end += 12
00147       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00148       start = end
00149       end += 4
00150       (length,) = _struct_I.unpack(str[start:end])
00151       start = end
00152       end += length
00153       if python3:
00154         self.header.frame_id = str[start:end].decode('utf-8')
00155       else:
00156         self.header.frame_id = str[start:end]
00157       _x = self
00158       start = end
00159       end += 32
00160       (_x.height, _x.height_variance, _x.climb, _x.climb_variance,) = _struct_4d.unpack(str[start:end])
00161       return self
00162     except struct.error as e:
00163       raise genpy.DeserializationError(e) #most likely buffer underfill
00164 
00165 
00166   def serialize_numpy(self, buff, numpy):
00167     """
00168     serialize message with numpy array types into buffer
00169     :param buff: buffer, ``StringIO``
00170     :param numpy: numpy python module
00171     """
00172     try:
00173       _x = self
00174       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00175       _x = self.header.frame_id
00176       length = len(_x)
00177       if python3 or type(_x) == unicode:
00178         _x = _x.encode('utf-8')
00179         length = len(_x)
00180       buff.write(struct.pack('<I%ss'%length, length, _x))
00181       _x = self
00182       buff.write(_struct_4d.pack(_x.height, _x.height_variance, _x.climb, _x.climb_variance))
00183     except struct.error as se: self._check_types(se)
00184     except TypeError as te: self._check_types(te)
00185 
00186   def deserialize_numpy(self, str, numpy):
00187     """
00188     unpack serialized message in str into this message instance using numpy for array types
00189     :param str: byte array of serialized message, ``str``
00190     :param numpy: numpy python module
00191     """
00192     try:
00193       if self.header is None:
00194         self.header = std_msgs.msg.Header()
00195       end = 0
00196       _x = self
00197       start = end
00198       end += 12
00199       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00200       start = end
00201       end += 4
00202       (length,) = _struct_I.unpack(str[start:end])
00203       start = end
00204       end += length
00205       if python3:
00206         self.header.frame_id = str[start:end].decode('utf-8')
00207       else:
00208         self.header.frame_id = str[start:end]
00209       _x = self
00210       start = end
00211       end += 32
00212       (_x.height, _x.height_variance, _x.climb, _x.climb_variance,) = _struct_4d.unpack(str[start:end])
00213       return self
00214     except struct.error as e:
00215       raise genpy.DeserializationError(e) #most likely buffer underfill
00216 
00217 _struct_I = genpy.struct_I
00218 _struct_3I = struct.Struct("<3I")
00219 _struct_4d = struct.Struct("<4d")


mav_msgs
Author(s): Ivan Dryanovski, William Morris
autogenerated on Thu Jan 2 2014 11:28:10