def __init__(self): rospack = rospkg.RosPack() pkgDir = rospack.get_path('rapp_testing_tools') imagepath = path.join(pkgDir, 'test_data','qr_samples', 'easyMediumQr.jpg') self.msg = QrDetection(imageFilepath=imagepath) self.svc = RappPlatformRappPlatformService(msg=self.msg) self.valid_results = { 'qr_centers': [{'y': 498, 'x': 632}], 'qr_messages': ['Hello there'], 'error': '' }
def __init__(self): rospack = rospkg.RosPack() pkgDir = rospack.get_path('rapp_testing_tools') imagepath = path.join(pkgDir, 'test_data', 'qr_samples', 'mediumFarQr.jpg') self.msg = QrDetection(imageFilepath=imagepath) self.svc = RappPlatformService(msg=self.msg) self.valid_results = { 'qr_centers': [{ 'y': 585, 'x': 690 }], 'qr_messages': ['This is NAO from Greece'], 'error': '' }
def __init__(self): rospack = rospkg.RosPack() pkgDir = rospack.get_path('rapp_testing_tools') imagepath = path.join(pkgDir, 'test_data', 'qr_samples', 'hardNearQr.jpg') self.msg = QrDetection(imageFilepath=imagepath) self.svc = RappPlatformService(msg=self.msg) self.valid_results = { 'qr_centers': [{ 'y': 552, 'x': 645 }], 'qr_messages': [ 'This QR will be used to check the algorithmic robustness as it is quite small' ], 'error': '' }
def setUp(self): self.msg = QrDetection() self.msg.req.imageFilepath = path.join(testdatadir, 'qrcode.png') self.startTime = time.time()