-
Notifications
You must be signed in to change notification settings - Fork 486
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 slow loading of spawned model with plugins #3126
Fix slow loading of spawned model with plugins #3126
Conversation
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 |
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>
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.