From 746bb0b96fce5a66cbc897e283cb4d9232817f24 Mon Sep 17 00:00:00 2001
From: Oleksandr <maksymets.o@gmail.com>
Date: Thu, 29 Aug 2019 15:58:29 -0700
Subject: [PATCH] Changed Shortest Path Follower criteria to use geodesic
 distance. (#194)

* Changed Shortest Path Follower criteria to use geodesic distance
---
 habitat/tasks/nav/shortest_path_follower.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/habitat/tasks/nav/shortest_path_follower.py b/habitat/tasks/nav/shortest_path_follower.py
index 2d7b2f184..53f481dfe 100644
--- a/habitat/tasks/nav/shortest_path_follower.py
+++ b/habitat/tasks/nav/shortest_path_follower.py
@@ -69,7 +69,9 @@ class ShortestPathFollower:
         """Returns the next action along the shortest path.
         """
         if (
-            np.linalg.norm(goal_pos - self._sim.get_agent_state().position)
+            self._sim.geodesic_distance(
+                self._sim.get_agent_state().position, goal_pos
+            )
             <= self._goal_radius
         ):
             return self._get_return_value(SimulatorActions.STOP)
-- 
GitLab