Skip to content

Semi-Automatic Camera Calibration - #1707

Merged
knoellle merged 4 commits into
HULKs:mainfrom
paudar:scribble-widget
Jul 15, 2025
Merged

Semi-Automatic Camera Calibration#1707
knoellle merged 4 commits into
HULKs:mainfrom
paudar:scribble-widget

Conversation

@paudar

@paudar paudar commented Mar 13, 2025

Copy link
Copy Markdown
Contributor

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

Fixes #123

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
Comment thread etc/parameters/framework.json Outdated
Comment thread etc/parameters/default.json Outdated
Comment thread tools/twix/src/panels/image/overlays/line_test.rs Outdated
Comment thread tools/twix/src/panels/scribble_camera_calibration.rs Outdated
Comment thread tools/twix/src/twix_painter.rs
@knoellle knoellle self-assigned this Mar 28, 2025
Comment thread crates/types/src/field_dimensions.rs Outdated
Comment thread tools/twix/src/zoom_and_pan.rs
Comment thread tools/twix/Cargo.toml
Comment thread tools/twix/src/panels/camera_calibration/panel.rs
Comment thread tools/twix/src/panels/camera_calibration/panel.rs Outdated
Comment thread tools/twix/src/panels/camera_calibration/optimization.rs Outdated
Comment thread tools/twix/src/panels/camera_calibration/optimization.rs Outdated
Comment thread tools/twix/src/panels/camera_calibration/panel.rs Outdated
Comment thread tools/twix/src/panels/camera_calibration/panel.rs Outdated
Comment thread tools/twix/src/panels/camera_calibration/panel.rs Outdated
Comment thread tools/twix/src/main.rs Outdated
implement optimization in twix

add Calibration to recorded states

set recording frequencies

use explicit state enum

calibration in twix

--wip--

fix camera matrix calculator

impl reset

implement first iteration of ScribbleCalibrationPanel

second iteration of ScribbleCameraCalibration

add a single panel to work with optimization

add clear button for measurements and counter

improve ux by remove buttons

some qol

add save to head button

fix saving location

fix saving path

reset on save and allow to draw duplicate lines

remove unneeded files

resolve clippy remarks

fix popup wont close with click and some other smal changes

fix some review comments

fix optimize function

temp fix for fielddimensions default (add a todo - discussion is needed)

remove outdated todo

clear a vector instead of replacing it with a new one

make the member stroke a constant

improve drawing experience

revert changes to the default implementation of FieldDimensions

remove unused import

impl getter function for FieldDiemensions

can't use constant in Testmode

always compile constant SPL_2025
@schluis
schluis force-pushed the scribble-widget branch from 1fe622a to 1e954de Compare July 6, 2025 15:54
knoellle
knoellle previously approved these changes Jul 7, 2025

@knoellle knoellle left a comment

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.

LGTM

@paudar
paudar added this pull request to the merge queue Jul 7, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jul 7, 2025
@knoellle
knoellle added this pull request to the merge queue Jul 15, 2025
Merged via the queue into HULKs:main with commit 6f08035 Jul 15, 2025
27 checks passed
@github-project-automation github-project-automation Bot moved this from Request for Review to Done in Development Jul 15, 2025
Franziska-Sophie pushed a commit to schmidma/hulk that referenced this pull request Jul 16, 2025
* implement line fitting

implement optimization in twix

add Calibration to recorded states

set recording frequencies

use explicit state enum

calibration in twix

--wip--

fix camera matrix calculator

impl reset

implement first iteration of ScribbleCalibrationPanel

second iteration of ScribbleCameraCalibration

add a single panel to work with optimization

add clear button for measurements and counter

improve ux by remove buttons

some qol

add save to head button

fix saving location

fix saving path

reset on save and allow to draw duplicate lines

remove unneeded files

resolve clippy remarks

fix popup wont close with click and some other smal changes

fix some review comments

fix optimize function

temp fix for fielddimensions default (add a todo - discussion is needed)

remove outdated todo

clear a vector instead of replacing it with a new one

make the member stroke a constant

improve drawing experience

revert changes to the default implementation of FieldDimensions

remove unused import

impl getter function for FieldDiemensions

can't use constant in Testmode

always compile constant SPL_2025

* clippy

---------

Co-authored-by: okiwi6 <45100017+oleflb@users.noreply.github.com>
Co-authored-by: schluis <luis.scheuch@posteo.de>
Co-authored-by: knoellle <33729490+knoellle@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Manual calibration bonus: Click on rendered image to set parameters

4 participants