Skip to content

Commit

Permalink
Updated same floor check and hasattr condition (#1032)
Browse files Browse the repository at this point in the history
  • Loading branch information
mukulkhanna authored Dec 7, 2022
1 parent 4eb48bb commit 2c7519b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions habitat-lab/habitat/tasks/nav/nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ def _is_on_same_floor(
):
if ref_floor_height is None:
ref_floor_height = self._sim.get_agent(0).state.position[1]
return ref_floor_height < height < ref_floor_height + ceiling_height
return ref_floor_height <= height < ref_floor_height + ceiling_height

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

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

if hasattr(episode, "goal"):
if hasattr(episode, "goals"):
# draw source and target parts last to avoid overlap
self._draw_goals_view_points(episode)
self._draw_goals_aabb(episode)
Expand Down

0 comments on commit 2c7519b

Please sign in to comment.