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.c: failed to allocate hamming decode table. Reduce max hamming size #73

Closed
Soakedcardinal opened this issue Mar 25, 2020 · 4 comments

Comments

@Soakedcardinal
Copy link

I got this error running the aptriltag_ros_continuous_node using family 48h12 (The one with empty space in the middle).

following AprilRobotics/apriltag#68,

I changed apriltag_detector_add_family(td_, tf_) to apriltag_detector_add_family_bits(td_, tf_, 1) in common_functions.cpp and it works after recompiling.

I don't know what's going on here but I figured this is an issue related to the implementation of newer tag families in apriltag 3.

@wxmerkt
Copy link
Collaborator

wxmerkt commented Oct 21, 2020

How much memory does your machine have? I noticed that for tagStandard41h12 the node in its standard form right now uses 384 MB and tagCustom48h12 4.7 GB.

@mkrogius, do you recommend to set the bits to 1 depending on family or in general?

@mkrogius
Copy link

This should only affect the larger tag families. The memory consumption is essentially O(n choose k) == O(n!/(k! * (n-k)!)) where n is the number of tags in the family and k is whatever you set the number of bits to (as long as k << n). So to reduce memory requirements you can either reduce the number of tags in the family or reduce the number of bits of correction.

Maybe we should add an easier way for people to say that they don't want to use all of the possible tags in a family? I imagine most people use only a few hundred tags instead of the thousands or tens of thousands of tags in the larger families.

@Soakedcardinal
Copy link
Author

Soakedcardinal commented Nov 11, 2020

@wxmerkt I'm running this on an Odroid XU4 with 2GB LPDDR3 RAM

@wxmerkt
Copy link
Collaborator

wxmerkt commented Apr 7, 2021

There is now an option to set the maximum hamming distance thanks to #93 - this should address the problems raised in this issue.

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

3 participants