_ConfigGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from image_cb_detector/ConfigGoal.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 ConfigGoal(genpy.Message):
00009   _md5sum = "fea383eb01c98da472f0666371ce7fb2"
00010   _type = "image_cb_detector/ConfigGoal"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """uint32 num_x     # Number of checkerboard corners in the X direction
00013 uint32 num_y     # Number of corners in the Y direction
00014 float32 spacing_x  # Spacing between corners in the X direction (meters)
00015 float32 spacing_y  # Spacing between corners in the Y direction (meters)
00016 
00017 # Specify how many times we want to upsample the image.
00018 #  This is often useful for detecting small checkerboards far away
00019 float32 width_scaling
00020 float32 height_scaling
00021 
00022 # Configure openCV's subpixel corner detector
00023 uint32 subpixel_window
00024 int32  subpixel_zero_zone
00025 
00026 
00027 """
00028   __slots__ = ['num_x','num_y','spacing_x','spacing_y','width_scaling','height_scaling','subpixel_window','subpixel_zero_zone']
00029   _slot_types = ['uint32','uint32','float32','float32','float32','float32','uint32','int32']
00030 
00031   def __init__(self, *args, **kwds):
00032     """
00033     Constructor. Any message fields that are implicitly/explicitly
00034     set to None will be assigned a default value. The recommend
00035     use is keyword arguments as this is more robust to future message
00036     changes.  You cannot mix in-order arguments and keyword arguments.
00037 
00038     The available fields are:
00039        num_x,num_y,spacing_x,spacing_y,width_scaling,height_scaling,subpixel_window,subpixel_zero_zone
00040 
00041     :param args: complete set of field values, in .msg order
00042     :param kwds: use keyword arguments corresponding to message field names
00043     to set specific fields.
00044     """
00045     if args or kwds:
00046       super(ConfigGoal, self).__init__(*args, **kwds)
00047       #message fields cannot be None, assign default values for those that are
00048       if self.num_x is None:
00049         self.num_x = 0
00050       if self.num_y is None:
00051         self.num_y = 0
00052       if self.spacing_x is None:
00053         self.spacing_x = 0.
00054       if self.spacing_y is None:
00055         self.spacing_y = 0.
00056       if self.width_scaling is None:
00057         self.width_scaling = 0.
00058       if self.height_scaling is None:
00059         self.height_scaling = 0.
00060       if self.subpixel_window is None:
00061         self.subpixel_window = 0
00062       if self.subpixel_zero_zone is None:
00063         self.subpixel_zero_zone = 0
00064     else:
00065       self.num_x = 0
00066       self.num_y = 0
00067       self.spacing_x = 0.
00068       self.spacing_y = 0.
00069       self.width_scaling = 0.
00070       self.height_scaling = 0.
00071       self.subpixel_window = 0
00072       self.subpixel_zero_zone = 0
00073 
00074   def _get_types(self):
00075     """
00076     internal API method
00077     """
00078     return self._slot_types
00079 
00080   def serialize(self, buff):
00081     """
00082     serialize message into buffer
00083     :param buff: buffer, ``StringIO``
00084     """
00085     try:
00086       _x = self
00087       buff.write(_struct_2I4fIi.pack(_x.num_x, _x.num_y, _x.spacing_x, _x.spacing_y, _x.width_scaling, _x.height_scaling, _x.subpixel_window, _x.subpixel_zero_zone))
00088     except struct.error as se: self._check_types(se)
00089     except TypeError as te: self._check_types(te)
00090 
00091   def deserialize(self, str):
00092     """
00093     unpack serialized message in str into this message instance
00094     :param str: byte array of serialized message, ``str``
00095     """
00096     try:
00097       end = 0
00098       _x = self
00099       start = end
00100       end += 32
00101       (_x.num_x, _x.num_y, _x.spacing_x, _x.spacing_y, _x.width_scaling, _x.height_scaling, _x.subpixel_window, _x.subpixel_zero_zone,) = _struct_2I4fIi.unpack(str[start:end])
00102       return self
00103     except struct.error as e:
00104       raise genpy.DeserializationError(e) #most likely buffer underfill
00105 
00106 
00107   def serialize_numpy(self, buff, numpy):
00108     """
00109     serialize message with numpy array types into buffer
00110     :param buff: buffer, ``StringIO``
00111     :param numpy: numpy python module
00112     """
00113     try:
00114       _x = self
00115       buff.write(_struct_2I4fIi.pack(_x.num_x, _x.num_y, _x.spacing_x, _x.spacing_y, _x.width_scaling, _x.height_scaling, _x.subpixel_window, _x.subpixel_zero_zone))
00116     except struct.error as se: self._check_types(se)
00117     except TypeError as te: self._check_types(te)
00118 
00119   def deserialize_numpy(self, str, numpy):
00120     """
00121     unpack serialized message in str into this message instance using numpy for array types
00122     :param str: byte array of serialized message, ``str``
00123     :param numpy: numpy python module
00124     """
00125     try:
00126       end = 0
00127       _x = self
00128       start = end
00129       end += 32
00130       (_x.num_x, _x.num_y, _x.spacing_x, _x.spacing_y, _x.width_scaling, _x.height_scaling, _x.subpixel_window, _x.subpixel_zero_zone,) = _struct_2I4fIi.unpack(str[start:end])
00131       return self
00132     except struct.error as e:
00133       raise genpy.DeserializationError(e) #most likely buffer underfill
00134 
00135 _struct_I = genpy.struct_I
00136 _struct_2I4fIi = struct.Struct("<2I4fIi")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


image_cb_detector
Author(s): Vijay Pradeep and Eitan Marder-Eppstein
autogenerated on Thu Aug 15 2013 10:15:24