-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix camera matrix correction method #1650
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not fully get your explanation. Why do you have to apply the correction differently now? Reading the test case it seems like you want the correction to be idempotent, is this what you are after?
correction_robot, | ||
); | ||
|
||
let corrected_varient = camera_matrix.to_corrected(correction_robot, correction_camera); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected_variant
I'm sorry for my bad explanation, the reasoning starts from how it is constructed by camera matrix calculator Vs how get_corrected is used. The parameters give the full amount of correction needed and camera matrix calculator applies it to the bead to camera matrix before building CameraMatrix. But there is no information about the correction nor the state before correction. In the current state, get_corrected means whatever additional offsets needed, not the absolute correction. So the calibration solver using this function also returns the relative values. What I want instead is to store the head to camera matrix before correction or less preferably the original correction value we added. |
Hmm I feel like the |
I just saw your reply, I was already thinking of how else we can do this and came to the same conclusion - have an uncalibrated camera matrix instance - since the camera matrix already contains a lot of information and I feel it is already overcomplicated. As you said, in an ideal world we only need the two main matrices but our needs and design choices made it harder. Perhaps we can reconsider this design and see what can we do about it (i.e. we have many 180° rotations with recent axis changes). I'll change the module and you can review again :) |
I also ran into this issue and fully understand your pain now :D I still think having an uncalibrated and a calibrated variant is the best solution to this problem. Did you implement something like this already? |
I partly did it but didn't finish it, but should be quite easy to do, so if
you or someone else have time please go ahead 😅.
…On Mon, 10 Mar 2025, 16:52 ole.flb, ***@***.***> wrote:
I also ran into this issue and fully understand your pain now :D I still
think having an uncalibrated and a calibrated variant is the best solution
to this problem. Did you implement something like this already?
—
Reply to this email directly, view it on GitHub
<#1650 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTOBXYWYWA57AHSTYBVLBL2TXURBAVCNFSM6AAAAABX3AOFB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMJRGY3DSOJSGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: oleflb]*oleflb* left a comment (HULKs/hulk#1650)
<#1650 (comment)>
I also ran into this issue and fully understand your pain now :D I still
think having an uncalibrated and a calibrated variant is the best solution
to this problem. Did you implement something like this already?
—
Reply to this email directly, view it on GitHub
<#1650 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTOBXYWYWA57AHSTYBVLBL2TXURBAVCNFSM6AAAAABX3AOFB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMJRGY3DSOJSGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This is implemented now in #1690. Please close if that PR suits your use case as well |
Oh neat, that's the alternative I wanted to implement. So all good 😋 |
Why? What?
The current implementation of
to_corrected()
applies the new correction on top of existing corrected values. Since this method is used in camera calibration, the parameters obtained by the solver also reflects this issue.Current state:
T = C_o * T_m
at construction (C_o from parameter file)T_n = C_n * T
when usingto_corrected()
C_t
will beC_o + C_n
C_o
, norT_m
are stored inCameraMatrix
, so I'll have to read from parameter files and re-calculate this which is wonky IMO.What we need:
T = C_o * T_m
at construction (C_o from parameter file)T_n = C_n * T_m
when usingto_corrected()
Changes:
T_m
so that corrections can always be done from that state. It is also verified by the added unit test.Fixes #
ToDo / Known Issues
Ideas for Next Iterations (Not This PR)
If there are some improvements that could be done in a next iteration, describe them here.
How to Test
Describe how to test your changes. (For the reviewer)