$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 = "fea383eb01c98da472f0666371ce7fb2" 00008 _type = "image_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 # Configure openCV's subpixel corner detector 00021 uint32 subpixel_window 00022 int32 subpixel_zero_zone 00023 00024 00025 """ 00026 __slots__ = ['num_x','num_y','spacing_x','spacing_y','width_scaling','height_scaling','subpixel_window','subpixel_zero_zone'] 00027 _slot_types = ['uint32','uint32','float32','float32','float32','float32','uint32','int32'] 00028 00029 def __init__(self, *args, **kwds): 00030 """ 00031 Constructor. Any message fields that are implicitly/explicitly 00032 set to None will be assigned a default value. The recommend 00033 use is keyword arguments as this is more robust to future message 00034 changes. You cannot mix in-order arguments and keyword arguments. 00035 00036 The available fields are: 00037 num_x,num_y,spacing_x,spacing_y,width_scaling,height_scaling,subpixel_window,subpixel_zero_zone 00038 00039 @param args: complete set of field values, in .msg order 00040 @param kwds: use keyword arguments corresponding to message field names 00041 to set specific fields. 00042 """ 00043 if args or kwds: 00044 super(ConfigGoal, self).__init__(*args, **kwds) 00045 #message fields cannot be None, assign default values for those that are 00046 if self.num_x is None: 00047 self.num_x = 0 00048 if self.num_y is None: 00049 self.num_y = 0 00050 if self.spacing_x is None: 00051 self.spacing_x = 0. 00052 if self.spacing_y is None: 00053 self.spacing_y = 0. 00054 if self.width_scaling is None: 00055 self.width_scaling = 0. 00056 if self.height_scaling is None: 00057 self.height_scaling = 0. 00058 if self.subpixel_window is None: 00059 self.subpixel_window = 0 00060 if self.subpixel_zero_zone is None: 00061 self.subpixel_zero_zone = 0 00062 else: 00063 self.num_x = 0 00064 self.num_y = 0 00065 self.spacing_x = 0. 00066 self.spacing_y = 0. 00067 self.width_scaling = 0. 00068 self.height_scaling = 0. 00069 self.subpixel_window = 0 00070 self.subpixel_zero_zone = 0 00071 00072 def _get_types(self): 00073 """ 00074 internal API method 00075 """ 00076 return self._slot_types 00077 00078 def serialize(self, buff): 00079 """ 00080 serialize message into buffer 00081 @param buff: buffer 00082 @type buff: StringIO 00083 """ 00084 try: 00085 _x = self 00086 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)) 00087 except struct.error as se: self._check_types(se) 00088 except TypeError as te: self._check_types(te) 00089 00090 def deserialize(self, str): 00091 """ 00092 unpack serialized message in str into this message instance 00093 @param str: byte array of serialized message 00094 @type str: 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 roslib.message.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 00111 @type buff: StringIO 00112 @param numpy: numpy python module 00113 @type numpy module 00114 """ 00115 try: 00116 _x = self 00117 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)) 00118 except struct.error as se: self._check_types(se) 00119 except TypeError as te: self._check_types(te) 00120 00121 def deserialize_numpy(self, str, numpy): 00122 """ 00123 unpack serialized message in str into this message instance using numpy for array types 00124 @param str: byte array of serialized message 00125 @type str: str 00126 @param numpy: numpy python module 00127 @type numpy: module 00128 """ 00129 try: 00130 end = 0 00131 _x = self 00132 start = end 00133 end += 32 00134 (_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]) 00135 return self 00136 except struct.error as e: 00137 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00138 00139 _struct_I = roslib.message.struct_I 00140 _struct_2I4fIi = struct.Struct("<2I4fIi")