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

Inserting a model with the same name as a deleted model makes it disappear #1789

Open
osrf-migration opened this issue Dec 1, 2015 · 4 comments
Labels
all bug Something isn't working major

Comments

@osrf-migration
Copy link

Original report (archived issue) by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Copy/Paste example

This happens when you copy/paste for example:

  1. Insert a box

  2. Copy the box and paste it

  3. Delete the copy

  4. Paste again - model appears and disappears immediately after, because it would have the same name as the deleted one

Latching issue

This seems to be related to a problem with latched subscribers. The issue is fixed by setting the request subscriber in physics::World as not latching:

--- a/gazebo/physics/World.cc
+++ b/gazebo/physics/World.cc
   this->dataPtr->requestSub = this->dataPtr->node->Subscribe("~/request",
-                                           &World::OnRequest, this, true);
+                                           &World::OnRequest, this, false);

Pull request #1912 addressed the latching issue in a different way but it does not solve this issue by itself.

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


It seems to be a timing problem. Just by printing debug statements to the console the issue gets solved. There's probably something which is trying to delete an entity right before latching gets set to false or something like that. I tried adding a mutex to CallbackHelper but just that didn't help.

@nkoenig , ideas?

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Nevermind, I added mutexes to more places and got it to work! Woots! PR coming soon.

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


pull request #2019

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • set version to "all"

@osrf-migration osrf-migration added major bug Something isn't working all labels Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
all bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant