Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Navigate to Random Navigable Point #2414

Open
yrraadi-io opened this issue Jun 21, 2024 · 2 comments
Open

Unable to Navigate to Random Navigable Point #2414

yrraadi-io opened this issue Jun 21, 2024 · 2 comments
Labels
support User support requested (e.g. specific issue or API usage question)

Comments

@yrraadi-io
Copy link

I'm working with the home-robot repository currently and as part of the project I'm experimenting with navigating to random points in my current environment using find_path method in GreedyGeodesicFollower.

  1. Initializing ShortestPathFollower:
    self.spf = ShortestPathFollower(sim, 0.25, False)
    Where I'm passing sim=self._env.habitat_env.env._sim

  2. Getting a random navigable point:

self.spf._build_follower()
goal_pos = self.spf._follower.pathfinder.get_random_navigable_point(10)
  1. Finding path to the point (In a seperate method by passing goal_pos)
self.spf._build_follower()
next_action = self.spf._follower.find_path(goal_pos=goal_pos)

However, this results in the following error:

raise errors.GreedyFollowerError()
habitat_sim.errors.GreedyFollowerError

I'm unable to understand why it's not able to generate a series of actions that will take me to the "random navigable point". And if it's not navigable, why is it being returned when I'm trying to find my "random navigable point".

Appreciate any clarification.

@yvsriram
Copy link

Hi Yash,

Are you facing issue with the first episode you try?

If yes, maybe you want to check if goal_pos and current_position are on the same navmesh island?

For a point, you can use this to get island it is on: https://aihabitat.org/docs/habitat-sim/habitat_sim.nav.PathFinder.html#get_island-70760

And you can pass island index to random_navigable_point to island_index

@yrraadi-io
Copy link
Author

Thank you for the pointers. I will try this. Yes I am facing the issue with the first episode I try.

As a follow up, I tried generating a get_random_navigable_point_near my agent's current position (state.position). I tried this on one episode (790) and then used find_path to get a series of actions. That worked, it gave me a list of 30 actions or so. But, upon following those actions I ended up at a different point as the random navigable point near that I generated. I know this since I logged those points.

Happy to share more details if you feel that will be helpful!

@aclegg3 aclegg3 added the support User support requested (e.g. specific issue or API usage question) label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support User support requested (e.g. specific issue or API usage question)
Projects
None yet
Development

No branches or pull requests

3 participants