Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apriltag corrupts while sliding the calibration board #183

Open
rooprob opened this issue Dec 12, 2024 · 3 comments
Open

Apriltag corrupts while sliding the calibration board #183

rooprob opened this issue Dec 12, 2024 · 3 comments

Comments

@rooprob
Copy link

rooprob commented Dec 12, 2024

Hi
I'm trying to get a good calibration result, but failing.

When it's detecting, it's detecting quickly. However...

This is one of my issues: often - but not every time - within 8 poses the rotating apriltags render in a corrupted way (see picture), stalling the calibration seemingly forever until I update projected-tag-slider.

When it is in this state I added some debug and it's returning here.

(Question: When it stalls I thought to add some code to retrigger a Claim the calibration model-to-display homography is $H_modelToDisplay - this worked but the result reloaded the same corrupted apriltags - so I guess the issue must exist in the model ... ? Still learning enough TCL to debug that.)

Also attached is the last successful pose as captured by folk (found in folk-calibration-poses). You might see some marks below the card: those are debugging lines I've added which are the [dict get $tag p] as projected from the what the camera is reporting. They are all off towards the bottom, right.

IMG_8991
pose-1733976671582-2

@rooprob
Copy link
Author

rooprob commented Dec 12, 2024

I'm using a logitech 1080p camera. Axxa M8 laser projector, in 1080p mode 60Hz.
folk is current master, with or without my debugging patches.

@rooprob
Copy link
Author

rooprob commented Dec 12, 2024

Also tried apriltags FolkComputer/apriltag@d4f8b0a
and upstream apriltags AprilRobotics/apriltag@724a7d8

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.1 LTS"

@rooprob
Copy link
Author

rooprob commented Dec 12, 2024

For the above report I've been using folk fork of Apriltags.

I mentioned I'd tried the upsteam master. The latest AprilRobotics/apriltag@724a7d8 (Modify the memory allocation method of matd_t to comply with ISO standards) and now throws this error from exponentialMap.

Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: Mailbox create folk-nuc14rvs-b.lan.local -> virtual-programs/apriltags.folk-m49:0-1
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: Mailbox create virtual-programs/apriltags.folk-m49:0-1 -> folk-nuc14rvs-b.lan.local
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: Mailbox create folk-nuc14rvs-b.lan.local -> virtual-programs/apriltags.folk-m49:0-2
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: Mailbox create virtual-programs/apriltags.folk-m49:0-2 -> folk-nuc14rvs-b.lan.local
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: Warning: Unable to generate getter for `VTerminal tmt`: Unrecognized rtype TMT
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: folk-nuc14rvs-b.lan.local: Error in virtual-programs/tags-to-quads.folk, match m65:0: In file included from /home/folk/apriltag/apriltag.h:36,
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:                  from /home/folk/apriltag/apriltag_pose.h:8,
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:                  from /tmp/cfile_PZRldN.c:45:
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: /tmp/cfile_PZRldN.c: In function ‘exponentialMap’:
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: /home/folk/apriltag/common/matd.h:64:39: warning: ‘*tu.data’ is used uninitialized [-Wuninitialized]
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:    64 | #define MATD_EL(m, row, col) (m)->data[((row)*(m)->ncols + (col))]
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:       |                                       ^
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: /tmp/cfile_PZRldN.c:837:5: note: in expansion of macro ‘MATD_EL’
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:   837 |     MATD_EL(tu, 0, 0) = vtux;
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:       |     ^~~~~~~
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: In file included from /home/folk/apriltag/apriltag.h:36,
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:                  from /home/folk/apriltag/apriltag_pose.h:8,
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:                  from /tmp/cfile_PZRldN.c:45:
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: /tmp/cfile_PZRldN.c: In function ‘exponentialMap’:
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: /home/folk/apriltag/common/matd.h:64:39: warning: ‘*tu.data’ is used uninitialized [-Wuninitialized]
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:    64 | #define MATD_EL(m, row, col) (m)->data[((row)*(m)->ncols + (col))]
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:       |                                       ^
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: /tmp/cfile_PZRldN.c:837:5: note: in expansion of macro ‘MATD_EL’
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:   837 |     MATD_EL(tu, 0, 0) = vtux;
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:       |     ^~~~~~~
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     while executing
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "exec $compiler -Wall -g -shared -fno-omit-frame-pointer -fPIC {*}$cflags $cfile -o [file rootname $cfile][info sharedlibextension]"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     (procedure "::c14::compile" line 45)
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "$cc compile"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     (lambda term "this set\ cc\ \[c\ create\]\n\n#\ Represents\ camera\ or\ pr..." line 514)
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "apply $__program $this"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     (lambda term "{this __program} {
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     apply $__program $this
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: }" line 2)
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "apply $lambda {*}$env"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "time {set ret [apply $lambda {*}$env]}"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     ("uplevel" body line 1)
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "uplevel [list time $body]"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     (procedure "baretime" line 1)
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "baretime {set ret [apply $lambda {*}$env]}"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     (procedure "runInSerializedEnvironment" line 4)
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "runInSerializedEnvironment $lambda $env"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: folk-nuc14rvs-b.lan.local: Error in virtual-programs/calibrate/table-refine.folk, match m67:0: can't read "::c14::rescaleAndUndistort_addr": no such variable
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: can't read "::c14::rescaleAndUndistort_addr": no such variable
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     while executing
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "set [set scc]::[set sname]_addr"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     (procedure "::c15::import" line 6)
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "$cc import quadCc rescaleAndUndistort as rescaleAndUndistort"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     (lambda term "{this quadCc} {
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     set cc [c create]
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     $cc struct Intrin..." line 17)
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "apply $lambda {*}$env"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "time {set ret [apply $lambda {*}$env]}"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     ("uplevel" body line 1)
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "uplevel [list time $body]"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     (procedure "baretime" line 1)
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "baretime {set ret [apply $lambda {*}$env]}"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     (procedure "runInSerializedEnvironment" line 4)
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]:     invoked from within
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: "runInSerializedEnvironment $lambda $env"
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: Mailbox create folk-nuc14rvs-b.lan.local -> watchdog
Dec 12 17:39:41 folk-nuc14rvs-b make[56361]: Mailbox create watchdog -> folk-nuc14rvs-b.lan.local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant