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

Gazebo world not reset on fresh launch

asked 2013-06-11 23:20:51 -0500

whiterose gravatar image

Hi all,

First of all, I am not sure whether this question suits here or at answers.gazebosim.org. Anyway, I have a problem launching my scenario into gazebo.

When I freshly launch a scenario, it keeps on giving me [ERROR] [1371026131.168854259, 1.959000000]: SpawnModel: Failure - model name aluprofil_f20_100_gray_1 already exist, also for other models that are supposed to be in the scenario.

It is as if there is a memory/buffer kept somewhere, that causes the scenario I am launching cannot spawn the models, since 'it-is-already-there' and the robot to be at the location where I last moved it.

So the question is, how to ensure that the scenario is always reset at the beginning of a launch? I tried resetting the world and poses, it didn't work. What could be the problem?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-06-12 00:25:37 -0500

updated 2013-06-12 16:03:19 -0500

Gazebo uses client-server architecture, namely there are gzserver and gzclient executables. In ROS they can be started by $ rosrun gazebo gazebo and $ rosrun gazebo gui, correspondingly.

So, if you need a fresh world you have to restart both server and client. It is also a good idea to restart all other ROS-nodes as well as roscore. In general, the latter is not required, but may save you a lot of time.

UPDATE:

System restart should definitely wipe any temporary data. So the problem is somewhere in startup scripts, world or model files.

There are three possibilities:

  1. The spawner is dying midway and restarts automatically, e.g. the node has attribute respawn="true" in a launch file
  2. 'spawner script' is just included twice.
  3. Gazebo world or model has a problem. For example, if your robot utilize the gazebo_ros_controller_manager plugin, it may hang because you did not load the controller, e.g. robot_mechanism_controllers/JointTrajectoryActionController. Controller manager will wait for controller till it loads. In this case actual model will not appear in a scene, but will occupy the name. It not explains why the model is spawned twice, though it can be a part of the problem.

Please update the question with contents of your launch and world files. Additionally it would be good to see startup log of your scenario. If the listings are too long, please use Pastebin or similar service.

Hope it helps

edit flag offensive delete link more

Comments

Unfortunatly this doesn't work. I even went to the extent of restarting my PC.

whiterose gravatar image whiterose  ( 2013-06-12 03:20:41 -0500 )edit

Question Tools

Stats

Asked: 2013-06-11 23:20:51 -0500

Seen: 2,137 times

Last updated: Jun 12 '13