0
$\begingroup$

Rosanswers logo

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.


Originally posted by sam on ROS Answers with karma: 2570 on 2011-02-25

Post score: 0


Original comments

Comment by sam on 2011-02-26:
Yes,I have to restart gazebo to continue my work. Sorry for using misunderstanding word.

Comment by Tully on 2011-02-26:
by "disappearing" do you mean gazebo crashes?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

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

before calling DeleteEntity(...).

Ticketed with patch for unstable.


Originally posted by hsu with karma: 5780 on 2011-02-28

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.