From 44b16abd12d0491201087088f092324aa26894c0 Mon Sep 17 00:00:00 2001 From: ohadmeir Date: Thu, 21 Nov 2024 12:13:37 +0200 Subject: [PATCH] Fix python UCAL example, tare calibration also returns health data --- wrappers/python/examples/depth_auto_calibration_example.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wrappers/python/examples/depth_auto_calibration_example.py b/wrappers/python/examples/depth_auto_calibration_example.py index 9e510f325d..3e472bc08d 100644 --- a/wrappers/python/examples/depth_auto_calibration_example.py +++ b/wrappers/python/examples/depth_auto_calibration_example.py @@ -110,6 +110,7 @@ def run_on_chip_calibration(speed, scan): cfg.enable_stream(rs.stream.depth, 256, 144, rs.format.z16, 90) pipe = rs.pipeline(ctx) pp = pipe.start(cfg) + time.sleep(1) # give the device time to start streaming dev = pp.get_device() try: @@ -199,6 +200,7 @@ def run_tare_calibration(accuracy, scan, gt, target_size): cfg.enable_stream(rs.stream.depth, 256, 144, rs.format.z16, 90) pipe = rs.pipeline(ctx) pp = pipe.start(cfg) + time.sleep(1) # give the device time to start streaming dev = pp.get_device() try: @@ -206,7 +208,7 @@ def run_tare_calibration(accuracy, scan, gt, target_size): print(f'\tAccuracy:\t{accuracy}') print(f'\tScan:\t{scan}') adev = dev.as_auto_calibrated_device() - table = adev.run_tare_calibration(target_z, args, progress_callback, 30000) + table, health = adev.run_tare_calibration(target_z, args, progress_callback, 30000) print('Tare calibration finished') adev.set_calibration_table(table) adev.write_calibration()