-
Notifications
You must be signed in to change notification settings - Fork 53
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
Fixed OBJ textures #239
Fixed OBJ textures #239
Conversation
Signed-off-by: Jenn Nguyen <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-rendering3 #239 +/- ##
===============================================
Coverage 50.63% 50.63%
===============================================
Files 129 129
Lines 11864 11869 +5
===============================================
+ Hits 6007 6010 +3
- Misses 5857 5859 +2
Continue to review full report at Codecov.
|
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 workaround makes the assumption that the model will always have a model.obj
file in a meshes
directory, which may not always be true. I can't think if a simple alternative though, because at this point in the code we don't know whether the mesh is OBJ or not.
We eventually want to make the baseName = _texture
change for all meshes, but we can't do it until SubT is updated to use the same texture file for all duplicates. Considering that this workaround is temporary and meant to at least fix the models from GoogleResearch, which match the current assumptions, I think it's ok to get it in like this.
Do you mind adding aFIXME
note about this on the code and a link back to the original issue? Feel free to merge after that's in. Thanks!
Signed-off-by: Jenn Nguyen <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
@chapulina how does b74577d look? I wasn't sure how specific the comment needed to be |
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.
Thanks for the workaround. The FIXME message looks good to me 👍
Bug Fix
Resolves issue #139 for OBJ files only
Summary
The Ogre 2 plugin uses a texture's filename to uniquely identify each texture, so any textures named
texture.png
are treated the same, even if they're in different directories. The new change checks to see if the mesh has an OBJ file (model.obj
), if it does it setsbaseName
to be the full path (instead oftexture.png
).For example, load this world on
ign-gazebo
:world.sdf
Checklist
codecheck
passed (Seecontributing)
test coverage)
another open pull request
to support the maintainers
Note to maintainers: Remember to use Squash-Merge