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

The navigator fails when a move is not possible #219

Open
jwaa opened this issue Aug 13, 2020 · 0 comments
Open

The navigator fails when a move is not possible #219

jwaa opened this issue Aug 13, 2020 · 0 comments
Labels
bug Something isn't working core Work related to the core functionality

Comments

@jwaa
Copy link
Member

jwaa commented Aug 13, 2020

Describe the bug
When an agent is told to move to a waypoint next to it which it cannot move to, it gives an exception. See this line. Instead, it is better to check that there is indeed nothing to do since the agent is already as close as possible and instead of raising an exception do nothing.

E.g. an if statement somewhere such as this:

if current_wp.location == agent_loc:
    route = {agent_loc : None}

The question is... where? Since the route is not empty (the agent is not actually on that location) but it cannot move any closer.

To Reproduce
N/A

Expected behavior
N/A

Screenshots
N/A

Stacktrace
N/A

Additional context
N/A

@jwaa jwaa added the bug Something isn't working label Aug 13, 2020
jwaa added a commit that referenced this issue Aug 14, 2020
…oint

Now it raises a user warning whenever the route is empty but the agent is not yet done with all waypoints.
@jwaa jwaa added the core Work related to the core functionality label Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Work related to the core functionality
Projects
None yet
Development

No branches or pull requests

1 participant