$search
00001 """autogenerated by genmsg_py from calibrateRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class calibrateRequest(roslib.message.Message): 00007 _md5sum = "7b57c459896a8f1f8df45a385acfc123" 00008 _type = "visp_camera_calibration/calibrateRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """int32 method 00011 int32 sample_width 00012 int32 sample_height 00013 00014 """ 00015 __slots__ = ['method','sample_width','sample_height'] 00016 _slot_types = ['int32','int32','int32'] 00017 00018 def __init__(self, *args, **kwds): 00019 """ 00020 Constructor. Any message fields that are implicitly/explicitly 00021 set to None will be assigned a default value. The recommend 00022 use is keyword arguments as this is more robust to future message 00023 changes. You cannot mix in-order arguments and keyword arguments. 00024 00025 The available fields are: 00026 method,sample_width,sample_height 00027 00028 @param args: complete set of field values, in .msg order 00029 @param kwds: use keyword arguments corresponding to message field names 00030 to set specific fields. 00031 """ 00032 if args or kwds: 00033 super(calibrateRequest, self).__init__(*args, **kwds) 00034 #message fields cannot be None, assign default values for those that are 00035 if self.method is None: 00036 self.method = 0 00037 if self.sample_width is None: 00038 self.sample_width = 0 00039 if self.sample_height is None: 00040 self.sample_height = 0 00041 else: 00042 self.method = 0 00043 self.sample_width = 0 00044 self.sample_height = 0 00045 00046 def _get_types(self): 00047 """ 00048 internal API method 00049 """ 00050 return self._slot_types 00051 00052 def serialize(self, buff): 00053 """ 00054 serialize message into buffer 00055 @param buff: buffer 00056 @type buff: StringIO 00057 """ 00058 try: 00059 _x = self 00060 buff.write(_struct_3i.pack(_x.method, _x.sample_width, _x.sample_height)) 00061 except struct.error as se: self._check_types(se) 00062 except TypeError as te: self._check_types(te) 00063 00064 def deserialize(self, str): 00065 """ 00066 unpack serialized message in str into this message instance 00067 @param str: byte array of serialized message 00068 @type str: 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 roslib.message.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 00085 @type buff: StringIO 00086 @param numpy: numpy python module 00087 @type numpy module 00088 """ 00089 try: 00090 _x = self 00091 buff.write(_struct_3i.pack(_x.method, _x.sample_width, _x.sample_height)) 00092 except struct.error as se: self._check_types(se) 00093 except TypeError as te: self._check_types(te) 00094 00095 def deserialize_numpy(self, str, numpy): 00096 """ 00097 unpack serialized message in str into this message instance using numpy for array types 00098 @param str: byte array of serialized message 00099 @type str: str 00100 @param numpy: numpy python module 00101 @type numpy: module 00102 """ 00103 try: 00104 end = 0 00105 _x = self 00106 start = end 00107 end += 12 00108 (_x.method, _x.sample_width, _x.sample_height,) = _struct_3i.unpack(str[start:end]) 00109 return self 00110 except struct.error as e: 00111 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00112 00113 _struct_I = roslib.message.struct_I 00114 _struct_3i = struct.Struct("<3i") 00115 """autogenerated by genmsg_py from calibrateResponse.msg. Do not edit.""" 00116 import roslib.message 00117 import struct 00118 00119 00120 class calibrateResponse(roslib.message.Message): 00121 _md5sum = "cd6d27af348dbd9b7530b010497f18b0" 00122 _type = "visp_camera_calibration/calibrateResponse" 00123 _has_header = False #flag to mark the presence of a Header object 00124 _full_text = """float64[] stdDevErrs 00125 00126 00127 """ 00128 __slots__ = ['stdDevErrs'] 00129 _slot_types = ['float64[]'] 00130 00131 def __init__(self, *args, **kwds): 00132 """ 00133 Constructor. Any message fields that are implicitly/explicitly 00134 set to None will be assigned a default value. The recommend 00135 use is keyword arguments as this is more robust to future message 00136 changes. You cannot mix in-order arguments and keyword arguments. 00137 00138 The available fields are: 00139 stdDevErrs 00140 00141 @param args: complete set of field values, in .msg order 00142 @param kwds: use keyword arguments corresponding to message field names 00143 to set specific fields. 00144 """ 00145 if args or kwds: 00146 super(calibrateResponse, self).__init__(*args, **kwds) 00147 #message fields cannot be None, assign default values for those that are 00148 if self.stdDevErrs is None: 00149 self.stdDevErrs = [] 00150 else: 00151 self.stdDevErrs = [] 00152 00153 def _get_types(self): 00154 """ 00155 internal API method 00156 """ 00157 return self._slot_types 00158 00159 def serialize(self, buff): 00160 """ 00161 serialize message into buffer 00162 @param buff: buffer 00163 @type buff: StringIO 00164 """ 00165 try: 00166 length = len(self.stdDevErrs) 00167 buff.write(_struct_I.pack(length)) 00168 pattern = '<%sd'%length 00169 buff.write(struct.pack(pattern, *self.stdDevErrs)) 00170 except struct.error as se: self._check_types(se) 00171 except TypeError as te: self._check_types(te) 00172 00173 def deserialize(self, str): 00174 """ 00175 unpack serialized message in str into this message instance 00176 @param str: byte array of serialized message 00177 @type str: str 00178 """ 00179 try: 00180 end = 0 00181 start = end 00182 end += 4 00183 (length,) = _struct_I.unpack(str[start:end]) 00184 pattern = '<%sd'%length 00185 start = end 00186 end += struct.calcsize(pattern) 00187 self.stdDevErrs = struct.unpack(pattern, str[start:end]) 00188 return self 00189 except struct.error as e: 00190 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00191 00192 00193 def serialize_numpy(self, buff, numpy): 00194 """ 00195 serialize message with numpy array types into buffer 00196 @param buff: buffer 00197 @type buff: StringIO 00198 @param numpy: numpy python module 00199 @type numpy module 00200 """ 00201 try: 00202 length = len(self.stdDevErrs) 00203 buff.write(_struct_I.pack(length)) 00204 pattern = '<%sd'%length 00205 buff.write(self.stdDevErrs.tostring()) 00206 except struct.error as se: self._check_types(se) 00207 except TypeError as te: self._check_types(te) 00208 00209 def deserialize_numpy(self, str, numpy): 00210 """ 00211 unpack serialized message in str into this message instance using numpy for array types 00212 @param str: byte array of serialized message 00213 @type str: str 00214 @param numpy: numpy python module 00215 @type numpy: module 00216 """ 00217 try: 00218 end = 0 00219 start = end 00220 end += 4 00221 (length,) = _struct_I.unpack(str[start:end]) 00222 pattern = '<%sd'%length 00223 start = end 00224 end += struct.calcsize(pattern) 00225 self.stdDevErrs = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00226 return self 00227 except struct.error as e: 00228 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00229 00230 _struct_I = roslib.message.struct_I 00231 class calibrate(roslib.message.ServiceDefinition): 00232 _type = 'visp_camera_calibration/calibrate' 00233 _md5sum = '30e17d7747033ddb69c9980395e78d44' 00234 _request_class = calibrateRequest 00235 _response_class = calibrateResponse