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

Removing and inserting a new model failed #3396

Open
WillyTuring opened this issue Aug 17, 2024 · 3 comments
Open

Removing and inserting a new model failed #3396

WillyTuring opened this issue Aug 17, 2024 · 3 comments

Comments

@WillyTuring
Copy link

Hi guys,
In the code, i am trying to remove an old model loaded originally from sdf file, then insert a new one with method "world->InsertModelSDF(*updatedSDF);"; the old one is being removed successfully, but i got error when inserting the new one:
image

Any thoghts on the problem? Thanks in advance.

@WillyTuring
Copy link
Author

WillyTuring commented Aug 17, 2024

My hunch is that the old model wasn't being removed cleanly thus we have this problem, we are using "world->RemoveModel(sphereModel);" to remove the model, it did get removed visually from the simulation world, but i think the resources related didn't get cleaned up completely.

@traversaro
Copy link
Collaborator

Which version of ogre are you using? If I recall correctly, at some point ogre changed the logic related to resources. You can find more information in conda-forge/gazebo-feedstock#74, in particular conda-forge/gazebo-feedstock#74 (comment) . At the conda-forge level, we are using a patch in https://github.com/conda-forge/gazebo-feedstock/pull/75/files that we never ported upstream as it creates a leak in version of ogre <= 1.9.

@WillyTuring
Copy link
Author

Which version of ogre are you using? If I recall correctly, at some point ogre changed the logic related to resources. You can find more information in conda-forge/gazebo-feedstock#74, in particular conda-forge/gazebo-feedstock#74 (comment) . At the conda-forge level, we are using a patch in https://github.com/conda-forge/gazebo-feedstock/pull/75/files that we never ported upstream as it creates a leak in version of ogre <= 1.9.

I am using "Ogre Version: 1.12.9".

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

No branches or pull requests

2 participants