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

Process scan if enough time has elapsed since the previous one #11

Merged

Conversation

spmaniato
Copy link
Contributor

@spmaniato spmaniato commented Aug 16, 2016

This PR is tied to ros-perception/slam_karto#11 ⚠️

Adds a new parameter, MinimumTimeInterval, which is similar in spirit to the existing MinimumTravelDistance and MinimumTravelHeading. It's also similar to GMapping's temporalUpdate parameter. The new parameter defaults to 3600 (seconds), which effectively disables it. (Instead, I can make it such that negative values disable it, like in GMapping.)

From the header file documentation:

Sets the minimum time between scans. If a new scan's time stamp is
longer than MinimumTimeInterval from the previously processed scan,
the mapper will use the data from the new scan. Otherwise, it will
discard the new scan if it also does not meet the minimum travel
distance and heading requirements. For performance reasons, it is
generally it is a good idea to only process scans if a reasonable
amount of time has passed. This parameter is particularly useful
when there is a need to process scans while the robot is stationary.
Default value is 3600 (seconds), effectively disabling this parameter.

Here are two quick videos demonstrating the usefulness of such as parameter when the robot is stationary but there is a need for processing laser scans:

Before (not very interesting and laser scans go to waste):

minimum_travel_distance:  0.30    # [m]
minimum_travel_heading:   0.50    # [rad]

Without the new parameter

After (Karto processes laser scans while the robot is stationary):

minimum_time_interval:    1.0     # [sec]
minimum_travel_distance:  0.30    # [m]
minimum_travel_heading:   0.50    # [rad]

With the new parameter

The function HasMovedEnough now also returns true if more than MinimumTimeInterval time has elapsed since the previously processed laser scan
@mikeferguson
Copy link
Member

Thanks for the contribution -- I'll merge the slam_karto changes after this has been released and made it's way through the buildfarm

@spmaniato spmaniato deleted the minimum_time_interval branch April 30, 2017 05:32
@spmaniato
Copy link
Contributor Author

I'll merge the slam_karto changes after this has been released and made it's way through the buildfarm

@mikeferguson Just a reminder that we need a release of open_karto in order to eventually merge ros-perception/slam_karto#11 No rush and thank you for your time 🙂

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

2 participants