Stuck on MoveIt tutorial. Can't spawn the robot in Gazebo

asked 2019-08-08 15:13:42 -0500

cangyin gravatar image

updated 2019-08-11 00:50:58 -0500

Recently I've switched from Ubuntu18.04 to 16.04 and installed ROS/MoveIt...Just to say that I have little chance to switch to another version of Ubuntu or ROS/MoveIt that are compatible to each other. I am following MoveIt Setup Assistant tutorial here.

But I got stuck on spawning my robot in Gazebo.

Here is my commands:

In one terminal that source-ed both /opt/ros/kinetic/setup.bash and ./devel/setup.sh note that I didn't put the trailing debug:=true option as in the tutorial.

roslaunch gazebo_ros empty_world.launch paused:=true use_sim_time:=false gui:=true throttled:=false recording:=false

In another terminal that sourced both the setup bash files.
test.urdf is generated from MoveIt Setup Assistant.

rosrun gazebo_ros spawn_model -file   /test.urdf   -urdf -x 0 -y 0 -z 1 -model panda

But the first terminal stucks on these output:

[ INFO] [1565294406.310953973]: Finished loading Gazebo ROS API Plugin.  
[ INFO] [1565294406.313873253]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...

and the second stucks on:

[INFO] [1565293490.702020]: Loading model XML from file  
[INFO] [1565293490.702759]: Waiting for service /gazebo/spawn_urdf_model

I've tried searching for these output INFO, but can't solve it myself. Could any one help me out? Thanks in advance.

I just repeated the the steps in the tutorial before Step 9, generated urdf file as ~/test.urdf.
The behavior of the commands used in step 9 is unstable. It successfully brings me the desired GUI result as in the tutorial for about 3 times, after a (fairly) long wait. Every time I have to wait long enough to get the result, whether good or bad.

Output in the first terminal:
when successful (still with some errors):

[ INFO] [1565497660.948292941]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1565497660.957073900]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
Error [parser.cc:581] Unable to find uri[model://sun]
Error [parser.cc:581] Unable to find uri[model://ground_plane]
[ INFO] [1565497701.838876595]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1565497701.852243775]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1565497702.232617996]: Physics dynamic reconfigure ready.
[ INFO] [1565497702.289719775]: Physics dynamic reconfigure ready.
context mismatch in svga_surface_destroy
context mismatch in svga_surface_destroy
context mismatch in svga_surface_destroy
[gazebo_gui-2] process has finished cleanly
log file: /home/cangyin/.ros/log/1adac306-bbe5-11e9-86ad-000c294828d3/gazebo_gui-2*.log
^C[gazebo-1] killing on exit

when it loads the model into the GUI of Gazebo and suddenly exits:

[ INFO] [1565500450.621725661]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1565500450.624234537]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
Error [parser.cc:581] Unable to find uri[model://sun]
Error [parser.cc:581] Unable to find uri[model://ground_plane]
[ INFO] [1565501051.294873630]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1565501051.298218469]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1565501051.893533544]: Physics dynamic reconfigure ready.
[ INFO] [1565501051.898545099]: Physics dynamic reconfigure ready.
VMware: vmw_ioctl_command error 无效的参数.  (may translate as "invalid arguments.")
Aborted (core dumped)
[gazebo_gui-2] process has died [pid 122014 ...
(more)
edit retag flag offensive close merge delete

Comments

1

Can you fix your terminal outputs? They are blank right now.

adamconkey gravatar imageadamconkey ( 2019-08-08 20:28:07 -0500 )edit

Ohh, sorry. It's my fault. I'm not so familiar with the edit functions.

cangyin gravatar imagecangyin ( 2019-08-09 23:36:03 -0500 )edit

In a third terminal when these two are running can you give me the output for: rostopic list and rosservice list?

zmk5 gravatar imagezmk5 ( 2019-08-10 12:02:29 -0500 )edit

@cangyin Just so you know, the code tags don't work well on this site. So, for code/terminal text you can highlight the text and then click on the preformatted text (101010) button to enable syntax highlighting. Also, you don't need to escape characters (such as [ or ]) using the \ character

jayess gravatar imagejayess ( 2019-08-10 21:35:38 -0500 )edit

@jayess Nice, thank you very much.

cangyin gravatar imagecangyin ( 2019-08-11 00:41:41 -0500 )edit

I'm not so desired to solve the problem now. Thanks for helping me! @adamconkey@zmk5@jayess

cangyin gravatar imagecangyin ( 2019-08-11 00:47:53 -0500 )edit

Try changing the paused:= option from true to false.

zmk5 gravatar imagezmk5 ( 2019-08-11 01:41:04 -0500 )edit