Skip to content

Semi-Automatic Camera Calibration #1707

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

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

Conversation

paudar
Copy link
Contributor

@paudar paudar commented Mar 13, 2025

Why? What?

Implement a new Twix-Panel for semi-automatic camera calibration.
Workflow:

  • Start calibration mode of the nao
  • move the head in desired position
  • use the new panel to draw the field-lines
    • primary click to set the start point of a line
    • primary click to set the end point of a line
    • a pop-up appears to select the drawn line (goal-line, penalty-front, penalty-left, ...)
  • repeat the process for at least two lines (in best case for all visual lines)
  • A keypoint of a line can be moved by clicking it again
  • while moving a line, pressing esc removes it
  • if you are satisfied, click "next"
    • all lines are saved with den current camera_matrix and the lines disappear
    • an optimizer is called and provides the new calibration
    • in an image panel the overlay "penalty boxes" can provide a base to judge how well the calibration already is
  • move the head in a new position and repeat the process

Ideas for Next Iterations (Not This PR)

  • rotate the text label of a line with the line
  • impl navigation with arrow keys in the pop-up
  • be able to accept detected lines
  • don't rely on ground-to-field

How to Test

Take a nao and try to follow the workflow described above.

@github-project-automation github-project-automation bot moved this to Request for Review in Development Mar 13, 2025
@knoellle knoellle self-assigned this Mar 28, 2025
@@ -34,6 +26,28 @@ pub struct FieldDimensions {
pub goal_depth: f32,
}

impl Default for FieldDimensions {
Copy link
Contributor

Choose a reason for hiding this comment

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

This may be good for your test, but I'm not sure we want this.
People may be tempted to use this default instead of acquiring the actual values from the configuration file.
What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

added #[cfg(test)] since that's what I need it for. What do you think of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now we can't definde the default for SimulatorFieldDimensions, that is used some times in the bevyhavior simulator.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was arguing for keeping the derived Default impl which just fills all the values with 0.
It may still be misused this way, but its much more likely to be noticed than if the implementation returns the standard SPL field dimensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Request for Review
Development

Successfully merging this pull request may close these issues.

3 participants