Robotics StackExchange | Archived questions

Not able to delete model

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 ?

Asked by wicked88 on 2016-09-25 12:03:34 UTC

Comments

Answers