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