image_pipeline icon indicating copy to clipboard operation
image_pipeline copied to clipboard

Stereo calibration not detecting all charuco markers properly

Open vixp24 opened this issue 1 year ago • 1 comments
trafficstars

Hi there,

I am trying to get stereo calibration running with the cameracalibrator node. While running the tool, I get only partial aruco marker detections while some marker detections look wrong. Has anyone seen anything this like, or have any pointers on what could be wrong? I have tried rolling and humble branches, both with the same issue.

I have successfully done chessboard calibration with the same tool, and am only getting this issue with the charuco pattern. I have also tried a differenct charuco boards (5x5 dict, but same size), and I get the same result.

Here is my command: ros2 run camera_calibration cameracalibrator --no-service-check --pattern='charuco' --size 8x11 --square 0.022 --charuco_marker_size=0.016 --aruco_dict='4x4_100' --approximate=0.01 --ros-args --remap right:=/right/image_raw --remap left:=/left/image_raw --remap left_camera:=/left --remap right_camera:=/right

Screenshot from 2024-08-23 11-03-47

It is my first time attempting charuco calibration, so any help is appreciated!

Thank you

vixp24 avatar Aug 23 '24 15:08 vixp24

Changed the command to use --size 12x9 instead, and the detection looks much better now. The colours on a given row are not all the same however, and there is always one strand left - does this matter? Screenshot from 2024-08-23 14-56-12

Sounds like there may be a mixup with the row & column parsing from the size parameter. When I use the "chessboard" type for the same checkerboard size, I used --size 8x11 and it looks normal like below: Screenshot from 2024-08-23 14-59-43

At the very least, maybe the size parameter help documentation should be updated to indicate this?

Thanks!

vixp24 avatar Aug 23 '24 19:08 vixp24

I faced the same issue on ROS 2 Humble. Even after trying different ways to specify rows and columns it still was giving me weird visualizations.

I dug into the code a bit and found that until https://github.com/ros-perception/image_pipeline/pull/976, charuco boards were not supported at all when calibrating stereo cameras. It raised an error before that PR. See the diff: https://github.com/ros-perception/image_pipeline/commit/efb9005a5ca45f4ceb7563fc01d7e33d6f39214d#diff-9160dabba1c44b7549f06e88872f7d85bed822d7b5ea5841df88d412f38c6ed1L1156

I wanted to use a charuco board to get better edge coverage through partial views. Turns out that even on the latest code, that doesn't work. This comment states that samples are only added if the whole board is in view of both cameras.

davidtvs avatar Nov 13 '25 10:11 davidtvs