build details

Show: section status errors & todos local changes recent changes last change in-page changes feedback controls

BUILDING - Apriltags specifications

Modified 2021-10-19 by Andrea Censi

The AprilTag specifications and measure.

A fully operational Duckietown (unknown ref opmanual_duckietown/book)

previous warning next (17 of 20) index
warning
I will ignore this because it is an external link. 

 > I do not know what is indicated by the link '#opmanual_duckietown/book'.

Location not known more precisely.

Created by function n/a in module n/a.
, compliant autobots and a map of the Autolab.

The city is ready to be used for localization

The two localization demos: offline and online

Why do we need ground Apritags

Modified 2019-10-07 by AmaurX

Watchtowers can move around very easily. Collisions with duckiebots and humans are happening all the time. To create a robust way of having a global localization in the autolab, we decide not to fix the Watchtowers.

Instead, we fix ground apriltags on the ground, and we measure and record their positions in the map. This provides enough ground truth for the localization system.

Making the ground Apriltags

Modified 2019-11-21 by hosnerm

As a reminder, the Apriltags already have predetermined sets of usecase. The ranges of tags are specified in Table 2.1.

For localization, the ground Apriltags are in range 300 to 399.

For the Autobots themselves, the tags are in range 400 to 439.

Apriltag ID ranges
Purpose Size Family ID Range
Traffic signs 6.5cm x 6.5cm 36h11 1-199
Traffic lights 6.5cm x 6.5cm 36h11 200-299
Localization 6.5cm x 6.5cm 36h11 300-399
Autobots 6.5cm x 6.5cm 36h11 400-439
Street Name Signs 6.5cm x 6.5cm 36h11 440-587

To print the ones you need, you can find them here: pdf

Placing the ground Apriltags and the Watchtowers

Modified 2019-10-07 by AmaurX

At this point, you have already decided where to place your Watchtowers.

Now, you need to place the ground apriltags. Once they are printed, place them with double sided tape respecting the following convention:

  • The ground Apriltags are outside of roads
  • The ground Apriltags are near the side of the road, and the name of the tag is oriented toward the road (see figure).
  • The ground Apriltag’s orientation is a multiple of 45°, meaning there is only eights possible orientations.
  • The only ground Apriltags not oriented in multiple of 90° are the ones on the outside of curve lanes. (see figure)

Todo: add figure(s)

previous task next (3 of 10) index
task

The following was marked as "todo".

Todo: add figure(s)

Location not known more precisely.

Created by function n/a in module n/a.

Try to put at least two ground Apriltag in the field of view of each watchtower (see Figure 1.4), and try to have Apriltags that are seen by multiple Watchtowers at the same time. This will improve the robustness of the localization graph.

Generating the map in duckietown-world

Modified 2019-06-19 by Amaury Camus

You should already have a map as explained in Unit B-4 - Autolab map. If not, go back and do it, as it will be necessary for the rest.

Adding the ground Apriltags localization to your map

Modified 2019-06-19 by Amaury Camus

Before measuring

Modified 2019-10-07 by AmaurX

This is the important part of the Apriltag specifications. You need to make sure that:

  • The ground Apriltags are indeed 6.5cm x 6.5cm. If they are not, the localization system will get flawed data and thus will be useless.
  • The ground Apriltags are very well fixed to the ground (using tape and nails). Once they are measured they should not move at all.
  • The ground Apriltags angles are multiples of 45°. This will make the following much easier.

Measuring

Modified 2019-10-07 by AmaurX

How to measure:

In the following, you will be asked 5 numbers for each Apriltag:

  • the x coordinate of the tile : it is the number (starting at 0 at the first bottom left origin tile) of tile along the x axis (bottom axis)
  • the y coordinate of the tile : same as for x, it starts at 0
  • the x measure of the Apriltag on the tile : you can get it by blocking your meter in the interior left edge and measuring (in meters) the distance from the interior edge to the center of the Apriltag.
  • the y measure of the Apriltag on the tile : you can get it by blocking your meter in the interior bottom edge and measuring (in meters) the distance from the interior edge to the center of the Apriltag.
  • the orientation of the apriltag (in degrees) : it is 0 if the Apriltag’s name is aligned normally with the x axis (eg readable from the “bottom” of the map). Then it is defined with the trigonometric convention (counter-clockwise). This should normally always be in multiples of 45°.
We measure from the inside band from the bottom left inner corner, defined as the origin of the tile

Todo: Add more pictures

previous task next (4 of 10) index
task

The following was marked as "todo".

Todo: Add more pictures

Location not known more precisely.

Created by function n/a in module n/a.

Filling the map in

Modified 2019-10-07 by AmaurX

Once you are sure of your positioning of the Apriltags, you can start measuring them. To do so:

  • Open a terminal inside the duckietown-world repository, as you did to create your map. Your map should still be in the src/duckietown_world/data/gd1/maps folder.

Inside the duckietown-world repository, run the following command:

laptop $ python3 src/apriltag_measure/measure_ground_apriltags.py MAP_NAME
  • Follow the instructions in the terminal : choose an Apriltag number, and fill in the 5 asked numbers, as described above.
  • If an Apriltag was already filled in before (if you are changing your map for instance), you will be asked to confirm the overwriting of the positioning. As everything is versioned in github, you can always go back to find the previous positions if need be.
  • If you try recording an Apriltag number than is not in the allocated range (300-399), the script will also ask to confirm.
  • At the end, just confirm the saving. The resulting map will be where it was before, with now the Apriltag measures added to it.
  • As described in Unit B-4 - Autolab map, you should recompile your map and visualize the apriltags on it (easy debug to find obvious mistakes).