Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

removing models leaves behind some visuals #1702

Closed
osrf-migration opened this issue Aug 11, 2015 · 11 comments
Closed

removing models leaves behind some visuals #1702

osrf-migration opened this issue Aug 11, 2015 · 11 comments
Labels

Comments

@osrf-migration
Copy link

Original report (archived issue) by John Hsu (Bitbucket: hsu, GitHub: hsu).


This can be reproduced by deleting a model, then re-spawning the same model with the same name, an error appears complaining about existing visual nodes in ogre. For example, while running the haptix world sim api tutorial, by calling the following functions in sequence:

% Define a new model.  Here, we're taking the cricket_ball model from:
%  #!/osrf/gazebo_models/src/default/cricket_ball/model.sdf
% and tweaking it slightly (just changing the color from Red to Green).
sdf = '<sdf version="1.5"> <model name="cricket_ball"> <link name="link"> <pose>0 0 0.0375 0 0 0</pose> <inertial> <mass>0.1467</mass> <inertia> <ixx>8.251875e-05</ixx> <ixy>0</ixy> <ixz>0</ixz> <iyy>8.251875e-05</iyy> <iyz>0</iyz> <izz>8.251875e-05</izz> </inertia> </inertial> <collision name="collision"> <geometry> <sphere> <radius>0.0375</radius> </sphere> </geometry> </collision> <visual name="visual"> <geometry> <sphere> <radius>0.0375</radius> </sphere> </geometry> <material> <script> <uri>file://media/materials/scripts/gazebo.material</uri> <name>Gazebo/Green</name> </script> </material> </visual> </link> </model> </sdf>';
% Add the new model to the world, at the world origin, 5m off the ground, with
% gravity enabled.  Then it will drop onto the table.
hxs_add_model(sdf, 'green_cricket_ball', [0; 0; 5], [0; 0; 0], 1);
pause(2);
% Remove the model
hxs_remove_model('green_cricket_ball');
pause(2);
% Add back the same model
hxs_add_model(sdf, 'green_cricket_ball', [0; 0; 5], [0; 0; 0], 1);

terminate called after throwing an instance of 'Ogre::ItemIdentityException'

  what():  OGRE EXCEPTION(4:ItemIdentityException): An object of type 'Entity' with name 'green_cricket_ball::link_COM_VISUAL____SPHERE__' already exists. in SceneManager::createMovableObject at /tmp/buildd/ogre3d-1.9-1.9.0~osrf2/OgreMain/src/OgreSceneManager.cpp (line 6853)
@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


pull request #1859

@osrf-migration
Copy link
Author

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


Maybe related question:

http://answers.gazebosim.org/question/9493/delete-and-reload-a-model/

We probably should be making sure all topics are deleted as well.

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


Issue #1747 was marked as a duplicate of this issue.

@osrf-migration
Copy link
Author

Original comment by Grégoire Passault (Bitbucket: Gregwar).


Indeed, I duplicately reported the same problem
What is the status of this?

@osrf-migration
Copy link
Author

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


It's still under development. Hopefully next week.

@osrf-migration
Copy link
Author

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


there's a temporary ABI-compatible fix for gazebo6 in pull request #1886. But a more thorough fix by @nkoenig for default branch is also underway.

@osrf-migration
Copy link
Author

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


related issue: #1789

@osrf-migration
Copy link
Author

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


I believe this was fixed by pull request #1886, which added a regression test.

@osrf-migration
Copy link
Author

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


  • changed state from "new" to "resolved"

@osrf-migration
Copy link
Author

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


  • set version to "all"

@osrf-migration
Copy link
Author

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


  • changed state from "resolved" to "closed"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant