allenai / allenai/ai2thor

The question about the distance between the object and the agent

Aperta
#957 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
1.8k
Fork
296
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

HI!
This is my code:

#############
from ai2thor.controller import Controller
from ai2thor.util.metrics import path_distance
from ai2thor.util.metrics import get_shortest_path_to_object_type

controller = Controller(scene="FloorPlan201",renderDepthImage=True)
event = controller.step("Stand")
b = event.metadata["objects"][6]["distance"]
print(event.metadata["objects"][6]['objectType'],b) # 6 means a Laptop # 2.3176186084747314

postition = event.metadata["agent"]["position"]
path = get_shortest_path_to_object_type(controller=controller,object_type="Laptop",initial_position=postition)
a = path_distance(path)
print(a) # 1.0606601717798212
#############

When I call these two methods to calculate the distance. The Euclidean distance is longer than the second way which is to measure distance. I fell very surprised.
the first distance: 2.3176186084747314
the second distance: 1.0606601717798212

Refer to the paper here:
https://arxiv.org/pdf/1807.06757.pdf
I think the first way of calculating distance should be shorter than the second way.

So I want to ask what algorithm is used in the second calculation of the Shortest Path? and where can I view this algorithm?
Thank you very much for your help.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.