Skip to content

Commit aa035bc

Browse files
committed
Merge pull request #108284 from dmlary/nav2d_obstacle-avoidance-enabled-fix
NavMap2D: check if obstacles have avoidance enabled
2 parents bb4763e + 780f3d5 commit aa035bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/navigation_2d/nav_map_2d.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,9 @@ void NavMap2D::_update_rvo_obstacles_tree() {
444444
// The following block is modified copy from RVO2D::AddObstacle()
445445
// Obstacles are linked and depend on all other obstacles.
446446
for (NavObstacle2D *obstacle : obstacles) {
447+
if (!obstacle->is_avoidance_enabled()) {
448+
continue;
449+
}
447450
const Vector2 &_obstacle_position = obstacle->get_position();
448451
const Vector<Vector2> &_obstacle_vertices = obstacle->get_vertices();
449452

0 commit comments

Comments
 (0)