> For the complete documentation index, see [llms.txt](https://docs.hello-robot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hello-robot.com/stretch4_docs/working-with-stretch/common_tasks/list-of-aruco.md).

# List of ArUco and ChArUco IDs

This page documents the ID's and sizes of ArUco and ChArUco boards used by Stretch 4.

## ArUco Tags

| ID  | Outer Marker Size | Inner Marker Size | Dictionary     | Used By                    |
| --- | ----------------- | ----------------- | -------------- | -------------------------- |
| 29  | 30mm              | 20mm              | DICT\_6x6\_100 |                            |
| 30  | 50mm              | 40mm              | DICT\_6x6\_100 |                            |
| 31  | 80mm              | 60mm              | DICT\_6x6\_100 |                            |
| 32  | 100mm             | 80mm              | DICT\_6x6\_100 |                            |
| 33  | 120mm             | 100mm             | DICT\_6x6\_100 |                            |
| 43  | 50mm              | 40mm              | DICT\_6X6\_50  | Docking Station, Right Tag |
| 44  | 50mm              | 40mm              | DICT\_6X6\_50  | Docking Station, Left Tag  |
| 45  | 50mm              | 40mm              | DICT\_6X6\_50  | Docking Station, Apex Tag  |
| 66  | 32mm              | 25mm              | DICT\_6x6\_100 | Wrist Yaw Joint            |
| 200 |                   | 14mm              | DICT\_6x6\_250 | Left Fingertip             |
| 201 |                   | 14mm              | DICT\_6x6\_250 | Right Fingertip            |

## ChArUco Boards

| Board Type   | Board Size | # Rows | # Columns | Checker Size | Marker Size | Dictionary    | Start ID | End ID | Used By                                                                                                 |
| ------------ | ---------- | ------ | --------- | ------------ | ----------- | ------------- | -------- | ------ | ------------------------------------------------------------------------------------------------------- |
| White ArUcos | 280x216mm  | 5      | 7         | 37mm         | 27mm        | DICT\_4X4\_50 | 0        | 17     | [Camera Calibration](https://github.com/hello-robot/stretch4_docs/blob/main/wiki/camera-calibration.md) |
|              |            |        |           |              |             |               |          |        |                                                                                                         |
|              |            |        |           |              |             |               |          |        |                                                                                                         |

\*Board type is whether the board is inscribed in white or black squares.

## How to read these tables

For ArUco tags, outer and inner marker size refers to the outer white boundary and inner black boundary of the tag. A 50mm outer with a 40mm inner means the tag has a 5mm white border around the tag. For ChArUco boards, checker size refers to square length of each black/white square in the grid. Marker size refers to the inner black boundary of the tag. Hence, a 37mm checker size with a 27mm marker size means the tags have a 5mm border around the tag. ChArUco boards come in two variants; the ArUco marker can be inside the black or white squares. For example, the camera calibration ChArUco board uses the white variant.

ArUco detection requires a "dictionary". `DICT_6X6_50` refers to a ArUco tag with 6x6 grid that is capable of representing 2<sup>36</sup> IDs. The `_50` refers to the number of IDs the dictionary can actually detect (0-49 in this case). Smaller dictionaries have larger Hamming distance between each ID, and therefore better error correction and reliability, allowing for better detection on blurry or slightly occluded images of the tag. The dictionary options are:

* `cv2.aruco.DICT_nXn_50` (Contains IDs 0-49)
* `cv2.aruco.DICT_nXn_100` (Contains IDs 0-99)
* `cv2.aruco.DICT_nXn_250` (Contains IDs 0-249)
* `cv2.aruco.DICT_nXn_1000` (Contains IDs 0-999)

Larger dictionaries are supersets of smaller dictionaries. This means tag ID 0 will be visible in all of these dictionaries.

You might expect larger NxNs to increase Hamming distance, but it's actually the opposite. A 4x4 marker only has 16 internal bits. The absolute maximum Hamming distance possible between any two markers is 16 (and practically, it's much lower). A 7x7 marker has 49 internal bits. This gives the dictionary more combinations to pick from, allowing it to select 50 markers that are radically different from one another, resulting in a much higher Hamming distance and better error correction capability. OpenCV supports

* 4x4 (`cv2.aruco.DICT_4X4_...`)
* 5x5 (`cv2.aruco.DICT_5X5_...`)
* 6x6 (`cv2.aruco.DICT_6X6_...`)
* 7x7 (`cv2.aruco.DICT_7X7_...`)

The tradeoff is fitting more bits into the same physical size marker requires the camera to have high enough resolution to see each bit clearly enough. For example, a 1280p camera (or out-of-focus camera) might struggle to see a 7x7 marker 2 meters away, but not with a 4x4 marker.

OpenCV's `cv2.aruco` module also support AprilTags, which was developed at UMich and is said to have better robustness to lighting/angles. The dictionaries are listed below, although, we do not use them for Stretch 4.

* `DICT_APRILTAG_16h5` (Effectively 4x4)
* `DICT_APRILTAG_25h9` (Effectively 5x5)
* `DICT_APRILTAG_36h10 / 36h11` (Effectively 6x6)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hello-robot.com/stretch4_docs/working-with-stretch/common_tasks/list-of-aruco.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
