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

Camera calibration with april tags crashes #233

Open
fnobis opened this issue Feb 13, 2025 · 1 comment
Open

Camera calibration with april tags crashes #233

fnobis opened this issue Feb 13, 2025 · 1 comment

Comments

@fnobis
Copy link

fnobis commented Feb 13, 2025

The calibration works for a chessboard pattern. For the april tag is failed.

For the april tag, I printed the example from the repo: https://github.com/tier4/CalibrationTools/blob/tier4/universe/docs/resource/apriltag_grid_3x4.pdf to an A4 (210x297mm) piece of paper

I set the apriltag parameters to

rows = 4
cols  = 3
tag_size = 0.048
tag_spacing=0.25
min_index=0

as soon as the first apriltag marker is visible in the image the video stream freezes in the gui. The following error is printed in the command line when that happens:

[camera_calibrator-1] Traceback (most recent call last):
[camera_calibrator-1]   File "/workspace/build/intrinsic_camera_calibrator/intrinsic_camera_calibrator/camera_calibrator.py", line 1072, in process_detection_results
[camera_calibrator-1]     err_rms_rows, err_rms_cols, pct_err_rows, pct_err_cols = (
[camera_calibrator-1] TypeError: cannot unpack non-iterable numpy.float64 object

I also played around with different settings, e.g. less rows/columns but the programm crashed for all tested settings.

  • Do you see the same behavior, or do some other settings need to be adapted?
  • Is the script to create the april tag markers also somewhere available in the repo? I wanted to also use a higher resolution one.
@knzo25
Copy link
Collaborator

knzo25 commented Feb 14, 2025

Thank you for the report.
We do not really recommend using the apriltags, at least not fir highly distorted images.
During some newly developed features, we broke things as apriltag boards do not necessarily constitute regular grids.

I will send either a PR that brings apriltag to conformity to the rest of the code base, or fix the code so that we can take advantage of apriltag boards better

🙏

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

2 participants