Open dylan-gonzalez opened 7 months ago
when using rectified images, make sure to set image_is_rectified
parameter to true
. I forgot to add this parameter to example config. Let me know if it fixes the accuraccy.
Ah I have already set that parameter
Is the offset from the actual position stable? Are the axes properly aligned with the marker on /aruco_tracker/debug
images?
The offset is stable. z-axis:
x-axis:
y-axis:
The axes seem aligned .
How are you estimating the error?
Could you try opening RViz, adding TF
display and Camera
display (for the rectified images) and checking if the axes are correctly overlayed on the camera images?
I am estimating the error by measuring with a tape measure the ground truth, and then looking at the output of /aruco_opencv/aruco_detections (the z-axis mainly for now)
In this example, it is off by 10cm. It is reporting 1.26-1.29m when it is actually 1.18m The axes look to be correctly overlayed.
Also the camera appears to be perfectly level horizontally:
It also does not seem to make a difference if I use rectified or un-rectified images.
I also noticed that zed_aruco_localization have a refine parameter that I think uses the corners of the marker to improve detection. I noticed that when I turn this parameter off, I get pretty much the same result as ros_aruco_opencv, and when it is turned on I get an error of only ~3cm.
Ah, I have found that setting this parameter to "1" (for subpixel mode) makes it accurate for my example to ~1.5cm !
But for distances at around 2m, I am now getting ~10cm error. But increasing the resolution to 1080 reduces the error back to ~2cm. So I guess it is more or less fine tuning parameters.
Edit: looks like I might have misspoke. I didn't realise that but markers are 0.15m, not 0.16m (could have sworn I printed them out as such). Pose estimation is relatively accurate at a distance of around 1m, but drops off significantly approaching 2m.
Ah, I have found that setting this parameter to "1" (for subpixel mode) makes it accurate for my example to ~1.5cm !
That's interesting! I used the contour corner refinement as it resulted in more stable positions and was (I think) faster. I never actually measured the pose accuracy though. If you are using subpixel refinement, you can also experiment with cornerRefinementWinSize
, cornerRefinementMaxIterations
and cornerRefinementMinAccuracy
parameters as they are applicable in this case.
But for distances at around 2m, I am now getting ~10cm error. But increasing the resolution to 1080 reduces the error back to ~2cm. So I guess it is more or less fine tuning parameters.
This package just passes the images and detection parameters to OpenCV library that's installed on the system, so I don't have much influence on the algorithms it uses. Though, with enough feedback, I might come up with better default detection parameters.
Hi there,
I have tried using your library on the humble branch, but it appears to be inaccurate by about 20cm.
I am using a ZED2i camera, and giving the rectified image of the right camera lens as input. FYI when I use the zed_aruco_localization example package, it gives detections with +- 1cm error.
Is there something I should tune?
I am using 6X6_50 dictionary.