Not able to delete model

asked 2016-09-25 12:03:34 -0500

wicked88 gravatar image

updated 2016-09-25 12:04:13 -0500

Hey ! I have this simulator that i'm building, using a custom client and gazebo's server. I'm using a gazebo topic (using GzString) to pass generic data to my world plugin. Adding models work just fine (despite some bugs related to Ign-Rendering and not loading correctly some visual properties), but when removing models, it just hangs in there forever.

models_ = world_->GetModels();   // get models
// name is the name of the model to be deleted
for(unsigned int i = 0; i<models_.size(); i++){
    if(name.compare(models_[i]->GetName())==0){
        ROS_INFO("Found model to be deleted.");
        world_->RemoveModel(models_[i]); 
        model_deleted = true;   
    }
}

Any hints on how to solve this ?

edit retag flag offensive close merge delete