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

erratic simulator gazebo does not work anymore

asked 2012-10-15 01:54:05 -0600

rastaxe gravatar image

updated 2012-10-15 03:36:10 -0600

I tried erratic simulation some months ago and it worked, but now it does not work anymore. If I launch "roslaunch erratic_description erratic_empty_world.launch", gazebo gui starts without the robot and it seems blocked on:

waiting for service /gazebo/spawn_urdf_model

The gzserver process consumes a lot of CPU (100%), but I do not know if it is related. I tried also on another computer with the same results. I have Ubuntu 12.04 64bit and fuerte. Does someone have an advice to solve the problem? Thanks.

Update. I did another test. The erratic_empty_world.launch file is:

<launch>
<param name="/use_sim_time" value="true" />

<node name="empty_world_server"
      pkg="gazebo"
      type="gazebo"
      args="-u $(find gazebo_worlds)/worlds/empty.world"
      respawn="false"
      output="screen"/>

<node name="gazebo_gui" pkg="gazebo" type="gui" respawn="false" output="screen"/>

<include file="$(find erratic_description)/launch/erratic_mobile_base.launch" />

</launch>

I tried to run each node separately with 4 commands: roscore, rosrun gazebo gazebo empty.world, rosrun gazebo gui, roslaunch erratic_description erratic_mobile_base.launch. and it worked. The general erratic_empty_world.launch file should do the same, but it does not work. Any suggestions?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-10-15 03:57:42 -0600

arebgun gravatar image

Just change the node name from node "empty_world_server" to "gazebo" and it should be able to find the /gazebo/spawn_urdf_model service and the rest of them.

edit flag offensive delete link more

Comments

Thanks now it works!! But why some months ago did it work? Is it changed? I thought that "name" was a customizable field.

rastaxe gravatar image rastaxe  ( 2012-10-15 04:28:21 -0600 )edit
1

answered 2012-10-15 02:46:05 -0600

updated 2012-10-15 04:36:22 -0600

This sounds like you try it on fuerte (and used it on electric the last time you tried). The Gazebo server (simulation) and client (visualization) have been split into two independent processes starting with fuerte, which means that old launch files might start up without a Gazebo GUI. Start the launch file and type

rosrun gazebo gui

afterwards. The Gazebo GUI should come up then.

/edit: As mentioned below in the comments, the above wasn't the solution. Just tried it myself, and the robot indeed doesn't spawn with the spawner waiting for the spawn model service to appear. It works with the laser equipped erratic, however:

roslaunch erratic_description erratic_laser_wg_world.launch

or:

roslaunch erratic_description erratic_laser_empty_world.launch

For the latter, you have to start the gui manually as it appears it was forgotten in the launch file.

Not sure why it doesn't work with the launch file in the original question, I suspect either a) a subtle difference in launch files that I didn't catch or b) a timing problem during gazebo startup which leads to the spawn model service not getting called.

/edit: As apparent from answer by arebgun, it was a) ;)

edit flag offensive delete link more

Comments

Also the last time I used fuerte. The gazebo gui node is already into the launch file, in fact Gazebo GUI starts and it shows correctly the empty world, but not the robot.

rastaxe gravatar image rastaxe  ( 2012-10-15 03:10:02 -0600 )edit

Sorry, apparently misread a part of your posting. Is there any output on the gazebo terminal? Can you spawn other models? (Plz comment here or edit your original post)

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2012-10-15 03:31:46 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-10-15 01:54:05 -0600

Seen: 895 times

Last updated: Oct 15 '12