From e119b24fded86ef3faabca394d529a88e8bd221f Mon Sep 17 00:00:00 2001 From: RomanJos <42180076+RomanJos@users.noreply.github.com> Date: Sat, 21 Sep 2024 10:56:31 +0200 Subject: [PATCH] Don't generate aprilgrid targets if size < 3*3 --- .../kalibr/python/kalibr_create_target_pdf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aslam_offline_calibration/kalibr/python/kalibr_create_target_pdf b/aslam_offline_calibration/kalibr/python/kalibr_create_target_pdf index 27e31dcc0..777d3f817 100755 --- a/aslam_offline_calibration/kalibr/python/kalibr_create_target_pdf +++ b/aslam_offline_calibration/kalibr/python/kalibr_create_target_pdf @@ -92,6 +92,10 @@ def generateAprilBoard(canvas, n_cols, n_rows, tagSize, tagSpacing=0.25, tagFami print("[ERROR]: Invalid tagSpacing specified. [0-1.0] of tagSize") sys.exit(0) + if(n_cols<3 or n_rows<3): + print("[ERROR]: The size of Aprilgrid targets must be greater than 3*3.") + sys.exit(0) + if skipIds is None: skip_ids = []