gazebo crash after running plugin [closed]
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
- OS: Ubuntu 12.04 LTS 64 bit
- 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
- Graphic card : GeForce 9300M GS/PCIe/SSE2
- Graphic card driver : GeForce 9300M GS/PCIe/SSE2 ( same as graphic card) Experience : fallback
- Gazebo version: 1.6.16
- 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 ...
Hi, can you provide some more information about this crash? Please see http://ros.org/wiki/simulator_gazebo/Troubleshooting, thanks.
at the (gdb) prompt, pleast type
thread apply all bt
, then hit enter. thanks!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.
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).
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.
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.
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.
For the launch file i used in my plugin, please see update 4.