-
Notifications
You must be signed in to change notification settings - Fork 451
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
Fix Double PathFinder #1483
Fix Double PathFinder #1483
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only time this will fail is if Sim::reconfigure is called with the same SimulatorConfiguration a it already has. If close was called before this, the Pathfinder will have been destroyed, but this short circuit will bypass the code to recreate it.
Otherwise, the Pathfinder is always recreated as part of reconfigure
Probably, the Pathfinder init should be moved to be before the configuration similarity check, conditional on it being nullptr, like we do with sceneManager_
Close also resets the config to its default value so that'll be pretty edge-casey, but yeah, I will do the same thing as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also has the side effect of simplifying the python code. Nice!
Motivation and Context
Due to legacy reasons, we create a pathfinder object in the python sim after the cpp sim has been initialized. This means that the navmesh loaded via the scene dataset get's unloaded!
How Has This Been Tested
Via tests. We have a lot of tests that require the navmesh to be loaded correctly and I do not see python saying it loaded the navmesh, so cpp must be doing it correctly!
Types of changes