Skip to content
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

Fix gzclient starting with black screen #3121

Merged
merged 6 commits into from
Oct 15, 2021

Conversation

scpeters
Copy link
Member

There is a longstanding issue (#681) in which gzclient occasionally starts with a black screen, failing to ever display the scene. Opening a second gzclient instance often works properly, suggesting a race condition in initialization. I highly suspect much of the non-determinism comes from the use of the ~/request topic with gazebo-transport to communicate scene_info from gazebo::physics::World to gazebo::rendering::Scene. It is more reliable to use an ignition-transport service, so I have added a /scene_info ignition-transport service to World and changed Scene to prefer calling this service instead of using the ~/request topic. If the ignition service is unavailable or fails, it will fall back to the current method using ~/request, which should preserve backwards compatibility between old and new instances of gzserver and gzclient.

I've added a test for the new service to INTEGRATION_info_services. I've also fixed a few compiler warnings in ab57017.

Add test for /scene_info service with empty.world

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
This should be more reliable than the ~/request topic
over gazebo::transport, but if it fails then fall back
on the current method.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@WilliamLewww
Copy link
Contributor

There is a small merge conflict but other than that, the changes seem to be working!

@scpeters
Copy link
Member Author

There is a small merge conflict but other than that, the changes seem to be working!

I just merged with gazebo11, conflicts are resolved

this->dataPtr->requestPub->Publish(*this->dataPtr->requestMsg);
// Get scene info from physics::World with ignition transport service
ignition::transport::Node node;
ignition::msgs::Scene sceneInfo;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized this variable is unused. I'll wait for the current CI run to finish, then make this change and merge without CI

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters scpeters merged commit 720b52d into gazebosim:gazebo11 Oct 15, 2021
@scpeters scpeters deleted the ign_scene_service branch October 15, 2021 22:02
scpeters added a commit to scpeters/gazebo that referenced this pull request Oct 22, 2021
Since gazebosim#3121 was merged, some problems have been observed
with loading model plugins if a model contains sensor
plugins that are slow to load. This introduces two
test plugins and a test world to demonstrate the problem.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
scpeters added a commit that referenced this pull request Oct 25, 2021
As noted in #3125, loading a model may timeout when
loading model plugins if the model contains sensor
plugins that are slow to load. Since this timeout seems more
likely to occur since #3121 was merged, the default timeout
is increased from 5 seconds to 30 seconds, and an SDFormat
world parameter <ignition:model_plugin_loading_timeout> is
added to make the timeout configurable.

A regression test using a test world and two test plugins is
added to demonstrate the problem and confirm the fix.

* Fix typos in World.hh doc-strings
* Add IGN_PROFILE to World::ProcessFactoryMsgs
* Disable shadow caster test on macOS

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants