Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore readings less than the sensor's minimum range #9

Merged

Conversation

spmaniato
Copy link
Contributor

@spmaniato spmaniato commented Apr 21, 2016

If a LaserScan message contains range readings that are below the sensor's minimum range, Karto will still use them for mapping purposes, resulting in situations like the one in the screenshot below, where the red arrow is the robot's initial pose, [0 0 0] More details on this issue can be found here: http://answers.ros.org/question/232523

screen shot 2016-04-21 at 10 40 48 am

Even though Karto does have filtering capabilities:

inline const PointVectorDouble& GetPointReadings(kt_bool wantFiltered = false) const

they are not used. All calls to GetPointReadings are without wantFiltered = true. So, one way to address the issue would be to do pScan->GetPointReadings(true) in the function AddScan. However, since there's already some filtering logic in AddScan, I just added another condition to the if statement. (There is a slight difference between the two solutions. I went with the one that, imo, will have minimal side effects.)

@mikeferguson
Copy link
Member

LGTM -- I'll leave open for a few days for any other comments and then merge

@jonbinney
Copy link

Makes sense; in the LaserScan message it says "# range data [m] (Note: values < range_min or > range_max should be discarded"

@mgruhler
Copy link

great catch. Was already starting to wonder if my config is bad ;-)

@mikeferguson mikeferguson merged commit ed4c9c1 into ros-perception:indigo-devel Apr 23, 2016
@spmaniato spmaniato deleted the ignore_min_readings branch April 23, 2016 20:43
@EndlessLoops
Copy link

I met same the problem .

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

Successfully merging this pull request may close these issues.

None yet

5 participants