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

feat: Clearing expired cells after timeout #102

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Conversation

renan028
Copy link
Member

@renan028 renan028 commented Oct 21, 2024

Description

AB#22914
In obstacle layer, adding logic to clear cells if they are not scanned after some time.

Costmap has a persistent logic, thus each cells' costs remain the same until new scan pass through it or "hit" an obstacle on it.
I am adding an option to clear the cell after some "expiration" time, i.e., if the cell cost does not change after a while (cell_clearing_timeout), we change it back to NO_INFORMATION.

cell_clearing-2024-10-21_11.59.34.mp4

@renan028 renan028 requested review from corot and tomin11 October 21, 2024 03:07
Copy link
Collaborator

@corot corot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we creating a Timer for each cell? Sounds rather overkilling
What's the impact in performance?
And why not using STVL instead?

@renan028
Copy link
Member Author

renan028 commented Oct 28, 2024

Are we creating a Timer for each cell? Sounds rather overkilling What's the impact in performance? And why not using STVL instead?

It is a ros::Time for each cell, not ros::Timer
ros::Time is not overkill, it has 4 bytes (sec) + 4 bytes (nsec), thus same as double.

What's the impact in performance?

If the logic is not used (value -1), the impact is zero because it exits instantly.
I will investigate the impact when the feature is on.

And why not using STVL instead?

STVL has the same logic with OpenVDB, each voxel has a timestamp, but it is double.
I think it is overkill to use STVL, since it introduces the whole OpenVDB (tree) complexity and conversions, which we don't need. Besides, it does not have the Raytrace logic outside the map, which we added in the obstacle layer as an option, so we cannot use it.
I think we could either keep it as a parameter here, or create a new costmap layer with the new logic of cell decay.

Base automatically changed from rs/fix_floating to devel October 28, 2024 00:52
@renan028 renan028 force-pushed the rs/cell_clearing_timeout branch from c0c53ef to c0a52eb Compare October 31, 2024 00:32
@renan028 renan028 requested a review from corot October 31, 2024 00:32
@renan028 renan028 force-pushed the rs/cell_clearing_timeout branch from ef2cef0 to b3af20b Compare October 31, 2024 00:37
@renan028 renan028 merged commit dca95ff into devel Nov 5, 2024
1 check passed
@renan028 renan028 deleted the rs/cell_clearing_timeout branch November 5, 2024 05:35
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.

3 participants