facebookresearch / habitat-challenge

Code for the habitat challenge
https://aihabitat.org
MIT License
309 stars 56 forks source link

Success and distance to goal #161

Open gianscarpe opened 1 year ago

gianscarpe commented 1 year ago

Hello! I noticed something weird regarding distance_to_goal sensor and success info. This is a trajectory. Step at time t:

Steps done: 12
Debugging info: success: 0.0
 Distance to goal = 0.9691110253334045
 Looking for object: bed

Now it called action STOP

[2023-04-20 16:32:52,211][root][INFO] - Done episode BaseEpisode(episode_id='28315', scene_id='data/scene_datasets/hm3d_v0.2/train/00538-3CBBjsNkhqW/3CBBjsNkhqW.basis.glb')

And next episode starts

Debugging info: success: 0.0
 Distance to goal = 3.2840120792388916
 Looking for object: tv

I would expect the last episode to be a success, as distance to goal was <1. However, "success" measure is still 0, as you can see from the last stats.

In config file, I have

success_measure: "spl"
end_on_success: True

I would expect success to increase. Why is it not the case? And what does "distance_to_goal" represents? Thank you! :)

ykarmesh commented 1 year ago

Hey @gianscarpe,

The "distance to goal" measures distance from the agent to the "viewpoints" from which the object is visible. While these viewpoints themselves need to be within 1m of the goal object, the distance between the agents and these viewpoints itself should be lower than 0.1 meters for the episode to be considered successful. This has been specified here as a config parameter.

gianscarpe commented 1 year ago

Thanks for your answer @ykarmesh . Does it mean that distance to the object must always be within 1m to get a success? E.g., if the agent is 0.99m to the goal object and the object is visible (not behind a wall for example) than it's a success?

ykarmesh commented 1 year ago

Yes! You can visualize the viewpoints on the top down map to confirm if the goal is in view agent's current pose.