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

gazebo crashes when calling delete_model service call

asked 2011-02-25 18:19:32 -0600

sam gravatar image

updated 2011-07-06 16:26:21 -0600

mmwise gravatar image

Hi, I use ros-cturtle-pr2all, I found when I add an object and select it and delete that model and select gazebo again, the gazebo will disappeared. I can repeat this situation.

step: 1.open gazebo: roslaunch gazebo_worlds empty_world.launch

2.add an object: sam@sam-laptop:~/code/ros/cad/stl$ rosrun gazebo spawn_model -file top.urdf -urdf -model top -z 0.5 loading model xml from file attempting to spawn robot in simulation waiting for service spawn_urdf_model spawn status: SpawnModel: successfully spawned model spawning success True sam@sam-laptop:~/code/ros/cad/stl$

3.select that object (ctrl+left mouse click) It will show circles around that object

4.delete that model sam@sam-laptop:~/code/ros/cad/stl$ rosservice call gazebo/delete_model '{model_name: top}' success: True status_message: DeleteModel: successfully deleted model sam@sam-laptop:~/code/ros/cad/stl$

5.select gazebo flat world again(ctrl+left mouse click) Gazebo will disappeared.

edit retag flag offensive close merge delete

Comments

by "disappearing" do you mean gazebo crashes?
Tully gravatar image Tully  ( 2011-02-26 04:39:02 -0600 )edit
Yes,I have to restart gazebo to continue my work. Sorry for using misunderstanding word.
sam gravatar image sam  ( 2011-02-26 11:51:07 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-02-28 07:06:32 -0600

hsu gravatar image

updated 2011-07-06 16:11:44 -0600

yep, you've found a bug. I needed to do

gazebo::World::Instance()->SetSelectedEntity(NULL);

before calling DeleteEntity(...).

Ticketed with patch for unstable.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-02-25 18:19:32 -0600

Seen: 2,446 times

Last updated: Jul 06 '11