allenai / allenact

An open source framework for research in Embodied-AI from AI2.
https://www.allenact.org
Other
313 stars 50 forks source link

Agent could not find a path in ObjectNav iThor #300

Closed qiwu57kevin closed 3 years ago

qiwu57kevin commented 3 years ago

Problem

When I was trying to run this experiment projects/objectnav_baselines/experiments/ithor/objectnav_ithor_rgbd_resnetgru_ddppo.py, I saw there is a warning "could not find a path from ... to ..." for some starting points in some scenes. However, when I check the start and end points where the error message happens in ai2thor, there is a a path between those points. I will put some example error messages here.

[07/20 04:26:57 WARNING:] In scene FloorPlan4, could not find a path from {'x': -2.25, 'y': 0.9009998440742493, 'z': 1.5} to Toaster with 3.2 error tolerance. Returning a distance of -1. [robothor_environment.py: 171]

[07/20 04:25:44 WARNING:] In scene FloorPlan306, could not find a path from {'x': 1.618888020515442, 'y': 0.9009996056556702, 'z': 0.2181786447763443} to Book with 3.2 error tolerance. Returning a distance of -1. [robothor_environment.py: 171]

Is this normal or a bug in the datasets? How should I suppress this warning?

Steps to reproduce

Just simply run this from the command line: python3 main.py projects/objectnav_baselines/experiments/ithor/objectnav_ithor_rgbd_resnetgru_ddppo.py -o storage/object_ithor_rgbd_resnetgru_ddppo -s 12345 \

Expected behavior

I expect that there is no such warning during training since the dataset should have valid paths.

Desktop

Please add the following information:

Lucaweihs commented 3 years ago

Hi @KevinWu57,

To be able to compute shortest paths we rely on there being a valid navmesh throughout the scene in the AI2-THOR build. Because this navmesh was manually created by the AI2-THOR team, there are some instances in various scenes where no navmesh was placed but the agent can still reach. The random agent from the beginning of training is surprisingly good at finding these locations and producing the warning message you're seeing: you'll find that, as the agent trains, it will visit these "weird" locations less frequently as they're rarely useful locations to be.

When the agent is in one of these locations, all that really happens is that we can't compute a particular component of the reward (as we use the change in shortest path difference to compute this component) and we instead return 0 for that component. In practice I haven't found this to have any meaningful consequences on training as these instances are fairly rare (there may seem to be a lot of warnings but the agent is taking many more steps). I have previously considered suppressing this warning but thought it was more "honest" to display it. If it's annoying to you, you should feel free to comment out the line that produces the warning without undo worry.

qiwu57kevin commented 3 years ago

Hi @Lucaweihs ,

Thank you for your response! It is good to know that this is actually not a big issue and those episodes with warnings take only a very small part. After training with some time, I find it sill produces a good result regardless of those warnings. I will simply comment out the lines to suppress those messages.