_CoordConversion.py
Go to the documentation of this file.
00001 """autogenerated by genpy from youbot_overhead_vision/CoordConversionRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 
00008 class CoordConversionRequest(genpy.Message):
00009   _md5sum = "f33fcc4170d425926934a81b4fde305c"
00010   _type = "youbot_overhead_vision/CoordConversionRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """float32 x
00013 float32 y
00014 int8 type
00015 
00016 """
00017   __slots__ = ['x','y','type']
00018   _slot_types = ['float32','float32','int8']
00019 
00020   def __init__(self, *args, **kwds):
00021     """
00022     Constructor. Any message fields that are implicitly/explicitly
00023     set to None will be assigned a default value. The recommend
00024     use is keyword arguments as this is more robust to future message
00025     changes.  You cannot mix in-order arguments and keyword arguments.
00026 
00027     The available fields are:
00028        x,y,type
00029 
00030     :param args: complete set of field values, in .msg order
00031     :param kwds: use keyword arguments corresponding to message field names
00032     to set specific fields.
00033     """
00034     if args or kwds:
00035       super(CoordConversionRequest, self).__init__(*args, **kwds)
00036       #message fields cannot be None, assign default values for those that are
00037       if self.x is None:
00038         self.x = 0.
00039       if self.y is None:
00040         self.y = 0.
00041       if self.type is None:
00042         self.type = 0
00043     else:
00044       self.x = 0.
00045       self.y = 0.
00046       self.type = 0
00047 
00048   def _get_types(self):
00049     """
00050     internal API method
00051     """
00052     return self._slot_types
00053 
00054   def serialize(self, buff):
00055     """
00056     serialize message into buffer
00057     :param buff: buffer, ``StringIO``
00058     """
00059     try:
00060       _x = self
00061       buff.write(_struct_2fb.pack(_x.x, _x.y, _x.type))
00062     except struct.error as se: self._check_types(se)
00063     except TypeError as te: self._check_types(te)
00064 
00065   def deserialize(self, str):
00066     """
00067     unpack serialized message in str into this message instance
00068     :param str: byte array of serialized message, ``str``
00069     """
00070     try:
00071       end = 0
00072       _x = self
00073       start = end
00074       end += 9
00075       (_x.x, _x.y, _x.type,) = _struct_2fb.unpack(str[start:end])
00076       return self
00077     except struct.error as e:
00078       raise genpy.DeserializationError(e) #most likely buffer underfill
00079 
00080 
00081   def serialize_numpy(self, buff, numpy):
00082     """
00083     serialize message with numpy array types into buffer
00084     :param buff: buffer, ``StringIO``
00085     :param numpy: numpy python module
00086     """
00087     try:
00088       _x = self
00089       buff.write(_struct_2fb.pack(_x.x, _x.y, _x.type))
00090     except struct.error as se: self._check_types(se)
00091     except TypeError as te: self._check_types(te)
00092 
00093   def deserialize_numpy(self, str, numpy):
00094     """
00095     unpack serialized message in str into this message instance using numpy for array types
00096     :param str: byte array of serialized message, ``str``
00097     :param numpy: numpy python module
00098     """
00099     try:
00100       end = 0
00101       _x = self
00102       start = end
00103       end += 9
00104       (_x.x, _x.y, _x.type,) = _struct_2fb.unpack(str[start:end])
00105       return self
00106     except struct.error as e:
00107       raise genpy.DeserializationError(e) #most likely buffer underfill
00108 
00109 _struct_I = genpy.struct_I
00110 _struct_2fb = struct.Struct("<2fb")
00111 """autogenerated by genpy from youbot_overhead_vision/CoordConversionResponse.msg. Do not edit."""
00112 import sys
00113 python3 = True if sys.hexversion > 0x03000000 else False
00114 import genpy
00115 import struct
00116 
00117 
00118 class CoordConversionResponse(genpy.Message):
00119   _md5sum = "9c11728d8a06caf3ca3da804eac2711b"
00120   _type = "youbot_overhead_vision/CoordConversionResponse"
00121   _has_header = False #flag to mark the presence of a Header object
00122   _full_text = """float32 xConverted
00123 float32 yConverted
00124 
00125 
00126 """
00127   __slots__ = ['xConverted','yConverted']
00128   _slot_types = ['float32','float32']
00129 
00130   def __init__(self, *args, **kwds):
00131     """
00132     Constructor. Any message fields that are implicitly/explicitly
00133     set to None will be assigned a default value. The recommend
00134     use is keyword arguments as this is more robust to future message
00135     changes.  You cannot mix in-order arguments and keyword arguments.
00136 
00137     The available fields are:
00138        xConverted,yConverted
00139 
00140     :param args: complete set of field values, in .msg order
00141     :param kwds: use keyword arguments corresponding to message field names
00142     to set specific fields.
00143     """
00144     if args or kwds:
00145       super(CoordConversionResponse, self).__init__(*args, **kwds)
00146       #message fields cannot be None, assign default values for those that are
00147       if self.xConverted is None:
00148         self.xConverted = 0.
00149       if self.yConverted is None:
00150         self.yConverted = 0.
00151     else:
00152       self.xConverted = 0.
00153       self.yConverted = 0.
00154 
00155   def _get_types(self):
00156     """
00157     internal API method
00158     """
00159     return self._slot_types
00160 
00161   def serialize(self, buff):
00162     """
00163     serialize message into buffer
00164     :param buff: buffer, ``StringIO``
00165     """
00166     try:
00167       _x = self
00168       buff.write(_struct_2f.pack(_x.xConverted, _x.yConverted))
00169     except struct.error as se: self._check_types(se)
00170     except TypeError as te: self._check_types(te)
00171 
00172   def deserialize(self, str):
00173     """
00174     unpack serialized message in str into this message instance
00175     :param str: byte array of serialized message, ``str``
00176     """
00177     try:
00178       end = 0
00179       _x = self
00180       start = end
00181       end += 8
00182       (_x.xConverted, _x.yConverted,) = _struct_2f.unpack(str[start:end])
00183       return self
00184     except struct.error as e:
00185       raise genpy.DeserializationError(e) #most likely buffer underfill
00186 
00187 
00188   def serialize_numpy(self, buff, numpy):
00189     """
00190     serialize message with numpy array types into buffer
00191     :param buff: buffer, ``StringIO``
00192     :param numpy: numpy python module
00193     """
00194     try:
00195       _x = self
00196       buff.write(_struct_2f.pack(_x.xConverted, _x.yConverted))
00197     except struct.error as se: self._check_types(se)
00198     except TypeError as te: self._check_types(te)
00199 
00200   def deserialize_numpy(self, str, numpy):
00201     """
00202     unpack serialized message in str into this message instance using numpy for array types
00203     :param str: byte array of serialized message, ``str``
00204     :param numpy: numpy python module
00205     """
00206     try:
00207       end = 0
00208       _x = self
00209       start = end
00210       end += 8
00211       (_x.xConverted, _x.yConverted,) = _struct_2f.unpack(str[start:end])
00212       return self
00213     except struct.error as e:
00214       raise genpy.DeserializationError(e) #most likely buffer underfill
00215 
00216 _struct_I = genpy.struct_I
00217 _struct_2f = struct.Struct("<2f")
00218 class CoordConversion(object):
00219   _type          = 'youbot_overhead_vision/CoordConversion'
00220   _md5sum = '48b74b346cf89d5d80c18bc2886cc171'
00221   _request_class  = CoordConversionRequest
00222   _response_class = CoordConversionResponse


youbot_overhead_vision
Author(s): Fred Clinckemaillie, Maintained by David Kent
autogenerated on Thu Jan 2 2014 12:14:12