zkytony / thortils

Utility functions when working with Ai2-THOR. Try to do one thing once.
MIT License
42 stars 5 forks source link

Example on get_shortest_path_to_object_type #2

Closed ChongjianGE closed 5 months ago

ChongjianGE commented 1 year ago

Hi @zkytony Thanks for the wonderful project. I am currently implementing the get_shortest_path_to_object_type fucntion to get the valid path for navigation. However, I found the current code breaks down when run the function. Could you give me an example on how to run the get_shortest_path_to_object_type function?

zkytony commented 5 months ago

Oops. Not sure why I didn't see this before... It's been a while. I couldn't find an example for get_shortest_path_to_object_type but I do have an example for get_shortest_path_to_object_type here in another repo. It's used as part of an A* planner implementation. See video for examples:

Hope you've resolved your original issue, and hope this answer is helpful for others.

zkytony commented 5 months ago

The idea for get_shortest_path_to_object_type should be similar (just first fetch the object instance with the type closest to the robot, then use get_shortest_path_to_object_type for that instance).