Skip to content

Commit

Permalink
Fix avoidance dirty flag regression
Browse files Browse the repository at this point in the history
The dirty flag can also still be set by some legacy functions triggered by the agents and obstacles.
  • Loading branch information
smix8 committed Dec 6, 2024
1 parent eb51030 commit 4de615d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/navigation/nav_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,14 +948,18 @@ void NavMap::_sync_dirty_map_update_requests() {

void NavMap::_sync_dirty_avoidance_update_requests() {
// Sync NavAgents.
agents_dirty = sync_dirty_requests.agents.first();
if (!agents_dirty) {
agents_dirty = sync_dirty_requests.agents.first();
}
for (SelfList<NavAgent> *element = sync_dirty_requests.agents.first(); element; element = element->next()) {
element->self()->sync();
}
sync_dirty_requests.agents.clear();

// Sync NavObstacles.
obstacles_dirty = sync_dirty_requests.obstacles.first();
if (!obstacles_dirty) {
obstacles_dirty = sync_dirty_requests.obstacles.first();
}
for (SelfList<NavObstacle> *element = sync_dirty_requests.obstacles.first(); element; element = element->next()) {
element->self()->sync();
}
Expand Down

0 comments on commit 4de615d

Please sign in to comment.