From 345ac9c635dc583cedfbc4c87472bdedc257210f Mon Sep 17 00:00:00 2001 From: 0y8w1x Date: Mon, 19 Dec 2022 18:59:26 +0100 Subject: [PATCH] scripts: Add setBoardInfo to the DepthAI calibration upload script --- scripts/upload_calibration_to_depthai.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/upload_calibration_to_depthai.py b/scripts/upload_calibration_to_depthai.py index 1841e8949..cb55d2da9 100755 --- a/scripts/upload_calibration_to_depthai.py +++ b/scripts/upload_calibration_to_depthai.py @@ -171,6 +171,15 @@ with dai.Device(pipeline) as device: calh = dai.CalibrationHandler() + current_eeprom = device.readCalibration().getEepromData() + + # currently only copies whatever is on the device to the new calibration + calh.setBoardInfo(productName = current_eeprom.productName, boardName = current_eeprom.boardName, + boardRev = current_eeprom.boardRev, boardConf = current_eeprom.boardConf, + hardwareConf = current_eeprom.hardwareConf, batchName = current_eeprom.batchName, + batchTime = current_eeprom.batchTime, boardOptions = current_eeprom.boardOptions, + boardCustom = current_eeprom.boardCustom) + calh.setCameraExtrinsics(dai.CameraBoardSocket.LEFT, dai.CameraBoardSocket.RIGHT, R, translation=T, specTranslation=[args.baseline, 0, 0])