$search
00001 """autogenerated by genmsg_py from BaTestEnvironmentRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class BaTestEnvironmentRequest(roslib.message.Message): 00007 _md5sum = "65aeb9eaa6cbc248861e82cf7f7464c0" 00008 _type = "cob_object_detection_msgs/BaTestEnvironmentRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 int32 number_points 00013 float32 frame_view_number 00014 float32 cone_points_per_plane 00015 00016 00017 float32 limit_error_matching 00018 00019 float32 ba_kernel_param 00020 int32 ba_num_iter 00021 float32 ba_initial_mu 00022 float32 ba_final_mu_factor 00023 float32 ba_tau 00024 00025 float32 angle_sigma_degree 00026 float32 translate_sigma_m 00027 float32 obs_point_sigma_m 00028 float32 world_point_sigma_m 00029 00030 00031 """ 00032 __slots__ = ['number_points','frame_view_number','cone_points_per_plane','limit_error_matching','ba_kernel_param','ba_num_iter','ba_initial_mu','ba_final_mu_factor','ba_tau','angle_sigma_degree','translate_sigma_m','obs_point_sigma_m','world_point_sigma_m'] 00033 _slot_types = ['int32','float32','float32','float32','float32','int32','float32','float32','float32','float32','float32','float32','float32'] 00034 00035 def __init__(self, *args, **kwds): 00036 """ 00037 Constructor. Any message fields that are implicitly/explicitly 00038 set to None will be assigned a default value. The recommend 00039 use is keyword arguments as this is more robust to future message 00040 changes. You cannot mix in-order arguments and keyword arguments. 00041 00042 The available fields are: 00043 number_points,frame_view_number,cone_points_per_plane,limit_error_matching,ba_kernel_param,ba_num_iter,ba_initial_mu,ba_final_mu_factor,ba_tau,angle_sigma_degree,translate_sigma_m,obs_point_sigma_m,world_point_sigma_m 00044 00045 @param args: complete set of field values, in .msg order 00046 @param kwds: use keyword arguments corresponding to message field names 00047 to set specific fields. 00048 """ 00049 if args or kwds: 00050 super(BaTestEnvironmentRequest, self).__init__(*args, **kwds) 00051 #message fields cannot be None, assign default values for those that are 00052 if self.number_points is None: 00053 self.number_points = 0 00054 if self.frame_view_number is None: 00055 self.frame_view_number = 0. 00056 if self.cone_points_per_plane is None: 00057 self.cone_points_per_plane = 0. 00058 if self.limit_error_matching is None: 00059 self.limit_error_matching = 0. 00060 if self.ba_kernel_param is None: 00061 self.ba_kernel_param = 0. 00062 if self.ba_num_iter is None: 00063 self.ba_num_iter = 0 00064 if self.ba_initial_mu is None: 00065 self.ba_initial_mu = 0. 00066 if self.ba_final_mu_factor is None: 00067 self.ba_final_mu_factor = 0. 00068 if self.ba_tau is None: 00069 self.ba_tau = 0. 00070 if self.angle_sigma_degree is None: 00071 self.angle_sigma_degree = 0. 00072 if self.translate_sigma_m is None: 00073 self.translate_sigma_m = 0. 00074 if self.obs_point_sigma_m is None: 00075 self.obs_point_sigma_m = 0. 00076 if self.world_point_sigma_m is None: 00077 self.world_point_sigma_m = 0. 00078 else: 00079 self.number_points = 0 00080 self.frame_view_number = 0. 00081 self.cone_points_per_plane = 0. 00082 self.limit_error_matching = 0. 00083 self.ba_kernel_param = 0. 00084 self.ba_num_iter = 0 00085 self.ba_initial_mu = 0. 00086 self.ba_final_mu_factor = 0. 00087 self.ba_tau = 0. 00088 self.angle_sigma_degree = 0. 00089 self.translate_sigma_m = 0. 00090 self.obs_point_sigma_m = 0. 00091 self.world_point_sigma_m = 0. 00092 00093 def _get_types(self): 00094 """ 00095 internal API method 00096 """ 00097 return self._slot_types 00098 00099 def serialize(self, buff): 00100 """ 00101 serialize message into buffer 00102 @param buff: buffer 00103 @type buff: StringIO 00104 """ 00105 try: 00106 _x = self 00107 buff.write(_struct_i4fi7f.pack(_x.number_points, _x.frame_view_number, _x.cone_points_per_plane, _x.limit_error_matching, _x.ba_kernel_param, _x.ba_num_iter, _x.ba_initial_mu, _x.ba_final_mu_factor, _x.ba_tau, _x.angle_sigma_degree, _x.translate_sigma_m, _x.obs_point_sigma_m, _x.world_point_sigma_m)) 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 00115 @type str: str 00116 """ 00117 try: 00118 end = 0 00119 _x = self 00120 start = end 00121 end += 52 00122 (_x.number_points, _x.frame_view_number, _x.cone_points_per_plane, _x.limit_error_matching, _x.ba_kernel_param, _x.ba_num_iter, _x.ba_initial_mu, _x.ba_final_mu_factor, _x.ba_tau, _x.angle_sigma_degree, _x.translate_sigma_m, _x.obs_point_sigma_m, _x.world_point_sigma_m,) = _struct_i4fi7f.unpack(str[start:end]) 00123 return self 00124 except struct.error as e: 00125 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00126 00127 00128 def serialize_numpy(self, buff, numpy): 00129 """ 00130 serialize message with numpy array types into buffer 00131 @param buff: buffer 00132 @type buff: StringIO 00133 @param numpy: numpy python module 00134 @type numpy module 00135 """ 00136 try: 00137 _x = self 00138 buff.write(_struct_i4fi7f.pack(_x.number_points, _x.frame_view_number, _x.cone_points_per_plane, _x.limit_error_matching, _x.ba_kernel_param, _x.ba_num_iter, _x.ba_initial_mu, _x.ba_final_mu_factor, _x.ba_tau, _x.angle_sigma_degree, _x.translate_sigma_m, _x.obs_point_sigma_m, _x.world_point_sigma_m)) 00139 except struct.error as se: self._check_types(se) 00140 except TypeError as te: self._check_types(te) 00141 00142 def deserialize_numpy(self, str, numpy): 00143 """ 00144 unpack serialized message in str into this message instance using numpy for array types 00145 @param str: byte array of serialized message 00146 @type str: str 00147 @param numpy: numpy python module 00148 @type numpy: module 00149 """ 00150 try: 00151 end = 0 00152 _x = self 00153 start = end 00154 end += 52 00155 (_x.number_points, _x.frame_view_number, _x.cone_points_per_plane, _x.limit_error_matching, _x.ba_kernel_param, _x.ba_num_iter, _x.ba_initial_mu, _x.ba_final_mu_factor, _x.ba_tau, _x.angle_sigma_degree, _x.translate_sigma_m, _x.obs_point_sigma_m, _x.world_point_sigma_m,) = _struct_i4fi7f.unpack(str[start:end]) 00156 return self 00157 except struct.error as e: 00158 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00159 00160 _struct_I = roslib.message.struct_I 00161 _struct_i4fi7f = struct.Struct("<i4fi7f") 00162 """autogenerated by genmsg_py from BaTestEnvironmentResponse.msg. Do not edit.""" 00163 import roslib.message 00164 import struct 00165 00166 import std_msgs.msg 00167 00168 class BaTestEnvironmentResponse(roslib.message.Message): 00169 _md5sum = "73db4f13e99b7e554aa13b596abbef41" 00170 _type = "cob_object_detection_msgs/BaTestEnvironmentResponse" 00171 _has_header = False #flag to mark the presence of a Header object 00172 _full_text = """float32 mean_error 00173 float32 std_dev 00174 float32 min_error 00175 float32 max_error 00176 float32 runs_count 00177 float32 runs_sum 00178 float32 runs_sum2 00179 00180 float32 time_duration 00181 int32 observations 00182 int32 false_matchings 00183 00184 std_msgs/String result 00185 00186 00187 ================================================================================ 00188 MSG: std_msgs/String 00189 string data 00190 00191 """ 00192 __slots__ = ['mean_error','std_dev','min_error','max_error','runs_count','runs_sum','runs_sum2','time_duration','observations','false_matchings','result'] 00193 _slot_types = ['float32','float32','float32','float32','float32','float32','float32','float32','int32','int32','std_msgs/String'] 00194 00195 def __init__(self, *args, **kwds): 00196 """ 00197 Constructor. Any message fields that are implicitly/explicitly 00198 set to None will be assigned a default value. The recommend 00199 use is keyword arguments as this is more robust to future message 00200 changes. You cannot mix in-order arguments and keyword arguments. 00201 00202 The available fields are: 00203 mean_error,std_dev,min_error,max_error,runs_count,runs_sum,runs_sum2,time_duration,observations,false_matchings,result 00204 00205 @param args: complete set of field values, in .msg order 00206 @param kwds: use keyword arguments corresponding to message field names 00207 to set specific fields. 00208 """ 00209 if args or kwds: 00210 super(BaTestEnvironmentResponse, self).__init__(*args, **kwds) 00211 #message fields cannot be None, assign default values for those that are 00212 if self.mean_error is None: 00213 self.mean_error = 0. 00214 if self.std_dev is None: 00215 self.std_dev = 0. 00216 if self.min_error is None: 00217 self.min_error = 0. 00218 if self.max_error is None: 00219 self.max_error = 0. 00220 if self.runs_count is None: 00221 self.runs_count = 0. 00222 if self.runs_sum is None: 00223 self.runs_sum = 0. 00224 if self.runs_sum2 is None: 00225 self.runs_sum2 = 0. 00226 if self.time_duration is None: 00227 self.time_duration = 0. 00228 if self.observations is None: 00229 self.observations = 0 00230 if self.false_matchings is None: 00231 self.false_matchings = 0 00232 if self.result is None: 00233 self.result = std_msgs.msg.String() 00234 else: 00235 self.mean_error = 0. 00236 self.std_dev = 0. 00237 self.min_error = 0. 00238 self.max_error = 0. 00239 self.runs_count = 0. 00240 self.runs_sum = 0. 00241 self.runs_sum2 = 0. 00242 self.time_duration = 0. 00243 self.observations = 0 00244 self.false_matchings = 0 00245 self.result = std_msgs.msg.String() 00246 00247 def _get_types(self): 00248 """ 00249 internal API method 00250 """ 00251 return self._slot_types 00252 00253 def serialize(self, buff): 00254 """ 00255 serialize message into buffer 00256 @param buff: buffer 00257 @type buff: StringIO 00258 """ 00259 try: 00260 _x = self 00261 buff.write(_struct_8f2i.pack(_x.mean_error, _x.std_dev, _x.min_error, _x.max_error, _x.runs_count, _x.runs_sum, _x.runs_sum2, _x.time_duration, _x.observations, _x.false_matchings)) 00262 _x = self.result.data 00263 length = len(_x) 00264 buff.write(struct.pack('<I%ss'%length, length, _x)) 00265 except struct.error as se: self._check_types(se) 00266 except TypeError as te: self._check_types(te) 00267 00268 def deserialize(self, str): 00269 """ 00270 unpack serialized message in str into this message instance 00271 @param str: byte array of serialized message 00272 @type str: str 00273 """ 00274 try: 00275 if self.result is None: 00276 self.result = std_msgs.msg.String() 00277 end = 0 00278 _x = self 00279 start = end 00280 end += 40 00281 (_x.mean_error, _x.std_dev, _x.min_error, _x.max_error, _x.runs_count, _x.runs_sum, _x.runs_sum2, _x.time_duration, _x.observations, _x.false_matchings,) = _struct_8f2i.unpack(str[start:end]) 00282 start = end 00283 end += 4 00284 (length,) = _struct_I.unpack(str[start:end]) 00285 start = end 00286 end += length 00287 self.result.data = str[start:end] 00288 return self 00289 except struct.error as e: 00290 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00291 00292 00293 def serialize_numpy(self, buff, numpy): 00294 """ 00295 serialize message with numpy array types into buffer 00296 @param buff: buffer 00297 @type buff: StringIO 00298 @param numpy: numpy python module 00299 @type numpy module 00300 """ 00301 try: 00302 _x = self 00303 buff.write(_struct_8f2i.pack(_x.mean_error, _x.std_dev, _x.min_error, _x.max_error, _x.runs_count, _x.runs_sum, _x.runs_sum2, _x.time_duration, _x.observations, _x.false_matchings)) 00304 _x = self.result.data 00305 length = len(_x) 00306 buff.write(struct.pack('<I%ss'%length, length, _x)) 00307 except struct.error as se: self._check_types(se) 00308 except TypeError as te: self._check_types(te) 00309 00310 def deserialize_numpy(self, str, numpy): 00311 """ 00312 unpack serialized message in str into this message instance using numpy for array types 00313 @param str: byte array of serialized message 00314 @type str: str 00315 @param numpy: numpy python module 00316 @type numpy: module 00317 """ 00318 try: 00319 if self.result is None: 00320 self.result = std_msgs.msg.String() 00321 end = 0 00322 _x = self 00323 start = end 00324 end += 40 00325 (_x.mean_error, _x.std_dev, _x.min_error, _x.max_error, _x.runs_count, _x.runs_sum, _x.runs_sum2, _x.time_duration, _x.observations, _x.false_matchings,) = _struct_8f2i.unpack(str[start:end]) 00326 start = end 00327 end += 4 00328 (length,) = _struct_I.unpack(str[start:end]) 00329 start = end 00330 end += length 00331 self.result.data = str[start:end] 00332 return self 00333 except struct.error as e: 00334 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00335 00336 _struct_I = roslib.message.struct_I 00337 _struct_8f2i = struct.Struct("<8f2i") 00338 class BaTestEnvironment(roslib.message.ServiceDefinition): 00339 _type = 'cob_object_detection_msgs/BaTestEnvironment' 00340 _md5sum = 'e3abe6b136e84d507dcba74e019ba61e' 00341 _request_class = BaTestEnvironmentRequest 00342 _response_class = BaTestEnvironmentResponse