allenai / allenai/ai2thor

The question about the distance between the object and the agent

Abierto
#957 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C#
Estrellas
1.8k
Forks
297
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.