_FilterObject.py
Go to the documentation of this file.
00001 """autogenerated by genpy from kinect_cleanup/FilterObjectRequest.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 FilterObjectRequest(genpy.Message):
00009   _md5sum = "f9208b4c27eacfc305b50676e90f29a0"
00010   _type = "kinect_cleanup/FilterObjectRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """uint32 min_row
00013 uint32 min_col
00014 uint32 max_row
00015 uint32 max_col
00016 float64[4] plane_normal
00017 float32 rgb
00018 
00019 """
00020   __slots__ = ['min_row','min_col','max_row','max_col','plane_normal','rgb']
00021   _slot_types = ['uint32','uint32','uint32','uint32','float64[4]','float32']
00022 
00023   def __init__(self, *args, **kwds):
00024     """
00025     Constructor. Any message fields that are implicitly/explicitly
00026     set to None will be assigned a default value. The recommend
00027     use is keyword arguments as this is more robust to future message
00028     changes.  You cannot mix in-order arguments and keyword arguments.
00029 
00030     The available fields are:
00031        min_row,min_col,max_row,max_col,plane_normal,rgb
00032 
00033     :param args: complete set of field values, in .msg order
00034     :param kwds: use keyword arguments corresponding to message field names
00035     to set specific fields.
00036     """
00037     if args or kwds:
00038       super(FilterObjectRequest, self).__init__(*args, **kwds)
00039       #message fields cannot be None, assign default values for those that are
00040       if self.min_row is None:
00041         self.min_row = 0
00042       if self.min_col is None:
00043         self.min_col = 0
00044       if self.max_row is None:
00045         self.max_row = 0
00046       if self.max_col is None:
00047         self.max_col = 0
00048       if self.plane_normal is None:
00049         self.plane_normal = [0.,0.,0.,0.]
00050       if self.rgb is None:
00051         self.rgb = 0.
00052     else:
00053       self.min_row = 0
00054       self.min_col = 0
00055       self.max_row = 0
00056       self.max_col = 0
00057       self.plane_normal = [0.,0.,0.,0.]
00058       self.rgb = 0.
00059 
00060   def _get_types(self):
00061     """
00062     internal API method
00063     """
00064     return self._slot_types
00065 
00066   def serialize(self, buff):
00067     """
00068     serialize message into buffer
00069     :param buff: buffer, ``StringIO``
00070     """
00071     try:
00072       _x = self
00073       buff.write(_struct_4I.pack(_x.min_row, _x.min_col, _x.max_row, _x.max_col))
00074       buff.write(_struct_4d.pack(*self.plane_normal))
00075       buff.write(_struct_f.pack(self.rgb))
00076     except struct.error as se: self._check_types(se)
00077     except TypeError as te: self._check_types(te)
00078 
00079   def deserialize(self, str):
00080     """
00081     unpack serialized message in str into this message instance
00082     :param str: byte array of serialized message, ``str``
00083     """
00084     try:
00085       end = 0
00086       _x = self
00087       start = end
00088       end += 16
00089       (_x.min_row, _x.min_col, _x.max_row, _x.max_col,) = _struct_4I.unpack(str[start:end])
00090       start = end
00091       end += 32
00092       self.plane_normal = _struct_4d.unpack(str[start:end])
00093       start = end
00094       end += 4
00095       (self.rgb,) = _struct_f.unpack(str[start:end])
00096       return self
00097     except struct.error as e:
00098       raise genpy.DeserializationError(e) #most likely buffer underfill
00099 
00100 
00101   def serialize_numpy(self, buff, numpy):
00102     """
00103     serialize message with numpy array types into buffer
00104     :param buff: buffer, ``StringIO``
00105     :param numpy: numpy python module
00106     """
00107     try:
00108       _x = self
00109       buff.write(_struct_4I.pack(_x.min_row, _x.min_col, _x.max_row, _x.max_col))
00110       buff.write(self.plane_normal.tostring())
00111       buff.write(_struct_f.pack(self.rgb))
00112     except struct.error as se: self._check_types(se)
00113     except TypeError as te: self._check_types(te)
00114 
00115   def deserialize_numpy(self, str, numpy):
00116     """
00117     unpack serialized message in str into this message instance using numpy for array types
00118     :param str: byte array of serialized message, ``str``
00119     :param numpy: numpy python module
00120     """
00121     try:
00122       end = 0
00123       _x = self
00124       start = end
00125       end += 16
00126       (_x.min_row, _x.min_col, _x.max_row, _x.max_col,) = _struct_4I.unpack(str[start:end])
00127       start = end
00128       end += 32
00129       self.plane_normal = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
00130       start = end
00131       end += 4
00132       (self.rgb,) = _struct_f.unpack(str[start:end])
00133       return self
00134     except struct.error as e:
00135       raise genpy.DeserializationError(e) #most likely buffer underfill
00136 
00137 _struct_I = genpy.struct_I
00138 _struct_4d = struct.Struct("<4d")
00139 _struct_f = struct.Struct("<f")
00140 _struct_4I = struct.Struct("<4I")
00141 """autogenerated by genpy from kinect_cleanup/FilterObjectResponse.msg. Do not edit."""
00142 import sys
00143 python3 = True if sys.hexversion > 0x03000000 else False
00144 import genpy
00145 import struct
00146 
00147 
00148 class FilterObjectResponse(genpy.Message):
00149   _md5sum = "eca8b96616c32aacf1be8bbf14c70eba"
00150   _type = "kinect_cleanup/FilterObjectResponse"
00151   _has_header = False #flag to mark the presence of a Header object
00152   _full_text = """string error
00153 
00154 
00155 """
00156   __slots__ = ['error']
00157   _slot_types = ['string']
00158 
00159   def __init__(self, *args, **kwds):
00160     """
00161     Constructor. Any message fields that are implicitly/explicitly
00162     set to None will be assigned a default value. The recommend
00163     use is keyword arguments as this is more robust to future message
00164     changes.  You cannot mix in-order arguments and keyword arguments.
00165 
00166     The available fields are:
00167        error
00168 
00169     :param args: complete set of field values, in .msg order
00170     :param kwds: use keyword arguments corresponding to message field names
00171     to set specific fields.
00172     """
00173     if args or kwds:
00174       super(FilterObjectResponse, self).__init__(*args, **kwds)
00175       #message fields cannot be None, assign default values for those that are
00176       if self.error is None:
00177         self.error = ''
00178     else:
00179       self.error = ''
00180 
00181   def _get_types(self):
00182     """
00183     internal API method
00184     """
00185     return self._slot_types
00186 
00187   def serialize(self, buff):
00188     """
00189     serialize message into buffer
00190     :param buff: buffer, ``StringIO``
00191     """
00192     try:
00193       _x = self.error
00194       length = len(_x)
00195       if python3 or type(_x) == unicode:
00196         _x = _x.encode('utf-8')
00197         length = len(_x)
00198       buff.write(struct.pack('<I%ss'%length, length, _x))
00199     except struct.error as se: self._check_types(se)
00200     except TypeError as te: self._check_types(te)
00201 
00202   def deserialize(self, str):
00203     """
00204     unpack serialized message in str into this message instance
00205     :param str: byte array of serialized message, ``str``
00206     """
00207     try:
00208       end = 0
00209       start = end
00210       end += 4
00211       (length,) = _struct_I.unpack(str[start:end])
00212       start = end
00213       end += length
00214       if python3:
00215         self.error = str[start:end].decode('utf-8')
00216       else:
00217         self.error = str[start:end]
00218       return self
00219     except struct.error as e:
00220       raise genpy.DeserializationError(e) #most likely buffer underfill
00221 
00222 
00223   def serialize_numpy(self, buff, numpy):
00224     """
00225     serialize message with numpy array types into buffer
00226     :param buff: buffer, ``StringIO``
00227     :param numpy: numpy python module
00228     """
00229     try:
00230       _x = self.error
00231       length = len(_x)
00232       if python3 or type(_x) == unicode:
00233         _x = _x.encode('utf-8')
00234         length = len(_x)
00235       buff.write(struct.pack('<I%ss'%length, length, _x))
00236     except struct.error as se: self._check_types(se)
00237     except TypeError as te: self._check_types(te)
00238 
00239   def deserialize_numpy(self, str, numpy):
00240     """
00241     unpack serialized message in str into this message instance using numpy for array types
00242     :param str: byte array of serialized message, ``str``
00243     :param numpy: numpy python module
00244     """
00245     try:
00246       end = 0
00247       start = end
00248       end += 4
00249       (length,) = _struct_I.unpack(str[start:end])
00250       start = end
00251       end += length
00252       if python3:
00253         self.error = str[start:end].decode('utf-8')
00254       else:
00255         self.error = str[start:end]
00256       return self
00257     except struct.error as e:
00258       raise genpy.DeserializationError(e) #most likely buffer underfill
00259 
00260 _struct_I = genpy.struct_I
00261 class FilterObject(object):
00262   _type          = 'kinect_cleanup/FilterObject'
00263   _md5sum = '2b09ccebccb3b61f88a598247d314053'
00264   _request_class  = FilterObjectRequest
00265   _response_class = FilterObjectResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


kinect_cleanup
Author(s): Zoltan-Csaba Marton, Dejan Pangercic
autogenerated on Sun Oct 6 2013 11:57:20