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


laser_cb_detector
Author(s): Vijay Pradeep
autogenerated on Thu Aug 15 2013 10:15:32