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.
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.
The measure of the ground Apriltags needs to be very precise. You should have a meter with millimeter precision.
In the map you created before, the origin is the bottom left corner. Remember this as it is important.
The tiles have an internal and an external border, because of the interlocking slots. In the following, as for the map, take the inside bottom left as reference for a tile. (see Figure 2.1)
Each apriltag placement will be measured relatively to the tile it is on, from the above described origin.
Always measure the center of the April tag itself.
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°.
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).