Robotics StackExchange | Archived questions

On startup of gazebo I get intermittent error

On startup of gazebo I get intermittent error. Are there any ideas on what causes this?

viki@viki:~$ roslaunch rrbot_gazebo rrbot.launch 
... logging to /home/viki/.ros/log/9899e8d6-65a5-11e3-8f5b-28cfe95d78b1/roslaunch-viki-15818.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://viki:36669/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion
 * /use_sim_time

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

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

setting /run_id to 9899e8d6-65a5-11e3-8f5b-28cfe95d78b1
process[rosout-1]: started with pid [15845]
started core service [/rosout]
process[gazebo-2]: started with pid [15859]
process[gazebo_gui-3]: started with pid [15864]
Gazebo multi-robot simulator, version 1.9.1
Copyright (C) 2013 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

Gazebo multi-robot simulator, version 1.9.1
Copyright (C) 2013 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

Msg Waiting for master.[ INFO] [1387124766.405464458]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1387124766.407054987]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.1.80

Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.1.80
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  152 (DRI2)
  Minor opcode of failed request:  3 (DRI2CreateDrawable)
  Resource id in failed request:  0x4600002
  Serial number of failed request:  29
  Current serial number in output stream:  31
gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:424: T* boost::shared_ptr<T>::operator->() const [with T = gazebo::transport::Connection]: Assertion `px != 0' failed.
Aborted (core dumped)
[gazebo_gui-3] process has died [pid 15864, exit code 134, cmd /opt/ros/hydro/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/home/viki/.ros/log/9899e8d6-65a5-11e3-8f5b-28cfe95d78b1/gazebo_gui-3.log].
log file: /home/viki/.ros/log/9899e8d6-65a5-11e3-8f5b-28cfe95d78b1/gazebo_gui-3*.log
[ INFO] [1387124767.977077948]: Loading gazebo_ros_control plugin
[ INFO] [1387124767.977224578]: Starting gazebo_ros_control plugin in namespace: /rrbot
[ INFO] [1387124767.978557316]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server.

a second random error on startup is:

Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.1.80
Exception [Master.cc:50] Unable to start server[bind: Address already in use]. There is probably another Gazebo process running.

Asked by rnunziata on 2013-12-15 11:29:27 UTC

Comments

What graphics card are you using?

Asked by SL Remy on 2014-01-05 18:55:09 UTC

I'm having the same problem. Happens frequently on all versions since I started using Gazebo about 18 months ago. This is a serious annoyance and wastes a lot of time. I've noticed it is even more frequent if other programs are continuously updating the screen (like performance monitor graphing). I'm running Ubuntu 12.04 on a generic PC. ATI Radeon HD 5450 graphics card.

Asked by BrianC on 2014-01-17 14:07:12 UTC

What are the dimensions of the window that is being rendered? (I'm assuming this is the world file, or it's a default somewhere)

Asked by SL Remy on 2014-01-21 08:46:09 UTC

It takes a bit more work to try, but this problem may be solved in Gazebo 2.2.

Asked by nkoenig on 2014-03-04 20:26:44 UTC

Answers

The first error may be related to the (graphics card) driver on your platform. One way to automate things a bit which will help to cope with the issue is to modify the node in the launch file and set respawn="True"

The second error is likely because the gazebo server is still running and has not yet been terminated. (shouldn't be an issue if the above change is made to the launch file)

This doesn't fix the original problem but it should help get Gazebo to start more smoothly for the user.

Asked by SL Remy on 2014-01-05 19:03:06 UTC

Comments

Although it is not a real fix, I have recently discovered that gazebo crashes on startup much less often under ROS when you use debug mode. Just set the debug parameter when you launch gazebo, e.g.:

roslaunch gazebo_ros empty_world.launch debug:=true

It still crashes occasionally on startup but it has saved me a lot of time. I suspect the crash is due to a threading bug in ROS or Gazebo, and the debugger alters the timing enough that it is less likely to occur.

Asked by BrianC on 2014-01-24 19:10:39 UTC

Comments

wtf haha, that actually works :P

Asked by jdddog on 2014-02-27 20:41:41 UTC