-
Notifications
You must be signed in to change notification settings - Fork 400
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
--Viewer : minor bugs; refactor drawEvent #1621
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.
Agreed that settings should come from any loaded config. Not sure about the hard-coded slope fix here. I understand why we should change it, but maybe it should be a change in the NavMesh default settings instead.
Also note we have the python viewer application here. Should these be expected to behave the same way? Open to thoughts here.
src/utils/viewer/viewer.cpp
Outdated
@@ -903,6 +903,9 @@ void Viewer::initSimPostReconfigure() { | |||
} | |||
} else if (recomputeNavmesh_) { | |||
esp::nav::NavMeshSettings navMeshSettings; | |||
navMeshSettings.agentHeight = agentConfig_.height; | |||
navMeshSettings.agentRadius = agentConfig_.radius; | |||
navMeshSettings.agentMaxSlope = 55.0f; |
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.
Danger here is that users will load the asset in viewer and everything looks good, but using the defaults in the episode generator for training won't produce the same results.
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.
Well, we do need to map the agentConfig values to the navMeshSettings, i think - if we are allowing folks to change agent geometry in viewer then we should have the navmesh synth process track that.
As for the hardcoded max slope, I actually don't wan to have this here, primarily I just wanted to start a conversation about it.
Yeah, that would be the ideal situation, but not sure if folks are prepared for any changes that might entail.
I think they should, especially for these particular value-driven quantities (if we are recomputing the navmesh and have locally defined agent specs, we really should use those to build the navmesh, I think) |
daa33dc
to
62eaa54
Compare
a12241d
to
8639fae
Compare
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, thanks.
Got rid of a bunch of needless if checks building the string sensor key in drawEvent, and streamlined the draw/render process a bit. |
Motivation and Context
This PR addresses a few minor bugs in viewer, where values that should have been mapped from constants were being mapped via magic numbers, or else not being mapped at all (such as the agent's dims if navmesh recalc is requested).
drawEvent functionality was also refactored to not recreate the Sensor Key string every frame when it only changed if sensorMode_ or visualizeMode_ changed.
How Has This Been Tested
It's Viewer! It Always Works!
Types of changes
Checklist