Unit 7: services

I was wondering how to know gazebo model’s names?

For example the tutorial uses:
request->model_name = “bowl_2”;

Then the student is supposes to use the gazebo/srv/DeleteModel to erase the table instead of the bowl. So, my question is how do I get to know the model_name for any other entity in the gazebo world.

Hello @ale.moreno991 ,

The fastest way is to use the following command:

For ROS 1: rosservice call /gazebo/get_world_properties "{}"

For ROS 2: ros2 service call /get_model_list gazebo_msgs/srv/GetModelList "{}"