-
Notifications
You must be signed in to change notification settings - Fork 289
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
Add Render Engine Cmd Line #331
Conversation
Signed-off-by: John Shepherd <[email protected]>
Signed-off-by: John Shepherd <[email protected]>
I believe there may be something going wrong with the gui and server side that I wasn't quite sure how to handle. I think it has to do with where the RenderEnginePlugin Components are created specifically, eg, if the server creates both components in |
what is the use case you are thinking of? One use case that came to mind is launching the server first and gui later, i.e. |
Yes, that was the use case I was thinking of, and I tested it out and it's not working. |
src/cmd/cmdgazebo.rb.in
Outdated
"\n"\ | ||
" --version Print Gazebo version information. \n"\ | ||
" --render-engine [arg] Ignition Rendering engine plugin to load. \n"\ | ||
" Gazebo will use OGRE2 by default. \n"\ |
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.
provide the exact string value that's used? Gazebo will use OGRE2 by default. (ogre2)
. Mainly just to be consistent with the --physics-engine
arg description
Just to confirm, I remember you mentioned we could support specifying the render engine using both the engine name and plugin name (which we could do later)? I like specifying by the engine name which is less error-prone but we should document the inconsistency if we don't plan to address it in the near future.
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 agree that the engine name is more user friendly, but the plugin name is more general for when we support custom engines. So I think the end goal would be:
- Consistency across physics and rendering
- Support for custom engine plugins, referring to them by the shared library name:
--render-engine MyCustomEngine
--physics-engine MyCustomEngine
- Support for engine plugins that are shipped with the core libraries either by their shared library name
--render-engine ignition-rendering-ogre2-plugin
--render-engine ignition-physics-dartsim-plugin
or their short name--render-engine ogre
--render-engine tpesim
To achieve this, we can always try to wrap the passed string intoignition-[physics/rendering]-[name]-plugin
.
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 agree with all the points above, I was wondering if you have an idea as to how to support binary names? Currently, specifying the regular name of the rendering engine is supported given the call here https://github.com/ignitionrobotics/ign-gazebo/pull/331/files#diff-a15bf0b158d65eb38bd94081b23c4291R2218 which takes "ogre" or "ogre2" and translates that to the actual rendering engine here https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo3/src/rendering/RenderUtil.cc#L1020 there, we would likely need to modify RenderUtil to now accept binary names, right?
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 was wondering if you have an idea as to how to support binary names?
I'll add more info on this issue: gazebosim/gz-rendering#100
To be clear, I'd be ok proceeding with this PR as is, and adding support for loading the shared libraries later. I'd just make the change that @iche033 suggested above to say "ogre2" instead of "OGRE2".
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.
Sounds good, fixes made here 88cd727
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.
we currently can't pass additional args to the gui process through runGui
I think that might not be necessary. The GUI plugins should get the information from the components the same way as if they has been launched at the same time as the server.
I think what needs to be changed is for the engine to be initialized during the Scene3D::Update
call instead of Scene3D::LoadConfig
.
Signed-off-by: John Shepherd <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo3 #331 +/- ##
================================================
+ Coverage 65.71% 77.32% +11.61%
================================================
Files 127 199 +72
Lines 6238 10503 +4265
================================================
+ Hits 4099 8121 +4022
- Misses 2139 2382 +243
Continue to review full report at Codecov.
|
Signed-off-by: John Shepherd <[email protected]>
Signed-off-by: John Shepherd <[email protected]>
I think this means the |
Signed-off-by: Ian Chen <[email protected]>
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 get a crash if I choose an unsupported rendering engine, I think this should be fixed before this PR can be merged.
$ ign gazebo shapes.sdf --render-engine ogre3
[GUI] [Err] [RenderEngineManager.cc:160] No render-engine registered with name: ogre3
[GUI] [Err] [RenderUtil.cc:1023] Engine [ogre3] is not supported
...
/home/chapulina/citadel_ws/install/lib/ign-gazebo-3/plugins/gui/libGzScene3D.so(_ZN8ignition6gazebo2v311IgnRenderer10InitializeEv+0x9d) [0x7
f42e40ef62d] /home/chapulina/citadel_ws/src/ign-gazebo/src/gui/plugins/scene3d/Scene3D.cc:1424
/home/chapulina/citadel_ws/install/lib/ign-gazebo-3/plugins/gui/libGzScene3D.so(_ZN8ignition6gazebo2v312RenderThread10RenderNextEv+0x80) [0x
7f42e40f4280] /home/chapulina/citadel_ws/src/ign-gazebo/src/gui/plugins/scene3d/Scene3D.cc:1786
Also, a quality of life improvement suggestion is displaying the rendering engine components in the component inspector (related to #158). I just realized that the physics engine isn't displayed either.
Signed-off-by: John Shepherd <[email protected]>
I submitted a fix here e93f8f9 , let me know if you think that's a valid fix, I tried to mimic the physics way of doing it.
Would you want this to go into this PR or another? [edit] I just assigned myself #158 and will add that suggestion in under that issue |
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.
Signed-off-by: John Shepherd <[email protected]> Signed-off-by: Ian Chen <[email protected]> Co-authored-by: Ian Chen <[email protected]> Signed-off-by: Guillaume Doisy <[email protected]>
Signed-off-by: John Shepherd [email protected]