_VO_Data.py
Go to the documentation of this file.
00001 """autogenerated by genpy from hrl_lib/VO_Data.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 VO_Data(genpy.Message):
00010   _md5sum = "68f198b42a714abe05a8e1625896ffa1"
00011   _type = "hrl_lib/VO_Data"
00012   _has_header = True #flag to mark the presence of a Header object
00013   _full_text = """Header header
00014 float64[] x_error
00015 float64[] y_error
00016 float64[] x_feat_1
00017 float64[] y_feat_1
00018 float64[] x_feat_2
00019 float64[] y_feat_2
00020 float64 focal
00021 float64 dt
00022 float64 im_height
00023 float64 im_width
00024 float64 time
00025 
00026 
00027 
00028 ================================================================================
00029 MSG: std_msgs/Header
00030 # Standard metadata for higher-level stamped data types.
00031 # This is generally used to communicate timestamped data 
00032 # in a particular coordinate frame.
00033 # 
00034 # sequence ID: consecutively increasing ID 
00035 uint32 seq
00036 #Two-integer timestamp that is expressed as:
00037 # * stamp.secs: seconds (stamp_secs) since epoch
00038 # * stamp.nsecs: nanoseconds since stamp_secs
00039 # time-handling sugar is provided by the client library
00040 time stamp
00041 #Frame this data is associated with
00042 # 0: no frame
00043 # 1: global frame
00044 string frame_id
00045 
00046 """
00047   __slots__ = ['header','x_error','y_error','x_feat_1','y_feat_1','x_feat_2','y_feat_2','focal','dt','im_height','im_width','time']
00048   _slot_types = ['std_msgs/Header','float64[]','float64[]','float64[]','float64[]','float64[]','float64[]','float64','float64','float64','float64','float64']
00049 
00050   def __init__(self, *args, **kwds):
00051     """
00052     Constructor. Any message fields that are implicitly/explicitly
00053     set to None will be assigned a default value. The recommend
00054     use is keyword arguments as this is more robust to future message
00055     changes.  You cannot mix in-order arguments and keyword arguments.
00056 
00057     The available fields are:
00058        header,x_error,y_error,x_feat_1,y_feat_1,x_feat_2,y_feat_2,focal,dt,im_height,im_width,time
00059 
00060     :param args: complete set of field values, in .msg order
00061     :param kwds: use keyword arguments corresponding to message field names
00062     to set specific fields.
00063     """
00064     if args or kwds:
00065       super(VO_Data, self).__init__(*args, **kwds)
00066       #message fields cannot be None, assign default values for those that are
00067       if self.header is None:
00068         self.header = std_msgs.msg.Header()
00069       if self.x_error is None:
00070         self.x_error = []
00071       if self.y_error is None:
00072         self.y_error = []
00073       if self.x_feat_1 is None:
00074         self.x_feat_1 = []
00075       if self.y_feat_1 is None:
00076         self.y_feat_1 = []
00077       if self.x_feat_2 is None:
00078         self.x_feat_2 = []
00079       if self.y_feat_2 is None:
00080         self.y_feat_2 = []
00081       if self.focal is None:
00082         self.focal = 0.
00083       if self.dt is None:
00084         self.dt = 0.
00085       if self.im_height is None:
00086         self.im_height = 0.
00087       if self.im_width is None:
00088         self.im_width = 0.
00089       if self.time is None:
00090         self.time = 0.
00091     else:
00092       self.header = std_msgs.msg.Header()
00093       self.x_error = []
00094       self.y_error = []
00095       self.x_feat_1 = []
00096       self.y_feat_1 = []
00097       self.x_feat_2 = []
00098       self.y_feat_2 = []
00099       self.focal = 0.
00100       self.dt = 0.
00101       self.im_height = 0.
00102       self.im_width = 0.
00103       self.time = 0.
00104 
00105   def _get_types(self):
00106     """
00107     internal API method
00108     """
00109     return self._slot_types
00110 
00111   def serialize(self, buff):
00112     """
00113     serialize message into buffer
00114     :param buff: buffer, ``StringIO``
00115     """
00116     try:
00117       _x = self
00118       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00119       _x = self.header.frame_id
00120       length = len(_x)
00121       if python3 or type(_x) == unicode:
00122         _x = _x.encode('utf-8')
00123         length = len(_x)
00124       buff.write(struct.pack('<I%ss'%length, length, _x))
00125       length = len(self.x_error)
00126       buff.write(_struct_I.pack(length))
00127       pattern = '<%sd'%length
00128       buff.write(struct.pack(pattern, *self.x_error))
00129       length = len(self.y_error)
00130       buff.write(_struct_I.pack(length))
00131       pattern = '<%sd'%length
00132       buff.write(struct.pack(pattern, *self.y_error))
00133       length = len(self.x_feat_1)
00134       buff.write(_struct_I.pack(length))
00135       pattern = '<%sd'%length
00136       buff.write(struct.pack(pattern, *self.x_feat_1))
00137       length = len(self.y_feat_1)
00138       buff.write(_struct_I.pack(length))
00139       pattern = '<%sd'%length
00140       buff.write(struct.pack(pattern, *self.y_feat_1))
00141       length = len(self.x_feat_2)
00142       buff.write(_struct_I.pack(length))
00143       pattern = '<%sd'%length
00144       buff.write(struct.pack(pattern, *self.x_feat_2))
00145       length = len(self.y_feat_2)
00146       buff.write(_struct_I.pack(length))
00147       pattern = '<%sd'%length
00148       buff.write(struct.pack(pattern, *self.y_feat_2))
00149       _x = self
00150       buff.write(_struct_5d.pack(_x.focal, _x.dt, _x.im_height, _x.im_width, _x.time))
00151     except struct.error as se: self._check_types(se)
00152     except TypeError as te: self._check_types(te)
00153 
00154   def deserialize(self, str):
00155     """
00156     unpack serialized message in str into this message instance
00157     :param str: byte array of serialized message, ``str``
00158     """
00159     try:
00160       if self.header is None:
00161         self.header = std_msgs.msg.Header()
00162       end = 0
00163       _x = self
00164       start = end
00165       end += 12
00166       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00167       start = end
00168       end += 4
00169       (length,) = _struct_I.unpack(str[start:end])
00170       start = end
00171       end += length
00172       if python3:
00173         self.header.frame_id = str[start:end].decode('utf-8')
00174       else:
00175         self.header.frame_id = str[start:end]
00176       start = end
00177       end += 4
00178       (length,) = _struct_I.unpack(str[start:end])
00179       pattern = '<%sd'%length
00180       start = end
00181       end += struct.calcsize(pattern)
00182       self.x_error = struct.unpack(pattern, str[start:end])
00183       start = end
00184       end += 4
00185       (length,) = _struct_I.unpack(str[start:end])
00186       pattern = '<%sd'%length
00187       start = end
00188       end += struct.calcsize(pattern)
00189       self.y_error = struct.unpack(pattern, str[start:end])
00190       start = end
00191       end += 4
00192       (length,) = _struct_I.unpack(str[start:end])
00193       pattern = '<%sd'%length
00194       start = end
00195       end += struct.calcsize(pattern)
00196       self.x_feat_1 = struct.unpack(pattern, str[start:end])
00197       start = end
00198       end += 4
00199       (length,) = _struct_I.unpack(str[start:end])
00200       pattern = '<%sd'%length
00201       start = end
00202       end += struct.calcsize(pattern)
00203       self.y_feat_1 = struct.unpack(pattern, str[start:end])
00204       start = end
00205       end += 4
00206       (length,) = _struct_I.unpack(str[start:end])
00207       pattern = '<%sd'%length
00208       start = end
00209       end += struct.calcsize(pattern)
00210       self.x_feat_2 = struct.unpack(pattern, str[start:end])
00211       start = end
00212       end += 4
00213       (length,) = _struct_I.unpack(str[start:end])
00214       pattern = '<%sd'%length
00215       start = end
00216       end += struct.calcsize(pattern)
00217       self.y_feat_2 = struct.unpack(pattern, str[start:end])
00218       _x = self
00219       start = end
00220       end += 40
00221       (_x.focal, _x.dt, _x.im_height, _x.im_width, _x.time,) = _struct_5d.unpack(str[start:end])
00222       return self
00223     except struct.error as e:
00224       raise genpy.DeserializationError(e) #most likely buffer underfill
00225 
00226 
00227   def serialize_numpy(self, buff, numpy):
00228     """
00229     serialize message with numpy array types into buffer
00230     :param buff: buffer, ``StringIO``
00231     :param numpy: numpy python module
00232     """
00233     try:
00234       _x = self
00235       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00236       _x = self.header.frame_id
00237       length = len(_x)
00238       if python3 or type(_x) == unicode:
00239         _x = _x.encode('utf-8')
00240         length = len(_x)
00241       buff.write(struct.pack('<I%ss'%length, length, _x))
00242       length = len(self.x_error)
00243       buff.write(_struct_I.pack(length))
00244       pattern = '<%sd'%length
00245       buff.write(self.x_error.tostring())
00246       length = len(self.y_error)
00247       buff.write(_struct_I.pack(length))
00248       pattern = '<%sd'%length
00249       buff.write(self.y_error.tostring())
00250       length = len(self.x_feat_1)
00251       buff.write(_struct_I.pack(length))
00252       pattern = '<%sd'%length
00253       buff.write(self.x_feat_1.tostring())
00254       length = len(self.y_feat_1)
00255       buff.write(_struct_I.pack(length))
00256       pattern = '<%sd'%length
00257       buff.write(self.y_feat_1.tostring())
00258       length = len(self.x_feat_2)
00259       buff.write(_struct_I.pack(length))
00260       pattern = '<%sd'%length
00261       buff.write(self.x_feat_2.tostring())
00262       length = len(self.y_feat_2)
00263       buff.write(_struct_I.pack(length))
00264       pattern = '<%sd'%length
00265       buff.write(self.y_feat_2.tostring())
00266       _x = self
00267       buff.write(_struct_5d.pack(_x.focal, _x.dt, _x.im_height, _x.im_width, _x.time))
00268     except struct.error as se: self._check_types(se)
00269     except TypeError as te: self._check_types(te)
00270 
00271   def deserialize_numpy(self, str, numpy):
00272     """
00273     unpack serialized message in str into this message instance using numpy for array types
00274     :param str: byte array of serialized message, ``str``
00275     :param numpy: numpy python module
00276     """
00277     try:
00278       if self.header is None:
00279         self.header = std_msgs.msg.Header()
00280       end = 0
00281       _x = self
00282       start = end
00283       end += 12
00284       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00285       start = end
00286       end += 4
00287       (length,) = _struct_I.unpack(str[start:end])
00288       start = end
00289       end += length
00290       if python3:
00291         self.header.frame_id = str[start:end].decode('utf-8')
00292       else:
00293         self.header.frame_id = str[start:end]
00294       start = end
00295       end += 4
00296       (length,) = _struct_I.unpack(str[start:end])
00297       pattern = '<%sd'%length
00298       start = end
00299       end += struct.calcsize(pattern)
00300       self.x_error = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00301       start = end
00302       end += 4
00303       (length,) = _struct_I.unpack(str[start:end])
00304       pattern = '<%sd'%length
00305       start = end
00306       end += struct.calcsize(pattern)
00307       self.y_error = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00308       start = end
00309       end += 4
00310       (length,) = _struct_I.unpack(str[start:end])
00311       pattern = '<%sd'%length
00312       start = end
00313       end += struct.calcsize(pattern)
00314       self.x_feat_1 = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00315       start = end
00316       end += 4
00317       (length,) = _struct_I.unpack(str[start:end])
00318       pattern = '<%sd'%length
00319       start = end
00320       end += struct.calcsize(pattern)
00321       self.y_feat_1 = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00322       start = end
00323       end += 4
00324       (length,) = _struct_I.unpack(str[start:end])
00325       pattern = '<%sd'%length
00326       start = end
00327       end += struct.calcsize(pattern)
00328       self.x_feat_2 = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00329       start = end
00330       end += 4
00331       (length,) = _struct_I.unpack(str[start:end])
00332       pattern = '<%sd'%length
00333       start = end
00334       end += struct.calcsize(pattern)
00335       self.y_feat_2 = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00336       _x = self
00337       start = end
00338       end += 40
00339       (_x.focal, _x.dt, _x.im_height, _x.im_width, _x.time,) = _struct_5d.unpack(str[start:end])
00340       return self
00341     except struct.error as e:
00342       raise genpy.DeserializationError(e) #most likely buffer underfill
00343 
00344 _struct_I = genpy.struct_I
00345 _struct_5d = struct.Struct("<5d")
00346 _struct_3I = struct.Struct("<3I")


hrl_lib
Author(s): Cressel Anderson, Travis Deyle, Advait Jain, Hai Nguyen, Advisor: Prof. Charlie Kemp, Lab: Healthcare Robotics Lab at Georgia Tech
autogenerated on Wed Nov 27 2013 11:34:06