-
Notifications
You must be signed in to change notification settings - Fork 44
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
Split transport scene manager into a plugin outside Scene3D #221
Conversation
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: ahcorde <[email protected]>
* Add sky tag to the new Scene3D Signed-off-by: ahcorde <[email protected]> * Update docs Signed-off-by: ahcorde <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #221 +/- ##
==========================================
- Coverage 67.08% 65.15% -1.93%
==========================================
Files 25 26 +1
Lines 3138 3811 +673
==========================================
+ Hits 2105 2483 +378
- Misses 1033 1328 +295
Continue to review full report at Codecov.
|
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
@ahcorde , I'm opening this PR for review. I've added tests, a tutorial, and a migration path. |
public: common::MouseEvent mouseEvent; | ||
|
||
/// \brief Mouse move distance since last event. | ||
public: math::Vector2d drag; |
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.
I added a plugin to move the camera with mouse #231, this will remove some code here. should we merge this first?
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
@chapulina, these two PRs are the following ones: |
🎉 New feature
Part of #137 , alternative to #217
Needs gazebosim/gz-rendering#320
Summary
This is a step towards reducing duplication between 3D scenes. Initially, @ahcorde and I had talked about taking an approach similar to the one used by plotting. That is providing an interface that is wrapped by an
ign-gui
plugin, and also wrapped by anign-gazebo
plugin, which adds Gazebo-specific functionality on top. @ahcorde started working on this approach in #217, and I also iterated a bit on top of it on 2fc70f2. But while at it, I realized that this approach may not be the best fit forScene3D
, because there's actually a simpler way.My new idea is to leverage the
Render
event to perform all scene update tasks such as adding, removing and updating visuals. TheScene3D
plugin itself should be very minimal, just focusing on running the render loop and providing some orbit controls. I'm leaving this minimal functionality on the newMinimalScene
plugin, while all other functionality should be pushed to new plugins, like theTransportSceneManager
that's being proposed here.This approach allows us to keep Ignition GUI's
Scene3D
almost the same and add all new functionality on top. I think we could do the same withignition::gazebo::Scene3D
, see gazebosim/gz-sim#813. That is:ignition::gui::Scene3D
to a new plugin,GazeboSceneManager
GazeboSceneManager
will:TransportSceneManager
, it must be loaded alongsideignition::gui::MinimalScene
gui::MinimalScene
's responsibility.Render
event and perform all rendering calls within that callback.gazebo::Scene3D
may have some functions and bugfixes that we'll need to port togui::MinimalScene
. We just need to be careful to push too much functionality intogui::MinimalScene
. Let's keep that plugin lean. Any well scoped feature should go into a separate plugin that ties into the render event.Test it
Try the new
scene_provider
example, see instructions on README added.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