ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using system() might not help you most of the times. Do not go for system() unless desperate. I used the following code (snippet) in c++.

 #include "gazebo/DeleteModel.h"
    remove(std::string model_name)
           ros::NodeHandle nh("");
           ros::ServiceClient deleteModelClient = nh.serviceClient<gazebo::DeleteModel>("gazebo/delete_model");
           gazebo::DeleteModel deleteModel;
           deleteModel.request.model_name = model_name;

in main()


Hope you can modify for python!