Skip to content

Commit 2c7519b

Browse files
authored
Updated same floor check and hasattr condition (#1032)
1 parent 4eb48bb commit 2c7519b

File tree

1 file changed

+2
-2
lines changed
  • habitat-lab/habitat/tasks/nav

1 file changed

+2
-2
lines changed

habitat-lab/habitat/tasks/nav/nav.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ def _is_on_same_floor(
849849
):
850850
if ref_floor_height is None:
851851
ref_floor_height = self._sim.get_agent(0).state.position[1]
852-
return ref_floor_height < height < ref_floor_height + ceiling_height
852+
return ref_floor_height <= height < ref_floor_height + ceiling_height
853853

854854
def reset_metric(self, episode, *args: Any, **kwargs: Any):
855855
self._step_count = 0
@@ -866,7 +866,7 @@ def reset_metric(self, episode, *args: Any, **kwargs: Any):
866866

867867
self.update_fog_of_war_mask(np.array([a_x, a_y]))
868868

869-
if hasattr(episode, "goal"):
869+
if hasattr(episode, "goals"):
870870
# draw source and target parts last to avoid overlap
871871
self._draw_goals_view_points(episode)
872872
self._draw_goals_aabb(episode)

0 commit comments

Comments
 (0)