Skip to content

docs: Hand-Eye calibration guide #479#482

Open
MithraGhlm wants to merge 48 commits into
mainfrom
docs/hand-eye-calibration
Open

docs: Hand-Eye calibration guide #479#482
MithraGhlm wants to merge 48 commits into
mainfrom
docs/hand-eye-calibration

Conversation

@MithraGhlm
Copy link
Copy Markdown
Contributor

Description

Initial draft of documentation for camera frame calibration guide.
This PR closes the camera frame calibration guide #479

This PR solves the issue by adding two stand-alone guides to the documentation.
The guide for intrinsic camera calibration already exists.
One guide is about the configuration and the process of recognizing STag marker (WIP) and a second one would be dedicated to calibrating the robot.

Review guidelines

Estimated Time of Review: 10 minutes

Feedback Needed

  • Structure okay?
  • Level of detail appropriate?

@MithraGhlm MithraGhlm requested a review from domire8 April 21, 2026 11:26
Copy link
Copy Markdown
Contributor

@SprGrf SprGrf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! First quick review:

Comment thread docs/core/examples/guides/camera-streamer.md Outdated
Comment thread docs/core/examples/guides/stag-marker-detection.md Outdated
Comment thread docs/core/examples/guides/stag-marker-detection.md Outdated
Comment thread docs/core/examples/guides/stag-marker-detection.md Outdated
Comment thread docs/core/examples/guides/stag-marker-detection.md Outdated
Comment thread docs/core/examples/guides/stag-marker-detection.md Outdated
Comment thread docs/core/examples/guides/stag-marker-detection.md Outdated
Comment thread docs/core/examples/guides/stag-marker-detection.md Outdated
Comment thread docs/core/examples/guides/stag-marker-detection.md Outdated
@MithraGhlm MithraGhlm force-pushed the docs/hand-eye-calibration branch from bec2ef4 to 0613b51 Compare April 27, 2026 11:11
@MithraGhlm
Copy link
Copy Markdown
Contributor Author

@SprGrf Thanks

@MithraGhlm MithraGhlm changed the title docs: Hand-Eye calibration guide #479 docs: Marker detection guide #479 Apr 27, 2026
@MithraGhlm MithraGhlm changed the title docs: Marker detection guide #479 docs: Hand-Eye calibration guide #479 Apr 27, 2026
@MithraGhlm
Copy link
Copy Markdown
Contributor Author

MithraGhlm commented Apr 28, 2026

Should there be a stand alone guide to introduce the Robot Camera Calibration component?
Or is it better to have it in the same docs page?

Copy link
Copy Markdown
Contributor

@SprGrf SprGrf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! The backbone is here, some first comments I had while reading:

Comment thread docs/core/examples/guides/hand-eye-calibration.md
Comment thread docs/core/examples/guides/hand-eye-calibration.md Outdated
Comment thread docs/core/examples/guides/hand-eye-calibration.md
Comment thread docs/core/examples/guides/hand-eye-calibration.md
Comment thread docs/core/examples/guides/hand-eye-calibration.md Outdated
Comment thread docs/core/examples/guides/hand-eye-calibration.md Outdated
Comment thread docs/core/examples/guides/hand-eye-calibration.md
MithraGhlm and others added 3 commits April 29, 2026 11:49
Co-authored-by: Spyros Garyfallidis <spyros@aica.tech>
Co-authored-by: Spyros Garyfallidis <spyros@aica.tech>
Co-authored-by: Spyros Garyfallidis <spyros@aica.tech>
Comment thread docs/core/examples/guides/marker-detection.md Outdated
Comment thread docs/core/examples/guides/hand-eye-calibration.md Outdated
Comment thread docs/core/examples/guides/camera-streamer.md Outdated
Comment thread docs/core/examples/guides/marker-detection.md Outdated
Comment thread docs/core/examples/guides/marker-detection.md Outdated
Comment thread docs/core/examples/guides/fiducial-markers.md Outdated
Comment thread docs/core/examples/guides/fiducial-markers.md Outdated
Comment thread docs/core/examples/guides/fiducial-markers.md Outdated
Comment thread docs/core/examples/guides/hand-eye-calibration.md
Comment thread docs/core/examples/guides/hand-eye-calibration.md Outdated
Co-authored-by: Dominic Reber <71256590+domire8@users.noreply.github.com>
Comment thread docs/core/examples/guides/hand-eye-calibration.md
Comment thread docs/core/examples/guides/hand-eye-calibration.md
Comment thread docs/core/examples/guides/fiducial-markers.md Outdated

