Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to deleate a model with an world plugin

Hi

I wrote a WorldPlugin similar to the factory example and now I want to delete a added model but how? The following approach does not work :-(

void delete(const std::string& name){
    # Info world_ is of type physics::WorldPtr 
    physics::ModelPtr p = world_->GetModel(name);
    p->RemoveChildren();        
}

Greetings Markus

How to deleate delete a model with an world plugin

Hi

I wrote a WorldPlugin similar to the factory example and now I want to delete a added model but how? The following approach does not work :-(

void delete(const std::string& name){
    # Info world_ is of type physics::WorldPtr 
    physics::ModelPtr p = world_->GetModel(name);
    p->RemoveChildren();        
}

Greetings Markus