I got the error below when using Gibson-v2 Dataset in habitat to generate some datas,
Traceback (most recent call last):
File "test.py", line 78, in <module>
env.run()
File "/home/hello/pgp_eai/ANM/dataset/utils/dataset_env.py", line 149, in run
obs = self.reset()
File "/home/hello/pgp_eai/ANM/dataset/utils/dataset_env.py", line 63, in reset
obs = super().reset()
File "/home/hello/anaconda3/envs/eai/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/home/hello/pgp_eai/habitat-lab/habitat-lab/habitat/core/env.py", line 450, in reset
return self._env.reset()
File "/home/hello/pgp_eai/habitat-lab/habitat-lab/habitat/core/env.py", line 288, in reset
self._task.measurements.reset_measures(
File "/home/hello/pgp_eai/habitat-lab/habitat-lab/habitat/core/embodied_task.py", line 165, in reset_measures
measure.reset_metric(*args, **kwargs)
File "/home/hello/pgp_eai/habitat-lab/habitat-lab/habitat/tasks/nav/nav.py", line 598, in reset_metric
self.update_metric( # type:ignore
File "/home/hello/pgp_eai/habitat-lab/habitat-lab/habitat/tasks/nav/nav.py", line 628, in update_metric
self._start_end_episode_distance
ZeroDivisionError: float division by zero
I find this error is because the metric distance_to_target from the Measure class DistanceToGoal as below,
which is before obs = self.reset(), but the fact is that the above spl check is pass and got ZeroDivisionError in self._task.measurements.update_measures().
What's more I print the distance_to_goalin the beginning of an episode and find that there are so many distance_to_goal=inf.
So I am quite comfused, please git me some advice, now I can just ignore this error by pop the spl out,
I got the error below when using Gibson-v2 Dataset in habitat to generate some datas,
I find this error is because the metric
distance_to_target
from the Measure classDistanceToGoal
as below,so I try to prevent it before reset,so I added some code just as below, but I still meet the ZeroDivisionError mentioned above.
But if the
current_episode
is the same (I had checked the episode id), ZeroDivisionError might happen inwhich is before
obs = self.reset()
, but the fact is that the abovespl
check is pass and got ZeroDivisionError inself._task.measurements.update_measures()
. What's more I print thedistance_to_goal
in the beginning of an episode and find that there are so manydistance_to_goal=inf
.So I am quite comfused, please git me some advice, now I can just ignore this error by pop the
spl
out,