Ask Your Question
3

Gazebo spawn_model hangs (wrong ros namespace) [closed]

asked 2012-08-05 21:52:41 -0500

g.aterido gravatar image

updated 2014-04-20 14:09:32 -0500

ngrennan gravatar image

Hello

I have a problem with Gazebo. When I try to launch the model of a robot, I get the following message: loading xml from ros parameter model, but I never get to see the robot in the simulator. The funny thing is that yesterday it loaded the model correctly. Also, when I try to launch some model of Gazebo (a table or something simple) I get the same message and I still see nothing. So, I think that it's not a problem of my model.

Where is the problem? Thanks in advance!

I'm working on Ubuntu 12.04 and fuerte.

Regards.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by g.aterido
close date 2012-11-28 21:49:38

Comments

With roswtf I get the following error: ERROR Communication with [/empty_world_server] raised an error: ERROR The following nodes should be connected but aren't: * /empty_world_server->/empty_world_server (/clock)

g.aterido gravatar imageg.aterido ( 2012-08-05 23:14:28 -0500 )edit

With roslaunch gazebo_worlds empty_world_paused.launch I dont have this problem... Any clue?

g.aterido gravatar imageg.aterido ( 2012-08-06 00:14:29 -0500 )edit

I have the same problem on a machine with ubuntu ludid and latest fuerte from debs.

Georg gravatar imageGeorg ( 2012-08-06 04:08:00 -0500 )edit

Hi g.sterido, can you update the title of this question to something more specific, e.g. "Gazebo spawn_model hangs (wrong ros namespace)" or similar? Thanks.

hsu gravatar imagehsu ( 2012-08-07 06:27:43 -0500 )edit

Title updated! Thanks for the advice ;)

g.aterido gravatar imageg.aterido ( 2012-08-07 20:13:16 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-08-06 05:19:31 -0500

Georg gravatar image

Hi,

for a reason that I do not really understand, it helps to name the node "gazebo" instead of "empty_world_server". I changed that after comparing empty_world.launch and empty_world_paused.launch!

Best

Georg

edit flag offensive delete link more

Comments

1

Thanks! That works perfectly!

g.aterido gravatar imageg.aterido ( 2012-08-06 20:20:29 -0500 )edit
3

answered 2012-08-06 05:48:36 -0500

hsu gravatar image

A recent fix to pass through command line arguments to the ros node initialized within gazebo exposes this problem; by correctly namespacing the gazebo node with the name declared in the launch script. The spawn_model script defaults to look for gazebo services under /gazebo/ namespace, and thus fails and the gazebo node operating under /empty_world_server/(spawn_urdf_model, etc.).

The fix you suggested above is valid. Alternatively, one could also pass the additional commandline argument of gazebo_namespace to the spawn_model script, e.g.

rosrun gazebo spawn_model -gazebo_namespace empty_world_server -...
edit flag offensive delete link more

Comments

Thanks for the explanation! I would suggest to modify the standard world files in gazebo_worlds to be consistent.Best,

Georg gravatar imageGeorg ( 2012-08-06 06:11:29 -0500 )edit

@Greg thanks for the suggestion, they should all be consistent by 1.6.13. though in 1.6.12, one of them is still broken (empty_world_throttled.launch).

hsu gravatar imagehsu ( 2012-08-06 06:51:01 -0500 )edit

Thanks! I thought that my computer was going crazy. Regards

g.aterido gravatar imageg.aterido ( 2012-08-06 20:23:46 -0500 )edit

These extra arguments can be put like this no? <node name="youbot_gazebo_model" pkg="gazebo" type="spawn_model" args="-gazebo_namespace youbot_gazebo_model -urdf -param robot_description -model youBot -x 0.0 -y 0.0 -z 0.1" respawn="false" output="screen" /> I still don't see anything on my screen...

NickVT gravatar imageNickVT ( 2012-08-07 06:12:15 -0500 )edit

I can't change the name to gazebo, since I have already a node like that: <node name="gazebo" pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/empty.world" respawn="false" output="screen"></node>

NickVT gravatar imageNickVT ( 2012-08-07 06:15:55 -0500 )edit

@NickVT you should remove "-gazebo_namespace youbot_gazebo_model" from your "spawn_model" node since your gazebo node is already namespaced under the default namespace that spawn_model looks for (i.e. "/gazebo").

hsu gravatar imagehsu ( 2012-08-07 06:31:41 -0500 )edit

Hi John, without the namespace was the original situation: but Gazebo doesn't come up, there are no errors: spawn status: successfully spawned model [youbot_gazebo_model-3] process has finished cleanly Service [/gazebo/set_physics_properties] is now available. Starting to spin physics dynamic...

NickVT gravatar imageNickVT ( 2012-08-08 02:30:56 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-08-05 21:52:41 -0500

Seen: 1,023 times

Last updated: Aug 07 '12