docs: Hand-Eye calibration guide #479#482
Conversation
…iny correction to Camera Streamer.
SprGrf
left a comment
There was a problem hiding this comment.
Thanks! First quick review:
bec2ef4 to
0613b51
Compare
|
@SprGrf Thanks |
|
Should there be a stand alone guide to introduce the |
SprGrf
left a comment
There was a problem hiding this comment.
Nice! The backbone is here, some first comments I had while reading:
Co-authored-by: Spyros Garyfallidis <spyros@aica.tech>
Co-authored-by: Spyros Garyfallidis <spyros@aica.tech>
Co-authored-by: Spyros Garyfallidis <spyros@aica.tech>
Co-authored-by: Dominic Reber <71256590+domire8@users.noreply.github.com>
Co-authored-by: Dominic Reber <71256590+domire8@users.noreply.github.com>
…nent Co-authored-by: Dominic Reber <71256590+domire8@users.noreply.github.com>
|
|
||
| - **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. |
There was a problem hiding this comment.
Public google drive where the markers can be downloaded
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
| - **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**: |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
| 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. |
There was a problem hiding this comment.
I think we could show how to do that here, I am not sure it's described elsewhere.
Co-authored-by: Spyros Garyfallidis <spyros@aica.tech>
MithraGhlm
left a comment
There was a problem hiding this comment.
Upper and Lower limits for Error_correction of STag Detector
|
|
||
| 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. |
There was a problem hiding this comment.
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.
| - **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**: |
There was a problem hiding this comment.
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.
Co-authored-by: Dominic Reber <71256590+domire8@users.noreply.github.com>
…finition enhancements.
domire8
left a comment
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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

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