_calibrate.py
Go to the documentation of this file.
00001 """autogenerated by genpy from visp_camera_calibration/calibrateRequest.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 calibrateRequest(genpy.Message):
00009   _md5sum = "7b57c459896a8f1f8df45a385acfc123"
00010   _type = "visp_camera_calibration/calibrateRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """int32 method
00013 int32 sample_width
00014 int32 sample_height
00015 
00016 """
00017   __slots__ = ['method','sample_width','sample_height']
00018   _slot_types = ['int32','int32','int32']
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        method,sample_width,sample_height
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(calibrateRequest, self).__init__(*args, **kwds)
00036       #message fields cannot be None, assign default values for those that are
00037       if self.method is None:
00038         self.method = 0
00039       if self.sample_width is None:
00040         self.sample_width = 0
00041       if self.sample_height is None:
00042         self.sample_height = 0
00043     else:
00044       self.method = 0
00045       self.sample_width = 0
00046       self.sample_height = 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_3i.pack(_x.method, _x.sample_width, _x.sample_height))
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 += 12
00075       (_x.method, _x.sample_width, _x.sample_height,) = _struct_3i.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_3i.pack(_x.method, _x.sample_width, _x.sample_height))
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 += 12
00104       (_x.method, _x.sample_width, _x.sample_height,) = _struct_3i.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_3i = struct.Struct("<3i")
00111 """autogenerated by genpy from visp_camera_calibration/calibrateResponse.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 calibrateResponse(genpy.Message):
00119   _md5sum = "cd6d27af348dbd9b7530b010497f18b0"
00120   _type = "visp_camera_calibration/calibrateResponse"
00121   _has_header = False #flag to mark the presence of a Header object
00122   _full_text = """float64[] stdDevErrs
00123 
00124 
00125 """
00126   __slots__ = ['stdDevErrs']
00127   _slot_types = ['float64[]']
00128 
00129   def __init__(self, *args, **kwds):
00130     """
00131     Constructor. Any message fields that are implicitly/explicitly
00132     set to None will be assigned a default value. The recommend
00133     use is keyword arguments as this is more robust to future message
00134     changes.  You cannot mix in-order arguments and keyword arguments.
00135 
00136     The available fields are:
00137        stdDevErrs
00138 
00139     :param args: complete set of field values, in .msg order
00140     :param kwds: use keyword arguments corresponding to message field names
00141     to set specific fields.
00142     """
00143     if args or kwds:
00144       super(calibrateResponse, self).__init__(*args, **kwds)
00145       #message fields cannot be None, assign default values for those that are
00146       if self.stdDevErrs is None:
00147         self.stdDevErrs = []
00148     else:
00149       self.stdDevErrs = []
00150 
00151   def _get_types(self):
00152     """
00153     internal API method
00154     """
00155     return self._slot_types
00156 
00157   def serialize(self, buff):
00158     """
00159     serialize message into buffer
00160     :param buff: buffer, ``StringIO``
00161     """
00162     try:
00163       length = len(self.stdDevErrs)
00164       buff.write(_struct_I.pack(length))
00165       pattern = '<%sd'%length
00166       buff.write(struct.pack(pattern, *self.stdDevErrs))
00167     except struct.error as se: self._check_types(se)
00168     except TypeError as te: self._check_types(te)
00169 
00170   def deserialize(self, str):
00171     """
00172     unpack serialized message in str into this message instance
00173     :param str: byte array of serialized message, ``str``
00174     """
00175     try:
00176       end = 0
00177       start = end
00178       end += 4
00179       (length,) = _struct_I.unpack(str[start:end])
00180       pattern = '<%sd'%length
00181       start = end
00182       end += struct.calcsize(pattern)
00183       self.stdDevErrs = struct.unpack(pattern, str[start:end])
00184       return self
00185     except struct.error as e:
00186       raise genpy.DeserializationError(e) #most likely buffer underfill
00187 
00188 
00189   def serialize_numpy(self, buff, numpy):
00190     """
00191     serialize message with numpy array types into buffer
00192     :param buff: buffer, ``StringIO``
00193     :param numpy: numpy python module
00194     """
00195     try:
00196       length = len(self.stdDevErrs)
00197       buff.write(_struct_I.pack(length))
00198       pattern = '<%sd'%length
00199       buff.write(self.stdDevErrs.tostring())
00200     except struct.error as se: self._check_types(se)
00201     except TypeError as te: self._check_types(te)
00202 
00203   def deserialize_numpy(self, str, numpy):
00204     """
00205     unpack serialized message in str into this message instance using numpy for array types
00206     :param str: byte array of serialized message, ``str``
00207     :param numpy: numpy python module
00208     """
00209     try:
00210       end = 0
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.stdDevErrs = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00218       return self
00219     except struct.error as e:
00220       raise genpy.DeserializationError(e) #most likely buffer underfill
00221 
00222 _struct_I = genpy.struct_I
00223 class calibrate(object):
00224   _type          = 'visp_camera_calibration/calibrate'
00225   _md5sum = '30e17d7747033ddb69c9980395e78d44'
00226   _request_class  = calibrateRequest
00227   _response_class = calibrateResponse


visp_camera_calibration
Author(s): Filip Novotny
autogenerated on Sat Dec 28 2013 17:45:42