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

gazebo crash after running plugin [closed]

asked 2012-09-10 20:22:02 -0500

ChengXiang gravatar image

updated 2012-09-13 00:48:33 -0500

Hi, I experienced crashes on gazebo while launching a world file. I will try to be as detailed as I can in describing my question, so bear with me.

I recently tried the updated gazebo plugin tutorial on fuerte. The intro plugin (simple_world_plugin) work well. Encouraged by that, I decided to try to adapt the plugins on gazebo website and run it on ROS.

What I first did was to roscreate a new package (gazebo_plugin2) for the new plugin (model manipulation). The plugin file is exactly the same as the one on the website. Then I added "rosbuild_add_library(gazebo_plugin2 src/ model_push.cc)" to my CMakeLists, and also the <export> lags as described on the Ros gazebo plugin intro tutorial to the manifest.xml. I managed to rosmake the package successfully.

I then proceeded on to creating the world file, I used the world file on gazebo website and make the relevant changes to the <plugin name="">. I used "<plugin name="model_push" filename="libgazebo_plugin2.so"/>", libgazebo_plugin2.so is what is presented in my lib folder.

In the launch file, I modified the original one by changing the first <node name=""> to "<node name="gazebo" pkg="gazebo" type="gazebo" args="$(find gazebo_plugin2)/worlds/model_push.world" respawn="false" output="screen"/>"

After that, I roslaunched the world file, gazebo worked and show me a box being push away. However, if i try to do something to gazebo now, like inserting a new model, gazebo will suddenly crash. Sometime it crash a few minute after running.

The following error are given

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

Msg Connected to gazebo master @ http://localhost:11345
[ INFO] [1347341610.090086163, 0.190000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1347341610.205054482, 3.170000000]: Starting to spin physics dynamic reconfigure node...
LightListWidget::OnLightMsg
/opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gui: line 2:  4780 Segmentation fault      (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 4777, exit code 139, cmd /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gui __name:=gazebo_gui __log:=/home/chengxiang/.ros/log/34d253d0-fbd2-11e1-a984-0017c4794a79/gazebo_gui-3.log].
log file: /home/chengxiang/.ros/log/34d253d0-fbd2-11e1-a984-0017c4794a79/gazebo_gui-3*.log

Please let me know if further information is needed.Thanks in advance.

1st update:

Hi Hsu, hope the following information suffice

  1. OS: Ubuntu 12.04 LTS 64 bit
  2. Kernel version: Linux ubuntu 3.2.0-30-generic #48-Ubuntu SMP Fri Aug 24 16:52:48 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
  3. Graphic card : GeForce 9300M GS/PCIe/SSE2
  4. Graphic card driver : GeForce 9300M GS/PCIe/SSE2 ( same as graphic card) Experience : fallback
  5. Gazebo version: 1.6.16
  6. Backtrace (I copy the gdb launch file and roslaunch it, this is the way to get backtrace right?)

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion
 * /use_sim_time

NODES
  /
    gazebo (gazebo/debug)
    gazebo_gui (gazebo/gui)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
Exception AttributeError: AttributeError ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason Gazebo Question: The Gazebo community prefers to answer questions at: http://answers.gazebosim.org by tfoote
close date 2015-06-29 02:12:50.160751

Comments

Hi, can you provide some more information about this crash? Please see http://ros.org/wiki/simulator_gazebo/Troubleshooting, thanks.

hsu gravatar image hsu  ( 2012-09-11 05:37:48 -0500 )edit

at the (gdb) prompt, pleast type thread apply all bt, then hit enter. thanks!

hsu gravatar image hsu  ( 2012-09-11 06:45:15 -0500 )edit

Sure. May I also ask how did you format the traceback in my question to the more readable form? I don't want to trouble others to edit for me every time.

ChengXiang gravatar image ChengXiang  ( 2012-09-11 06:53:17 -0500 )edit

if you try to edit your question, you should be able to see. all I did was add 4 spaces before things that should be quoted. (used vi to add the spaces).

