Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Solution
Created a node called
apriltag_ros_tag_bundle_calibration_node
that consumes a remap-able~tag_detections
feed until it reachesmax_detections
. You can set the master tag with parammaster_tag_id
. It then averages the observed transforms to the master tag id over the duration of the observations and writes the generated config file toconfig_file_path
. We average the transforms' quats usingtf2::Quaternion::slerp()
which seems to perform adequately.Open questions
slerp()
to the home-brewed quat averaging solution)Successive Work
Demo
In the attached demo, we run a tag detector on a 3 x 3 tag grid with tag sizes 3cm and spacing between tags 4.5cm center to center along x and y. Camera is running at 15hz 720p rectified. 500 max detections. Would likely get better results at a higher resolution and higher max detections. This demo had largest errors on the z axis (max error was 7mm for tag 8) Whereas x and y errors were all sub mm. I will likely do some more testing with more detections and higher resolution (and flatter targets i.e not tags taped to the wall).
tag_bundle_calib_rosnode_demo-2023-04-21_09.51.16.mp4