Robotics StackExchange | Archived questions

Process dies when spawning model with laser sensor

I have been trying to spawn a simple model of Pioneer 3AT, but whenever I try loading it, the gzserver dies. I tryed changing the sensor for a camera, it spawns without any issue. I am using ros, so that's how I started :

roslaunch pioneer_gazebo pioneer.launch

Then I got:

... logging to /home/bruno/.ros/log/a8df0c6e-2b60-11e3-9451-ccaf78b21d23/roslaunch-Companion-4670.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://Companion:40966/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion
 * /use_sim_time

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

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[gazebo-1]: started with pid [4688]
process[gazebo_gui-2]: started with pid [4693]
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] [1380718934.440641791]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1380718934.443733504]: 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.0.15

Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.0.15
[ INFO] [1380718935.383049465, 0.025000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1380718935.470402208, 0.099000000]: Physics dynamic reconfigure ready.
Error [Param.cc:181] Unable to set value [1,0471975511965976] for key[horizontal_fov]
Error [Param.cc:181] Unable to set value [0,100000001] for key[near]

I have been getting this errors in parameters, if anyone knows how to solve that, I don't know if it is what causes the process to die.

After that, I span the model with this command:

rosrun gazebo_ros spawn_model -file `rospack find pioneer_description`/urdf/Pioneer3at.urdf -urdf -x 0 -y 0 -z 1 -Y -1.57 -model Pioneer

I get this:

spawn_model script started
[INFO] [WallTime: 1380719201.190478] [0.000000] Loading model xml from file
[INFO] [WallTime: 1380719201.191005] [0.000000] Waiting for service /gazebo/spawn_urdf_model
[INFO] [WallTime: 1380719201.193276] [260.162000] Calling service /gazebo/spawn_urdf_model
[INFO] [WallTime: 1380719201.458711] [260.329000] Spawn status: SpawnModel: Successfully spawned model

But at the terminal running gazebo, I get this:

[ INFO] [1380719201.458306323, 260.329000000]: LoadThread function completed
Segmentation fault (core dumped)
[gazebo-1] process has died [pid 4688, exit code 139, cmd /opt/ros/hydro/lib/gazebo_ros/gzserver /home/bruno/catkin_ws/src/pioneer_gazebo/worlds/pioneer.world __name:=gazebo __log:=/home/bruno/.ros/log/a8df0c6e-2b60-11e3-9451-ccaf78b21d23/gazebo-1.log].
log file: /home/bruno/.ros/log/a8df0c6e-2b60-11e3-9451-ccaf78b21d23/gazebo-1*.log

And that's it all the time I try to spawn the model. Here is the Pioneer3at.urdf:

