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

Inconsistent behavior for update rate between stvl and navigation2/nav2_costmap_2d #307

Closed
sjusner opened this issue Nov 28, 2024 · 1 comment · Fixed by #308
Closed

Comments

@sjusner
Copy link
Contributor

sjusner commented Nov 28, 2024

When comparing the behavior of the stvl and the nav2 obstacle layer some differences in behavior emerged during troubleshooting an issue. In the obstacle_layer (more precisely the used observation buffer) stale observations get purged when they are older than the specified observation_keep_time_ (set via the observation_persistence parameter) compared to `clock_->now() here. For the stvl, this is compared to the last update time here.

This leads to inconsistent behavior when sensor data is suddenly dropping out.

  • For the obstacle_layer, the observations get removed from the buffer after the set time as would be expected.
  • The stvl keeps observations past the set observation_persistence as stale buffer entries get only removed when new observations are coming in (due to the update of last_updated_).

I suggest to replace the stale check in the stvl to compare with the current time instead of the last_updated_. Further, as commented in this issue, the update of last_updated in the reset function seems misplaced, and interferes with the expected_update_rate calculation.

Any thoughts on this?

@SteveMacenski
Copy link
Owner

compared to `clock_->now() here. For the stvl, this is compared to the last update time here.

I checked some of the older git commits and it looks like the behavior in Nav2 was updated but STVL wasn't updated with it. This used to be how Nav2's / ROS Navigation's observation buffer handled it.

Here's the PR that made the change in Nav2 ros-navigation/navigation2#1872

Id support that update. Can you open the PR?

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 a pull request may close this issue.

2 participants