-
Notifications
You must be signed in to change notification settings - Fork 51
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
Helper function to get a scene #320
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.
LGTM, just one minor comment, what do you think about use another name for the method? getFirstInitializedScene
?
I can see an error in windows
47: �[31m[Err] [C:\Jenkins\workspace\ign_rendering-pr-win\ws\ign-rendering\src\RenderEngineManager.cc:336] �[m�[31mInvalid render-engine index: �[m�[31m1000000�[m�[31m
47: �[m[ OK ] RenderingIfaceTest.RegisterEngine (67 ms)
I don't know if that name would be necessarily true for the current implementation. For example:
SB was initialized before SA, but we'll return SA. Moreover, if we don't do step 4, we will return null. |
@osrf-jenkins retest this please |
How about |
The trick is whether the "first" applies to the render engine, to the scene, or to both... I don't have a better suggestion though. I can go with that if you think there isn't a lot of ambiguity. I'd just drop the |
I think either one works |
Ok, I went with that: e19bd73 |
Signed-off-by: Louise Poubel <louise@openrobotics.org>
e19bd73
to
9ed634a
Compare
Done, this is now targeted at v3 |
Codecov Report
@@ Coverage Diff @@
## ign-rendering3 #320 +/- ##
==================================================
+ Coverage 50.59% 57.44% +6.85%
==================================================
Files 129 159 +30
Lines 11887 15718 +3831
==================================================
+ Hits 6014 9029 +3015
- Misses 5873 6689 +816
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.
looks good to me.
🎉 New feature
Summary
Most applications will only have one rendering engine loaded at a time, and only one scene within that. This helper function gets the first scene that can be found in any rendering engine.
This pattern is being repeated on several
ign-gui
andign-gazebo
plugins, so it would be nice to reduce duplication. For example:This PR could target
ign-rendering3
, I'm targetingmain
because I have other PRs that will depend on it. Once this has been reviewed I can rebase and target 3.Test it
Take a look at the added tests.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