Robotics StackExchange | Archived questions

Add and Delete Models during simulation.

Hi everyone,

Thanks in advance, I would like to know if it is possible to create models and delete them during simulation. I want to develop an application throught a gazebo plugin, in which I want to spawn a set of models and delete them.

I'm trying to remove a set of models, wait to this models to be removed and then insert new models. The problem comes when inserting new models, they spawned for a milisecond, disappear, and then come other time to the world. I think the process of deleting models keep working when I try to insert new models.

I use world->RemoveModel() and world->InsertModelSDF() for delete and spawn models respectively.

Anything you need ask me :)

Asked by Urwik on 2022-11-21 04:35:41 UTC

Comments

Answers

I have solved the problem creating a new thread and running my function in this thread.

Asked by Urwik on 2022-11-23 05:43:23 UTC

Comments