This repository has been archived by the owner on Feb 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 498
Fix slow loading of spawned model with plugins #3126
Merged
scpeters
merged 8 commits into
gazebosim:gazebo11
from
scpeters:slow_loading_model_spawn
Oct 25, 2021
Merged
Fix slow loading of spawned model with plugins #3126
scpeters
merged 8 commits into
gazebosim:gazebo11
from
scpeters:slow_loading_model_spawn
Oct 25, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Increase the timeout from 5 seconds to 50 seconds. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
I suppose we could add an SDFormat world parameter? |
Rather than increase the timeout to a larger fixed value, this adds an SDFormat parameter to the world element in the ignition xml namespace. It restores the default timeout of 5 seconds and sets a timeout of 30 seconds in the test world. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
I've added an SDFormat parameter in the ignition xml namespace in 35fb921 and restored the default timeout to 5 seconds |
jacobperron
approved these changes
Oct 25, 2021
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.
The changes LGTM.
I would consider increasing the default timeout if you think users are more likely to run into the issue after updating Gazebo.
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
jacobperron
approved these changes
Oct 25, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As reported in #3125, since #3121 was recently merged I have noticed a problem with some models that are slow to load. Specifically, if a model is spawned that contains a sensor plugin that is slow to load, it is possible that model plugins will fail to load, with the following error message:
I believe this is caused by this logic in
Model::LoadPlugins
that skips loading of model plugins if the sensors take longer than 5 seconds to initialize, which includes the time required to load sensor plugins. I have increased this timeout to 50 seconds in 2589d13, though I am open to suggestions for how to make this a configurable parameter.I have added a regression test that loads a world file along with two test plugins to reproduce the failure. The world has a
WorldSpawnModelPlugin
that spawns a model that has a single box with a camera sensor using theSlowLoadingSensorPlugin
and theInitialVelocityPlugin
as a model plugin. The box should be given an initial velocity after loading.