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

occasional gazebo crash while spawning models

asked 2012-09-05 09:16:35 -0500

updated 2012-09-06 18:00:47 -0500

I am running a multi robot setup in simulation. Most of the times gazebo runs fine, but occasionally it will crash out (about 1 in 3 times). The relevant output of the launch script looks like this:

Gazebo multi-robot simulator, version 1.0.2
Copyright (C) 2011 Nate Koenig, John Hsu, Andrew Howard, and contributors.
Released under the Apache 2 License.
http://gazebosim.org

Msg Waiting for master
Msg Connected to gazebo master @ http://localhost:11345
Msg Waiting for master[ INFO] [1346872005.741139817]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...

Msg Connected to gazebo master @ http://localhost:11345
gzserver: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->() const [with T = gazebo::transport::Publisher]: Assertion `px != 0' failed.
Service call failed: transport error completing service call: unable to receive data from sender, check sender's logs for details
Service call failed: transport error completing service call: unable to receive data from sender, check sender's logs for details
Aborted (core dumped)
[ens32_world-2] process has died [pid 6080, exit code 134, cmd optirun /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gazebo /home/piyushk/ros/experimental/stacks/bwi/bwi_gazebo/worlds/ens32.world __name:=ens32_world __log:=/home/piyushk/.ros/log/ce555632-f78c-11e1-888f-848f69a9524e/ens32_world-2.log].
log file: /home/piyushk/.ros/log/ce555632-f78c-11e1-888f-848f69a9524e/ens32_world-2*.log
[person1/spawn_robot-23] process has finished cleanly
log file: /home/piyushk/.ros/log/ce555632-f78c-11e1-888f-848f69a9524e/person1-spawn_robot-23*.log
[segbot1/spawn_robot-6] process has finished cleanly
log file: /home/piyushk/.ros/log/ce555632-f78c-11e1-888f-848f69a9524e/segbot1-spawn_robot-6*.log
Error [Transport.cc:102] Unable to get topic namespaces in [50] tries.
Error [Node.cc:68] No namespace found
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_S_create
/opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gui: line 2:  6892 Aborted                 (core dumped) `rospack find gazebo`/gazebo/bin/gzclient -g `rospack find gazebo`/lib/libgazebo_ros_paths_plugin.so
[gazebo_gui-3] process has died [pid 6082, exit code 134, cmd optirun /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gui __name:=gazebo_gui __log:=/home/piyushk/.ros/log/ce555632-f78c-11e1-888f-848f69a9524e/gazebo_gui-3.log].
log file: /home/piyushk/.ros/log/ce555632-f78c-11e1-888f-848f69a9524e/gazebo_gui-3*.log
^C[segbot2/move_base-22] killing on exit
[segbot2/fake_localization-21] killing on exit
[segbot2/map_tf_provider-20] killing on exit
[segbot2/kinect_laser_narrow-19] killing on exit
[segbot2/kinect_laser-18] killing on exit
 [segbot2/pointcloud_throttle-17] killing on exit
[segbot2/openni_manager-16] killing on exit
[segbot2/spawn_robot-15] killing on exit
[segbot2/robot_state_publisher-14] killing on exit
[segbot1/move_base-13] killing on exit
[segbot1/fake_localization-12] killing on exit
[segbot1/map_tf_provider-11] killing on exit
[segbot1/kinect_laser_narrow-10] killing on exit
[segbot1/kinect_laser-9] killing on exit
[segbot1/pointcloud_throttle-8] killing on exit
[segbot1/openni_manager-7] killing on exit
[segbot1/robot_state_publisher-5] killing on exit
[bwi_map_server-4] killing on exit
Traceback (most recent call last):
  File "/home/piyushk/ros/experimental/stacks/bwi/bwi_apps/scripts/bwi_map_server", line 216, in <module>
    MapServer()
  File "/home/piyushk/ros/experimental/stacks/bwi/bwi_apps/scripts/bwi_map_server", line 151, in __init__
    rate.sleep();
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/timer.py", line 78, in sleep
    sleep(self.sleep_dur - elapsed)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/timer.py", line 133, in sleep ...
(more)
edit retag flag offensive close merge delete

Comments

one way to begin the debugging process is to start gazebo with gdb attached (i.e. roslaunch gazebo_worlds debug.launch) and look at the backtrace of gzserver when it segfaults.

hsu gravatar image hsu  ( 2012-09-06 03:59:14 -0500 )edit

@hsu: see end of updated question.

piyushk gravatar image piyushk  ( 2012-09-06 05:08:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-09-06 05:46:34 -0500

hsu gravatar image

Hi Piyushk, thanks for the backtraces, can you put the GZ_REGISTER_SYSTEM_PLUGIN macro directly into gazebo_ros_api_plugin.cpp? i.e. at the end of the file, replace:

// Register this plugin with the simulator
GZ_REGISTER_SYSTEM_PLUGIN(GazeboRosApiPlugin)
}

with

extern "C" gazebo::SystemPlugin *RegisterPlugin();
gazebo::SystemPlugin *RegisterPlugin()
{
  return new GazeboRosApiPlugin();
}

and see if the bt gives us some more detail?

thanks, John

edit flag offensive delete link more

Comments

John, I have updated the question. I cannot spot a difference. the simulator_gazebo trunk was used instead of simulator_gazebo-1.6.14 deb

piyushk gravatar image piyushk  ( 2012-09-06 07:19:21 -0500 )edit

thanks. what on line /home/piyushk/ros/simulator_gazebo/gazebo/src/gazebo_ros_api_plugin.cpp:1948?

hsu gravatar image hsu  ( 2012-09-06 15:38:25 -0500 )edit

I now see what you are driving at. Unfortunately, it was the same line as before (i.e. namespace closing brace). I recompiled gazebo with ROS_BUILD_TYPE set as Debug, and I believe more info is now available. I have updated the question with the gdb output.

piyushk gravatar image piyushk  ( 2012-09-06 18:03:09 -0500 )edit

Question Tools

Stats

Asked: 2012-09-05 09:16:35 -0500

Seen: 744 times

Last updated: Sep 06 '12