Hi,
I have a model that is composed of numerous spheres as links. At a moment during the simulation I would like to remove some of these spheres (links).
I tried it this way and nothing happens:
// Initialize world (WorldPlugin)
physics::WorldPtr my_world = _parent;
// Init 'liquid_spheres' the model with many sphere links
physics::ModelPtr liquid_model = this->my_world->GetModel("liquid_spheres");
// Create a vector with all the links from the model
std::vector<physics::LinkPtr> links = this->liquid_model->GetAllLinks();
// I try to remove the links with "RemoveChild(EntityPtr _child)", but nothing happens
// Other operations such as moving them in another position works fine
this->liquid_model->RemoveChild(links[i]);
// This one does not do anything either:
this->liquid_model->RemoveChildren();
If it not possible to remove the links, which is the best way to delete the whole model?
I am using ROS Groovy with Gazebo 1.2.5.
Thanks, Andrei
Originally posted by AndreiHaidu on Gazebo Answers with karma: 2108 on 2012-12-20
Post score: 0