- **ArUco marker:** ArUco markers can be generate online (e.g., from [here](https://calib.io/pages/camera-calibration-pattern-generator)), which permits choosing the dictionary, marker ID, and marker size. It can be then exported as PDF or SVG for printing.

- **STag marker:** STag marker set should be obtained from the [STag project repository](https://github.com/usrl-uofsc/stag_ros) or the generator/reference files linked by the project. The [STag project repository for ROS](https://github.com/usrl-uofsc/stag_ros) is the other place to look for marker-generation assets. In practice, you’ll want to obtain the marker PDF/SVG or generate the markers from the project’s reference generator, then print them at true size.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this link was already in the page I mentioned in the guide, I didn't provide it exclusively. But sure, it's better this way.

Follow-up question: is it better to delete the links for the STag project repository and the STag project repository for ROS ? Or keep them and only add the google drive link?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I didn't see that the repo links the drive as well. I think the repo can still be linked, but also see my comment below because the two links go to the same repository. So essentially we probably end up with two links, the drive and the repo

Comment thread docs/core/examples/guides/fiducial-markers.md Outdated
Comment thread docs/core/examples/guides/fiducial-markers.md Outdated
- **Marker selection**: The name(s) of the marker(s) that we intend to be recognized. If any of these markers enters the camera frame, the `is_any_selected_marker_detected` predicate is set to **True**. This name should always be prepended with the value of `Prefix`.
- **Marker size**: Determins the side length of a square that specifies the marker in meters.
- **Library**: This is the ID number of the HD library utilized by STag markers. The allowed numbers are `[11, 13, 15, 17, 19, 21, 23]`.
- **Error correction**:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still missing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that there are no upper and lower limits defined for it. If the number is out of an (unspecified) range, the component doesn't work.
I left it out on purpose to get to this issue. (But forgot to put a comment for it. Sorry)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to figure out what the limits are then. Like that we can also provide more insight what that parameter actually does.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lower limit in the code is 0, and the upper bound comes from the upstream STag library, in which the rule is:
0 ≤ errorCorrection ≤ (libraryHD - 1) / 2

With the default library value of 15, the maximum valid error correction is 7.

There’s one mismatch though. In the file
aica-technology/dynamic components/source/core_vision_components/extension_descriptions/core_vision_components_pose_detection_stag_bundle_registration.yaml

and the file:

aica-technology/dynamic-components/source/core_vision_components/extension_descriptions/core_vision_components_pose_detection_stag_detector.yaml

a minimum of 1 is indicated, while the code accepts 0.

- display_name: Error correction
parameter_name: error_correction
description: The error correction tolerance. Lower values are strict, higher values are more permissive
default_value: 7
parameter_type: int
validation:
range:
minimum: 1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 ≤ errorCorrection ≤ (libraryHD - 1) / 2 ah that is a shame that the error bounds depend on the library selection.. This is something we can't validate easily in Studio directly.

You could then open a PR on the relevant description files to set the minimum to 0 and also to set the maximum to (23 - 1) / 2 = 11. You could even improve the component implementation such that a detail ROS log is spit out when the error correction is too high for the given library.

Comment thread docs/core/examples/guides/hand-eye-calibration.md
Comment thread docs/core/examples/guides/hand-eye-calibration.md Outdated
Comment thread docs/core/examples/guides/hand-eye-calibration.md Outdated
Comment thread docs/core/examples/guides/hand-eye-calibration.md Outdated
Comment thread docs/core/examples/guides/hand-eye-calibration.md Outdated
Comment thread docs/core/examples/guides/hand-eye-calibration.md Outdated
Comment thread docs/core/examples/guides/hand-eye-calibration.md Outdated
Comment thread docs/core/examples/guides/hand-eye-calibration.md
Comment thread docs/core/examples/guides/hand-eye-calibration.md
Comment on lines +253 to +254
2. Publish the transformation with a FrameBroadcaster manually.
3. Using the calibration file path directly as a `Frame Broadcaster` component parameter to publish the transformations.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could show how to do that here, I am not sure it's described elsewhere.

Copy link
Copy Markdown
Member

@domire8 domire8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also apply the formatting by the "prettier" extension? It's possible that you also have to adjust the print width setting for the extension to be 120

Image

Comment thread docs/core/examples/guides/fiducial-markers.md Outdated
Copy link
Copy Markdown
Contributor Author

@MithraGhlm MithraGhlm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upper and Lower limits for Error_correction of STag Detector

Comment thread docs/core/examples/guides/fiducial-markers.md Outdated

If possible, print on a rigid and flat sheet of paper to reduce warping, since fiducial detection is sensitive to distortion. As another solution, you can fix the printed marker on a rigid surface, such as a piece of wood or cardboard.

After printing, measure the marker’s outer dimensions and compare them with the intended size from the generator. This matters because calibration will be wrong if the marker size in the software does not match the physical print.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second phrase sounds a bit like the print absolutely has to be perfect in order for the rest to work. It's subtle but maybe I would go for something like this:

After printing, measure the marker's outer dimensions since those might still be different from the desired ones. The true physical size will be required below to ensure that the calibration is precise.

Comment thread docs/core/examples/guides/fiducial-markers.md Outdated
Comment thread docs/core/examples/guides/fiducial-markers.md Outdated
Comment thread docs/core/examples/guides/fiducial-markers.md Outdated
Comment thread docs/core/examples/guides/fiducial-markers.md Outdated
Comment thread docs/core/examples/guides/fiducial-markers.md Outdated
- **Marker selection**: The name(s) of the marker(s) that we intend to be recognized. If any of these markers enters the camera frame, the `is_any_selected_marker_detected` predicate is set to **True**. This name should always be prepended with the value of `Prefix`.
- **Marker size**: Determins the side length of a square that specifies the marker in meters.
- **Library**: This is the ID number of the HD library utilized by STag markers. The allowed numbers are `[11, 13, 15, 17, 19, 21, 23]`.
- **Error correction**:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 ≤ errorCorrection ≤ (libraryHD - 1) / 2 ah that is a shame that the error bounds depend on the library selection.. This is something we can't validate easily in Studio directly.

You could then open a PR on the relevant description files to set the minimum to 0 and also to set the maximum to (23 - 1) / 2 = 11. You could even improve the component implementation such that a detail ROS log is spit out when the error correction is too high for the given library.

MithraGhlm and others added 2 commits May 18, 2026 10:44
Co-authored-by: Dominic Reber <71256590+domire8@users.noreply.github.com>
Copy link
Copy Markdown
Member

@domire8 domire8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this is really coming together nicely. As we enter the final stages, could you now please try to format the file fiducial-markers.md?


- **Is a marker bundle detected**: If a registered group of markers is detected by the camera, this parameter will be set to **True**. Otherwise it will remain **False**.

After setting up the proper parameters for Camera Streamer and STag Detector:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be in it's own section "Running the application" or something like that and we should attach the YAML content too

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

Successfully merging this pull request may close these issues.

3 participants