lardemua / atom

Calibration tools for multi-sensor, multi-modal robotic systems
GNU General Public License v3.0
247 stars 27 forks source link

Chessboard is drawn in the wrong side of the board? #137

Closed miguelriemoliveira closed 4 years ago

miguelriemoliveira commented 4 years ago

Hi @eupedrosa ,

I think the chessboard is being draw on the wrong side of the board.

If I run this

roslaunch interactive_calibration eye_calibration_view_optimization.launch

and then this

./test/general_hand_eye/general_hand_eye.py -si -rv -json ~/datasets/eye_to_base/data_collected.json -i -csf "lambda x: int(x)%4==0"

I get an image like this:

Screenshot at 2020-04-18 20-36-28

Can you help?

eupedrosa commented 4 years ago

It is not a bug it is a feature.

The chessboard is being drawn with correct side. The chessboard detector uses a left-hand axis but we assume to be a right-hand axis. This results in a mirror effect when drawing the chessboard. The charuco detectors uses a right-hand axis, therefore, optimizations with that type chessboard results in a correct draw. Did you understand the bug?

miguelriemoliveira commented 4 years ago

Hum, not sure I understood fully why this happens, but can't we do something to change it? I mean, the reviewer will just say, "why is the camera is on the wrong side of the charuco", won't he?

eupedrosa commented 4 years ago

Hum, not sure I understood fully why this happens, but can't we do something to change it? I mean, the reviewer will just say, "why is the camera is on the wrong side of the charuco", won't he?

We can always argue that we model has the pattern drawn in both sides.

But, do you really need me to "fix" this?

miguelriemoliveira commented 4 years ago

Yes but that way there are some perspectives which we cannot show, because they show an empty board.

I can try to see if i can solve it with a flag which we use just to get nice drawings...

On Sat, Apr 18, 2020, 21:35 Eurico F. Pedrosa notifications@github.com wrote:

Hum, not sure I understood fully why this happens, but can't we do something to change it? I mean, the reviewer will just say, "why is the camera is on the wrong side of the charuco", won't he?

We can always argue that we model has the pattern drawn in both sides.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lardemua/AtlasCarCalibration/issues/137#issuecomment-615943237, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWTHVUVSSX5FGXIPOGROSLRNIFJJANCNFSM4MLPKEQQ .

miguelriemoliveira commented 4 years ago

That's strange ... for the eye in hand the charuco seems to be drawn on the correct side

image

image

the image from the other post is from the eye-to-base ...

eupedrosa commented 4 years ago

That's strange ... for the eye in hand the charuco seems to be drawn on the correct side

I guess you did not read my reply in full.. ;)

the charuco detectors uses a right-hand axis, therefore, optimizations with that type chessboard results in a correct draw.

Yes, the charuco draws on the correct side. The chessboard has its origin in the top left side, while the charuco has its origin in the top bottom side. Check how the axis are drawn with TF in RVIZ.

miguelriemoliveira commented 4 years ago

Hi @eupedrosa ,

Sorry, I am still confused. I get it that we are using a different convention form the aruco detector, and that that mirrors the pattern.

But why the difference between both use cases? They both have charucos ...

Thanks, Miguel

miguelriemoliveira commented 4 years ago

Got it (finally :) )... they are both using charuco patterns but in the eye-to-base case you are using a chessboard detector ... here's the config.json

(...)
  "calibration_pattern" : {
        "link": "chessboard_link",
        "parent_link": "ee_link",
        "origin": [0.0, 0.0, 0.0, 1.5, 0.0, 0.0],
        "fixed": true,
        "pattern_type": "chessboard",
        "border_size": 0.5,
        "dimension": {"x": 9, "y": 7},
        "size": 0.019,
        "inner_size": 0.014
    }

while in the eye-on-hand you use a charuco detector

  "calibration_pattern" : {
        "link": "chessboard_link",
        "parent_link": "base_link",
        "origin": [-0.37, 0.0, 0.0, 0, 0.0, 3.8],
        "fixed": true,
        "pattern_type": "charuco",
        "border_size": 0.5,
        "dimension": {"x": 13, "y": 8},
        "size": 0.02,
        "inner_size": 0.015
    }

but why on earth do you not use a charuco detector in the eye-to-base use case?

eupedrosa commented 4 years ago

but why on earth do you not use a charuco detector in the eye-to-base use case?

Check the dataset images and verify that it uses charuco. If is uses a charuco we should change the detector.

miguelriemoliveira commented 4 years ago

Yes, it does, check new fig 3 of the paper (the first fig I posted in this issue). That was why I was getting confused ... I will change it. Thanks

miguelriemoliveira commented 4 years ago

Hi @eupedrosa , can you please change it instead of me?

I am not sure if I should also change the other parameters ...

I think this is the file we should change no?

interactive_calibration/calibrations/ur10e/eye_in_hand/config.json

and then we need to extract a new dataset from the bagfile, or replace the calibration_patter part in the data_collected.json file of the dataset ... you agree?

eupedrosa commented 4 years ago

Changing the calibration pattern in data_collecte.json changes nothing. I may have to send you the datasets that I am using for the paper. We have a lot of datasets and we may not be in sync.

miguelriemoliveira commented 4 years ago

yes, please send me what you are using. We should be synced.

Thanks, Miguel

On Sun, 19 Apr 2020 at 13:21, Eurico F. Pedrosa notifications@github.com wrote:

Changing the calibration pattern in data_collecte.json changes nothing. I may have to send you the datasets that I am using for the paper. We have a lot of datasets and we may not be in sync.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/lardemua/AtlasCarCalibration/issues/137#issuecomment-616120413, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWTHVVN43YRKQLPZSJONZLRNLUDPANCNFSM4MLPKEQQ .

miguelriemoliveira commented 4 years ago

Thanks, @eupedrosa .

Now everything is clear. Once we create new datasets we will also need to change

interactive_calibration/calibrations/ur10e/eye_in_hand/config.json