Gazebo | Ignition | Community
Ask Your Question
0

Add and Delete Models during simulation.

asked 2022-11-21 03:35:41 -0600

Urwik gravatar image

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 :)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-11-23 04:43:23 -0600

Urwik gravatar image

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

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2022-11-21 03:35:41 -0600

Seen: 12 times

Last updated: Nov 23