ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Gazebo delete_model problem

asked 2019-07-30 05:30:04 -0500

kky gravatar image

I have a slightly curious problem with /gazebo/delete_model service. I have a scene with some robots and spawn some simple boxes in runtime. Then to reset the environment, I call delete_model service for the objects as following.

for model_name in model_names:
        rospy.loginfo(model_name)
        try:
            res = self.delete_service(model_name)
            rospy.loginfo(res)
        except Exception as exc:
            rospy.loginfo("Service did not process request: " + str(exc))

If there are only 1-2 objects it works fine but if there are more the service freezes removes some of them and then freezes at a random object 90% of the time. When it is frozen, if I manually delete the model from gazebo UI, service call actually returns "successfully deleted" message. Then it gets stuck on the next object. In the sample code, it freezes on "delete_service" call.

I tried a couple of things. First, I tried an empty scene and it worked fine, somehow the fact that there are more models in the scene causes the freeze.

Second, in my scene, before deleting the models I stop gzclient. After deleteing is done, I start gzclient again. And this seems to also work up to like 70-80 objects, after that it also gets some occasional freezes.

I have seen some similar old questions about delete_model freeze in here so I get the feeling this is a bug in gazebo.

My question is: is there a solution or any kind of workaround for this? Also, is this a known issue?

P.S.: My setup is ros-melodic and gazebo9

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-08-06 03:36:34 -0500

kky gravatar image

After seeing several unanswered questions on Gazebo answers and Ros answer, I am pretty sure the problem is an actual bug with either Gazebo or nouveau drivers. As a workaround, my problem disappeared after installing nvidia driver. (nouveau driver was installed before).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-07-30 05:28:09 -0500

Seen: 882 times

Last updated: Aug 06 '19