Gazebo Segmentation Fault with empty world custom launch

asked 2015-09-17 09:32:22 -0600

Andrea gravatar image

updated 2015-09-17 09:33:11 -0600

Hello everybody, I am starting to work again on a project on ROS indigo and Gazebo 2.2.3 after a 2 months break and I am experiencing some stressful problems. Everything was working the last time I was using it. Today I tried to launch a complex simulation and gazebo crashed at start showing a segmentation fault error.

To track down the bug I built a very simple simulation consisting in an empty world launch. I realized that the problem is caused by the the models included either in the launch file or in the world file.

If I try to launch the following launch file

<?xml version="1.0"?>
<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find uav)/worlds/vtol.world"/>
    <arg name="paused" value="false"/>
    <arg name="gui" value="true"/>
  </include>

</launch>

the vtol.world file is the following

<?xml version="1.0"?>
<sdf version="1.4">
  <world name="vtol base world">

    <gui fullscreen='0'>
      <camera name='user_camera'>
        <pose>0.666896 -1.00743 1.30147 0 0.251643 2.20019</pose>
        <view_controller>orbit</view_controller>
      </camera>
    </gui>

    <!-- this also works for ground wheeled robots: do not modify it! -->
    <physics type="ode">
      <gravity>0 0 -9.81</gravity>
      <ode>
        <solver>
          <type>quick</type>
            <min_step_size>0.001</min_step_size>
          <iters>100</iters>
          <sor>1.3</sor>
        </solver>
          <constraints>
          <cfm>0.0001</cfm>
          <erp>0.4</erp>
          <contact_max_correcting_vel>100.0</contact_max_correcting_vel>
        </constraints>
      </ode>
    </physics>

    <include>
      <uri>model://ground_plane</uri>
    </include>
    <include>
      <uri>model://sun</uri>
    </include>
  </world>
</sdf>

Launching this fails and gazebo crashes due to segmentation fault. Removing the following part, solves the issue

    <include>
      <uri>model://ground_plane</uri>
    </include>
    <include>
      <uri>model://sun</uri>
    </include>

where the two referred models are from the gazebo models library. Of course this is not a solutions since I include model quite often. In my .bashrc file I have added the following lines

# gazebo model path
export GAZEBO_PLUGIN_PATH=$GAZEBO_PLUGIN_PATH:$HOME/Projects/2015a_Nicastro_HeterogeneousMultirobot/devel
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:`rospack find uav`/description:`rospack find ugv`/description
export GAZEBO_RESOURCE_PATH=$GAZEBO_RESOURCE_PATH:`rospack find uav`/description:`rospack find uav`/description/materials:`rospack find ugv`/description

I do not understand what is wrong. Has anyone any clue?

Thank you very much.

Andrea

edit retag flag offensive close merge delete

Comments

I was able to run the world file in standalone gazebo just fine (no ROS). Can you do the same on your box? For debugging you could try to add the debug argument to the launch file.

Jose Luis Rivero gravatar imageJose Luis Rivero ( 2015-09-22 18:16:38 -0600 )edit

Actually after few rebootings (for other reasons) everything started to work. I don't know how it is even possible.

Andrea gravatar imageAndrea ( 2015-09-23 07:29:34 -0600 )edit