Skip to content

Commit

Permalink
Allow collisions between walls in rooms and hallways (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass authored Nov 6, 2024
1 parent 2f40891 commit 58e06a1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pyrobosim/pyrobosim/core/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ def add_room(self, **room_config):
# Check if the room collides with any other rooms or hallways
is_valid_pose = True
for other_loc in self.rooms + self.hallways:
if room.external_collision_polygon.intersects(
other_loc.external_collision_polygon
):
if room.polygon.intersects(other_loc.external_collision_polygon):
is_valid_pose = False
break
if not is_valid_pose:
Expand Down Expand Up @@ -272,9 +270,7 @@ def add_hallway(self, **hallway_config):
for other_loc in self.rooms + self.hallways:
if (other_loc == hallway.room_start) or (other_loc == hallway.room_end):
continue
if hallway.external_collision_polygon.intersects(
other_loc.external_collision_polygon
):
if hallway.polygon.intersects(other_loc.external_collision_polygon):
is_valid_pose = False
break
if not is_valid_pose:
Expand Down

0 comments on commit 58e06a1

Please sign in to comment.