hsu gravatar image hsu  ( 2012-09-11 07:01:34 -0500 )edit

Please look at the second update for what happened after I enter thread apply all bt. In addition, when i tried to roslaunch the gdb. launch again, a different outcome occurred with no gdb prompt. It is shown in the 3rd update.

ChengXiang gravatar image ChengXiang  ( 2012-09-12 01:39:24 -0500 )edit

Looking back, I missed the part that says "Exception [Master.cc:69] Unable to start server[Address already in use]", this usually means another instance of gazebo is running. Try this, "killall -9 gzserver gzclient", then relaunch. Also, plz post your launch file. thanks.

hsu gravatar image hsu  ( 2012-09-12 05:27:18 -0500 )edit

For the 3rd update, I shut down and on my PC again before I roslaunched gdb.launch, so i don't think there is another instance of gazebo running. The gdb.launch file is the example gdb launch file on http://ros.org/wiki/simulator_gazebo/Troubleshooting.

ChengXiang gravatar image ChengXiang  ( 2012-09-13 00:38:13 -0500 )edit

For the launch file i used in my plugin, please see update 4.

ChengXiang gravatar image ChengXiang  ( 2012-09-13 00:38:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-10-30 05:37:56 -0500

siddahuja gravatar image

updated 2012-10-30 05:38:34 -0500

Hi

I have similar issue. I believe this happens when you purposefully shutdown the load up sequence using ctrl-c. Or, while loading you close the terminal window.

Here is the debug info:

roslaunch simBotUnicycle simBotEmptyWorld.launch 
... logging to /home/sid-ros/.ros/log/fa892870-22a5-11e2-b62b-e0b9a546c315/roslaunch-sidros-G53SW-28253.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://sidros-G53SW:39098/

SUMMARY
========

PARAMETERS
 * /robot_description
 * /robot_pose_ekf/freq
 * /robot_pose_ekf/imu_used
 * /robot_pose_ekf/odom_used
 * /robot_pose_ekf/publish_tf
 * /robot_pose_ekf/sensor_timeout
 * /robot_pose_ekf/vo_used
 * /robot_state_publisher/publish_frequency
 * /robot_state_publisher/tf_prefix
 * /rosdistro
 * /rosversion
 * /use_sim_time

NODES
  /
    gazebo (gazebo/debug)
    gazebo_gui (gazebo/gui)
    robot_pose_ekf (robot_pose_ekf/robot_pose_ekf)
    robot_state_publisher (robot_state_publisher/state_publisher)
    spawn_robot (gazebo/spawn_model)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[gazebo-1]: started with pid [28276]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[gazebo_gui-2]: started with pid [28287]
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/gazebo/bin/gzserver...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

(no debugging symbols found)...done.
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[spawn_robot-3]: started with pid [28292]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[robot_state_publisher-4]: started with pid [28296]
[ WARN] [1351611279.372161513]: The root link base_footprint has an inertia specified in the URDF, but KDL does not support a root link with an inertia.  As a workaround, you can add an extra dummy link to your URDF.
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[robot_pose_ekf-5]: started with pid [28323]
Msg Waiting for master
Msg Connected to gazebo master @ http://localhost:11345
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[ INFO] [1351611279.675777569, 1419.993000000]: Initializing Odom sensor
[ INFO] [1351611279.675847860, 1419.993000000]: Odom sensor activated
[ INFO] [1351611279.685996360, 1420.015000000]: Initializing Imu sensor
[ INFO] [1351611279.686059671, 1420.015000000]: Imu sensor activated
[ INFO] [1351611279.690917444, 1420.027000000]: Kalman filter initialized ...
(more)
edit flag offensive delete link more

Comments

Hi.But in my case gazebo crashes while running.

ChengXiang gravatar image ChengXiang  ( 2012-10-30 05:54:39 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-09-10 20:22:02 -0500

Seen: 2,936 times

Last updated: Oct 30 '12