-
Notifications
You must be signed in to change notification settings - Fork 342
Detect running server on startup #2828
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
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.
This diff is absolutely massive for such a small change. I've left some architectural feedback here: #2806 (comment)
Also when committing please sign off with git commit -s
.
I think we can break these down into small PRs.
I think the big diff is also partly due to indentation changes, e.g. https://github.com/gazebosim/gz-sim/pull/2828/files?w=1 shows diff without whitespace changes. Can you undo indentation changes? |
f60df98
to
7fbc51c
Compare
Signed-off-by: GauravKumar9920 <gaurav.og.9920@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## gz-sim9 #2828 +/- ##
===========================================
+ Coverage 68.95% 68.97% +0.02%
===========================================
Files 345 345
Lines 33332 33360 +28
===========================================
+ Hits 22983 23009 +26
- Misses 10349 10351 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: GauravKumar9920 <gaurav.og.9920@gmail.com>
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 is looking a lot better. Most of my comments are more to do with syntax and style. I have one tiny knit regarding returning an incompletely constructed object. For now we should just continue with construction as is. In Jetty we can consider throwing an error.
Co-authored-by: Arjo Chakravarty <arjo129@gmail.com> Signed-off-by: Gaurav Kumar <84905312+GauravKumar9920@users.noreply.github.com>
Co-authored-by: Arjo Chakravarty <arjo129@gmail.com> Signed-off-by: Gaurav Kumar <84905312+GauravKumar9920@users.noreply.github.com>
Signed-off-by: GauravKumar9920 <gaurav.og.9920@gmail.com>
Signed-off-by: GauravKumar9920 <gaurav.og.9920@gmail.com>
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 for iterating.
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, just minor suggestions
Signed-off-by: Gaurav Kumar <84905312+GauravKumar9920@users.noreply.github.com>
Signed-off-by: Gaurav Kumar <84905312+GauravKumar9920@users.noreply.github.com>
Signed-off-by: Gaurav Kumar <84905312+GauravKumar9920@users.noreply.github.com>
Signed-off-by: GauravKumar9920 <gaurav.og.9920@gmail.com>
Hello, apologies for the slow response on this thread was a bit occupied for the last few weeks. |
The diff --git a/src/gui/Gui_TEST.cc b/src/gui/Gui_TEST.cc
index ce5b42576..6f4c1d92a 100644
--- a/src/gui/Gui_TEST.cc
+++ b/src/gui/Gui_TEST.cc
@@ -252,6 +252,9 @@ TEST_F(GuiTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(QuickStart))
// Close the quick start window
gzdbg << "Closing the quickstart window" << std::endl;
ASSERT_EQ(1, gui::App()->allWindows().count());
+
+ while (!gui::App()->allWindows()[0]->isExposed())
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
gui::App()->allWindows()[0]->close();
gzdbg << "Waiting for main window" << std::endl; |
Signed-off-by: GauravKumar9920 <gaurav.og.9920@gmail.com>
Hello @iche033, Makes sense and I have made the changes, and it appears to build successfully except for one of them. |
ok I've seen the homebrew failures before. Those just started recently and I don't believe this PR caused those failures. |
Signed-off-by: Gaurav Kumar <84905312+GauravKumar9920@users.noreply.github.com>
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 this contribution!
🦟 Bug fix and New feature
Fixes #2806
Summary
Previously, when launching multiple GZ Sim servers, for instance, using the commands
gz sim -s shapes.sdf
andgz sim -s default.sdf
,If we had used the command
gz sim -g ‘fileName’
,It would not have considered the
fileName
parameter and would have launched any of the servers at random.This pr introduces a new feature that allows you to -
gz sim -g ‘fileName’
to launch the GUI, provided that the server(s) are operational.gz sim -g
. In case there's just one server running it will simply launch the gui of the same.