Need help with error when launch Gazebo first time.

asked 2017-01-03 10:08:19 -0500

ThangNguyen gravatar image

updated 2017-01-04 21:17:56 -0500

Hi, I am just start with Gazebo. I try to convert my URDF file to Gazebo and launch it.

I got below error when running but I am not sure what it is.

Thank you in advance.

thangnguyen@thangnguyen:~/Projects/ROSTutorial$ roslaunch master_ros view_differential_drive_robot_gazebo.launch
... logging to /home/thangnguyen/.ros/log/e37a905e-d180-11e6-83d6-58fb8403a7f0/roslaunch-thangnguyen-10757.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://thangnguyen:40859/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.6
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    spawn_urdf (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [10768]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to e37a905e-d180-11e6-83d6-58fb8403a7f0
process[rosout-1]: started with pid [10781]
started core service [/rosout]
process[gazebo-2]: started with pid [10787]
process[gazebo_gui-3]: started with pid [10799]
process[spawn_urdf-4]: started with pid [10812]
[ INFO] [1483426219.030409188]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1483426219.031334007]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
spawn_model script started
[INFO] [1483426219.176462, 0.000000]: Loading model xml from file
[INFO] [1483426219.177078, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Aborted (core dumped)
[gazebo-2] process has died [pid 10787, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /home/thangnguyen/Projects/ROSTutorial/src/master_ros/worlds/ddrobot.world __name:=gazebo __log:=/home/thangnguyen/.ros/log/e37a905e-d180-11e6-83d6-58fb8403a7f0/gazebo-2.log].
log file: /home/thangnguyen/.ros/log/e37a905e-d180-11e6-83d6-58fb8403a7f0/gazebo-2*.log
[gazebo_gui-3] process has died [pid 10799, exit code 255, cmd /opt/ros/kinetic/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/home/thangnguyen/.ros/log/e37a905e-d180-11e6-83d6-58fb8403a7f0/gazebo_gui-3.log].
log file: /home/thangnguyen/.ros/log/e37a905e-d180-11e6-83d6-58fb8403a7f0/gazebo_gui-3*.log
^C[spawn_urdf-4] killing on exit
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 313, in <module>
    sm.callSpawnService()
  File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 271, in callSpawnService
    initial_pose, self.reference_frame, self.gazebo_namespace)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/gazebo_ros/gazebo_interface.py", line 28, in spawn_urdf_model_client
    rospy.wait_for_service(gazebo_namespace+'/spawn_urdf_model')
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 159, in wait_for_service
    raise ROSInterruptException("rospy shutdown")
rospy.exceptions.ROSInterruptException: rospy shutdown
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

EDIT 1:

thangnguyen@thangnguyen:~$ /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /home/thangnguyen/Projects/ROSTutorial/src/master_ros/world/ddrobot.world
[ INFO] [1483587265.904429969]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1483587265.905117032]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1483587266.517100257, 0.023000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1483587266.571729479, 0.076000000]: Physics dynamic reconfigure ready.
edit retag flag offensive close merge delete

Comments

Is there any suggestion where should I start to find out the issue?

ThangNguyen gravatar imageThangNguyen ( 2017-01-04 09:17:33 -0500 )edit

Can you try running: /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /home/thangnguyen/Projects/ROSTutorial/src/master_ros/worlds/ddrobot.world

nkoenig gravatar imagenkoenig ( 2017-01-04 10:07:55 -0500 )edit

@nkoenig: Please find in edit 1 is the result of your cmd. Thanks

ThangNguyen gravatar imageThangNguyen ( 2017-01-04 21:18:27 -0500 )edit

Can you post your launch file?

nkoenig gravatar imagenkoenig ( 2017-01-04 21:45:47 -0500 )edit

When you told me to type in the command, I figured out that the world folder does not have s which is a typo in my launch file. This was why it did not run. Could you please change your comment to an answer so I can mark my question as answered?

ThangNguyen gravatar imageThangNguyen ( 2017-01-05 09:31:47 -0500 )edit

A typo in your launch file would cause a failure. I assume everything works after you fixed the typo?

nkoenig gravatar imagenkoenig ( 2017-01-05 09:58:31 -0500 )edit

Yes, it is. Thank you very much.

ThangNguyen gravatar imageThangNguyen ( 2017-01-05 10:06:39 -0500 )edit