Open YBachmann opened 3 months ago
Hello @clalancette ,
could you please take a look at this PR?
I attached a small video showing a comparison of the current state of using the minimum value in each column (orange) and my proposed approach of using quantiles/percentiles (purple). In this test a scan_height
of 180 pixels
was used and for my version a quantile_value
of 0.35
.
In my opinion using a quantile instead of the minimum of a row greatly reduces noise and more accurately reflects the position of obstacles/walls.
It is also easily adjustable. If you have very little noise or want to detect small objects that might only take up a couple pixels in each row, you can set the quantile_value
parameter to a small numer (or even to 0.0
to retain the current behavior). If you want smooth and accurate laserscans and only care about larger objects you can set the value to something bigger.
depthimage_to_laserscan_quantile_comparison.webm
Hello @clalancette , as some time passed, I just wanted to check in if you had any chance to take a look at this PR? If not, are there maybe other maintainers that you could refer this to? Or is this functionality just not wanted? In any case, I would be happy for a response. Kind regards, Yannic
Currently the minimum value of each column in the depthimage was used to calculate the distance values.
When dealing with noisy data it is benefitial to use e.g. the 10% quantile instead of the minimum value. This way we still get accurate data but ignore noise/outliers.
The parameter
quantile_value
controls which quantile should be used.0.0
will have the effect of using the minimum value of each column (the current behavior and default value).0.5
will use the median of each column.quantile_value
of around0.1
. This way a lot of noise/outliers was removed, but the laserscan data still contained obstacles, even if they only covered a small part (>10%) of thescan_height
.