Skip to content

Instantly share code, notes, and snippets.

@awesomebytes
Created August 26, 2020 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awesomebytes/3baf3fc19c2a7fafcd6fc12fbf66bfcd to your computer and use it in GitHub Desktop.
Save awesomebytes/3baf3fc19c2a7fafcd6fc12fbf66bfcd to your computer and use it in GitHub Desktop.

To visualize a custom AprilTags description

In python/ipython 2.7

custom_apriltag_string = "wwwwwwwwwbbbbbbwwbddddbwwbddddbwwbddddbwwbddddbwwbbbbbbwwwwwwwww"
for idx, c in enumerate(custom_apriltag_string):
    if idx % 8 == 0 and idx > 0:
        print
    print c,

From the example in the generator: https://github.com/AprilRobotics/apriltag-generation

java -cp april.jar april.tag.TagFamilyGenerator 
usage: <layout> <minhammingdistance>
There are several options for layout.
	1. To get a new-style april tag with one pixel of data on the outside use "standard_x" where x is the width of the desired tag.
	2. To get an old-style april tag use "classic_x" where x is the width of the desired tag.
	3. To get a circular april tag use "circle_x" where x is the width of the desired tag.
	4. To get an april tag with a custom layout, use "custom_" followed by a string to indicate which type each pixel should be. Use d for data pixels, w for white border, b for black border, x for pixels which should not be part of the tag, and r for pixels which should be part of the recursive version of the tag. For example, custom_wwwwwwwwwbbbbbbwwbddddbwwbddddbwwbddddbwwbddddbwwbbbbbbwwwwwwwww would give an old-style tag with a 4x4 data block in the center.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment