Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Add an option to filter scan by intensity #131

Closed
ManMan88 opened this issue Jun 17, 2021 · 4 comments
Closed

Add an option to filter scan by intensity #131

ManMan88 opened this issue Jun 17, 2021 · 4 comments

Comments

@ManMan88
Copy link

It would be great to add a feature which will enable to filter the scan by the intensity values, similar to the "min_intensities" parameter in the sick_safetyscanners package.

@michael1309
Copy link
Collaborator

Can you tell a little more about this requirement?
Are you talking about the Pointcloud2 message containing fewer messages in this case?
Specifically, should the values that are below the threshold then be removed?

Basically, the filter functionality by intensity, distance range, angle range, etc. can be performed in the application.

We also consider this to be the best procedure in principle, because in this case we can ensure that the Pointcloud2 values can be passed in a fixed structure (concretely: matrix structure), so that one can assume here with most lidars that a distance value is always measured at the same matrix position within this matrix always in the same spatial direction.

@ManMan88
Copy link
Author

ManMan88 commented Jun 27, 2021

I am talking about the /scan topic (LaserScan message). And yes, intensities below the threshold should be removed.
The way it works in the sick_safetyscanners package is that the data points which are below the threshold are filled with an invalid value (I don't remember if it is filled with inf, or nan or something else). Then the relevant packages which use this data would automatically ignore the those data points. This way the fixed structure of the LaserScan message is not being changed.

Yes, this is not necessary, the filter can be implemented in the application. However, it would be more convenient and efficient if it would be part of the driver.

@michael1309
Copy link
Collaborator

OK. We understand your point. We will integrate it as part of restructuring work over the next few weeks. After reviewing the documentation for sick_safetyscanners, these values should be set to infinity.

rostest added a commit that referenced this issue Jul 13, 2021
@rostest
Copy link
Collaborator

rostest commented Jul 13, 2021

Option min_intensity is added in the last release 1.11.0. If min_intensity > 0 and intensity < min_intensity, then the range is set to inf in LaserScan messages. Option min_intensity can be set in the launchfile.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants