allenai / allenai/ai2thor

GetShortestPath

Ouverte
#1,054 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C#
Étoiles
1.8k
Forks
296
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Hi @mattdeitke
I saw the action "GetShortestPath" in allenact and I want to use it in ai2thor. I have set the gridSize=0.25 and snapToGrid=True, but the action return the path ignore the gridSize. Here is part of my code:

```python
controller = Controller(scene="FloorPlan212",
visibilityDistance=1.5,
gridSize=0.25,
snapToGrid=True)

event = controller.step(action="GetReachablePositions")
positions = event.metadata["actionReturn"]
initial_position = random.choice(positions)

event = controller.step(action="GetShortestPath",
objectType='Television',
position=initial_position,
allowedError=0.05)
if event.metadata["lastActionSuccess"]:
shortest_path = event.metadata["actionReturn"]["corners"]
```

Here is some samples of **shortest_path** :

```
{'x': -0.75, 'y': 0.010305345058441162, 'z': 0.0}
{'x': -1.0121546978325568e-07, 'y': 0.010305345058441162, 'z': 5.623087417916395e-08}

{'x': -2.0, 'y': 0.010305345058441162, 'z': -0.5}
{'x': -0.5399999618530273, 'y': 0.010305345058441162, 'z': -0.26999974250793457}
{'x': 0.0, 'y': 0.010305345058441162, 'z': -0.25}

{'x': -3.75, 'y': 0.010305345058441162, 'z': -0.5}
{'x': -0.5399999618530273, 'y': 0.010305345058441162, 'z': -0.26999974250793457}
{'x': 0.0, 'y': 0.010305345058441162, 'z': -0.25}
```

I am wondering if the action "GetShortestPath" still available in ai2thor. I didn't find any code related to this action.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.