<robot name="Pioneer">

 <link name="base_link">
  <visual>
   <geometry>
    <box size=".4 .25 .20"/>
   </geometry>
   <material name="red">
    <color rgba="1 0 0 1"/>
   </material>
  </visual>
  <collision>
   <geometry>
    <box size=".25 .25 .20"/>
   </geometry>
   <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
  <inertial>
   <origin xyz="0 0 0.1" rpy="0 0 0"/>
   <mass value="25"/>
   <inertia 
    ixx="0.21354" ixy="0.0" ixz="0.0" 
    iyy="0.41667" iyz="0.0" 
    izz="0.46354"/>
  </inertial>
 </link>

 <gazebo reference="base_link">
  <material>Gazebo/Red</material>
 </gazebo>

 <link name="base_front">
  <visual>
   <geometry>
    <cylinder radius=".125" length=".2"/>
   </geometry>
   <material name="red">
    <color rgba="1 0 0 1"/>
   </material>
  </visual>
  <collision>
   <geometry>
    <cylinder radius=".125" length=".2"/>
   </geometry>
   <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
  <inertial>
   <origin xyz="0 0 0.1" rpy="0 0 0"/>
   <mass value="5"/>
   <inertia 
    ixx="0.0361979" ixy="0.0" ixz="0.0" 
    iyy="0.0361979" iyz="0.0" 
    izz="0.0390625"/>
  </inertial>
 </link>

 <joint name="baseBottomConect" type="fixed">
  <origin xyz=".15 0 0"/>
  <parent link="base_link"/>
  <child link="base_front"/>
 </joint>

 <link name="base_plataform">
  <visual>
   <geometry>
    <box size=".4 .3 .005"/>
   </geometry>
   <material name="red">
    <color rgba="1 0 0 1"/>
   </material>
  </visual>
  <collision>
   <geometry>
    <box size=".25 .3 .005"/>
   </geometry>
   <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
  <inertial>
   <origin xyz="0 0 0.0025" rpy="0 0 0"/>
   <mass value=".5"/>
   <inertia 
    ixx=".00375104" ixy="0.0" ixz="0.0" 
    iyy=".00666771" iyz="0.0" 
    izz="0.0104167"/>
  </inertial>
 </link>

 <joint name="baseTop" type="fixed">
  <origin xyz="0 0 .1025"/>
  <parent link="base_link"/>
  <child link="base_plataform"/>
 </joint>

 <link name="base_vanguard">
  <visual>
   <geometry>
    <cylinder radius="0.15" length="0.005"/>
   </geometry>
   <material name="red">
    <color rgba="1 0 0 1"/>
   </material>
  </visual>
  <collision>
   <geometry>
    <cylinder radius="0.15" length="0.005"/>
   </geometry>
   <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
  <inertial>
   <origin xyz="0 0 0.0025" rpy="0 0 0"/>
   <mass value=".3"/>
   <inertia 
    ixx=".001688125" ixy="0.0" ixz="0.0" 
    iyy=".001688125" iyz="0.0" 
    izz=".003375"/>
  </inertial>
 </link>

 <joint name="basePlataform" type="fixed">
  <origin xyz="0.15 0 0"/>
  <parent link="base_plataform"/>
  <child link="base_vanguard"/>
 </joint>

 <link name="base_wheel1">
  <origin rpy="0 0 0"/>
  <visual>
   <geometry>
    <cylinder radius="0.105" length="0.08"/>
   </geometry>
   <material name="black">
    <color rgba="0 0 0 1"/>
   </material>
  </visual>
  <collision>
   <geometry>
    <cylinder radius="0.105" length="0.08"/>
   </geometry>
   <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
  <inertial>
   <origin xyz="0 0 0.04" rpy="0 0 0"/>
   <mass value="1"/>
   <inertia 
    ixx=".00328958" ixy="0.0" ixz="0.0" 
    iyy=".00328958" iyz="0.0" 
    izz=".0055125"/>
  </inertial>
 </link>

 <joint name="wheelConnect1" type="continuous">
  <origin xyz=".15 -.165 -.1" rpy="-1.5708 0 0"/>
  <axis xyz="0 0 1"/>
  <parent link="base_link"/>
  <child link="base_wheel1"/>
 </joint>

 <link name="base_wheel2">
  <origin rpy="0 0 0"/>
  <visual>
   <geometry>
    <cylinder radius="0.105" length="0.08"/>
   </geometry>
   <material name="black">
    <color rgba="0 0 0 1"/>
   </material>
  </visual>
  <collision>
   <geometry>
    <cylinder radius="0.105" length="0.08"/>
   </geometry>
   <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
  <inertial>
   <origin xyz="0 0 0.04" rpy="0 0 0"/>
   <mass value="1"/>
   <inertia 
    ixx=".00328958" ixy="0.0" ixz="0.0" 
    iyy=".00328958" iyz="0.0" 
    izz=".0055125"/>
  </inertial>
 </link>

 <joint name="wheelConnect2" type="continuous">
  <origin xyz=".15 .165 -.1" rpy="-1.5708 0 0"/>
  <axis xyz="0 0 1"/>
  <parent link="base_link"/>
  <child link="base_wheel2"/>
 </joint>

 <link name="base_wheel3">
  <origin rpy="0 0 0"/>
  <visual>
   <geometry>
    <cylinder radius="0.105" length="0.08"/>
   </geometry>
   <material name="black">
    <color rgba="0 0 0 1"/>
   </material>
  </visual>
  <collision>
   <geometry>
    <cylinder radius="0.105" length="0.08"/>
   </geometry>
   <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
  <inertial>
   <origin xyz="0 0 0.04" rpy="0 0 0"/>
   <mass value="1"/>
   <inertia 
    ixx=".00328958" ixy="0.0" ixz="0.0" 
    iyy=".00328958" iyz="0.0" 
    izz=".0055125"/>
  </inertial>
 </link>

 <joint name="wheelConnect3" type="continuous">
  <origin xyz="-.15 -.165 -.1" rpy="-1.5708 0 0"/>
  <axis xyz="0 0 1"/>
  <parent link="base_link"/>
  <child link="base_wheel3"/>
 </joint>

 <link name="base_wheel4">
  <origin rpy="0 0 0"/>
  <visual>
   <geometry>
    <cylinder radius="0.105" length="0.08"/>
   </geometry>
   <material name="black">
    <color rgba="0 0 0 1"/>
   </material>
  </visual>
  <collision>
   <geometry>
    <cylinder radius="0.105" length="0.08"/>
   </geometry>
   <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
  <inertial>
   <origin xyz="0 0 0.04" rpy="0 0 0"/>
   <mass value="1"/>
   <inertia 
    ixx=".00328958" ixy="0.0" ixz="0.0" 
    iyy=".00328958" iyz="0.0" 
    izz=".0055125"/>
  </inertial>
 </link>

 <joint name="wheelConnect4" type="continuous">
  <origin xyz="-.15 .165 -.1" rpy="-1.5708 0 0"/>
  <axis xyz="0 0 1"/>
  <parent link="base_link"/>
  <child link="base_wheel4"/>
 </joint>

 <link name="base_laser">
  <visual>
   <geometry>
    <box size=".15 .15 .1"/>
   </geometry>
   <material name="black">
    <color rgba="0 0 0 1"/>
   </material>
  </visual>
  <collision>
   <geometry>
    <box size=".15 .15 .1"/>
   </geometry>
   <contact_coefficients mu="0" kp="1000.0" kd="1.0"/>
  </collision>
  <inertial>
   <origin xyz="0 0 0.04" rpy="0 0 0"/>
   <mass value=".8"/>
   <inertia 
    ixx=".004166667" ixy="0.0" ixz="0.0" 
    iyy=".004166667" iyz="0.0" 
    izz=".003"/>
  </inertial>
 </link>

 <joint name="laserConnect" type="fixed">
  <origin xyz=".15 0 .05" />
  <parent link="base_plataform"/>
  <child link="base_laser"/>
 </joint>


  <!-- hokuyo -->
  <gazebo reference="base_laser">
    <sensor type="gpu_ray" name="head_hokuyo_sensor">
      <pose>0 0 0 0 0 0</pose>
      <visualize>true</visualize>
      <update_rate>40</update_rate>
      <ray>
        <scan>
          <horizontal>
            <samples>720</samples>
            <resolution>1</resolution>
            <min_angle>-1.570796</min_angle>
            <max_angle>1.570796</max_angle>
          </horizontal>
        </scan>
        <range>
          <min>0.10</min>
          <max>30.0</max>
          <resolution>0.01</resolution>
        </range>
        <noise>
          <type>gaussian</type>
          <!-- Noise parameters based on published spec for Hokuyo laser
               achieving "+-30mm" accuracy at range < 10m.  A mean of 0.0m and
               stddev of 0.01m will put 99.7% of samples within 0.03m of the true
               reading. -->
          <mean>0.0</mean>
          <stddev>0.01</stddev>
        </noise>
      </ray>
      <plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_gpu_laser.so">
        <topicName>/pioneer/laser/scan</topicName>
        <frameName>base_laser</frameName>
      </plugin>
    </sensor>
  </gazebo>

</robot>

I am using Ubuntu 13.04 with ROS Hydro and the recommended Gazebo version, 1.9

Asked by Alasknnj on 2013-10-02 08:24:46 UTC

Comments

Answers