How to spawn a model on ROS Groovy Gazebo without falling down?

asked 2014-08-02 06:10:06 -0500

sam gravatar image

updated 2014-08-02 06:18:00 -0500

I use ROS Groovy and ubuntu 12.04.

I can successfully adding a table on gazebo.

I also can spawn a coke_can object stable without falling down on a table.

But when I spawn the testtubeshelf.urdf, it fall down everytime.

How to fix it?

Thank you~

The following is the details.

coke_can.urdf :

<robot name="coke_can_model">
  <link name="coke_can">
    <inertial>
      <mass value="0.1" />
      <!-- center of mass (com) is defined w.r.t. link local coordinate system -->
      <origin xyz="0 0 0.06" /> 
      <inertia  ixx="0.1" ixy="0.0"  ixz="0.0"  iyy="0.1"  iyz="0.0"  izz="0.1" />
    </inertial>
    <visual>
      <!-- visual origin is defined w.r.t. link local coordinate system -->
      <origin xyz="0 0 -0.18" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://sam_pr2_lab_auto_scene_6/urdf/coke_can.dae" scale="0.001 0.001 0.001" />
      </geometry>
    </visual>
    <collision>
      <!-- collision origin is defined w.r.t. link local coordinate system -->
      <origin xyz="0 0 -0.18" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://sam_pr2_lab_auto_scene_6/urdf/coke_can.dae" scale="0.001 0.001 0.001" />
      </geometry>
    </collision>
  </link>
  <gazebo reference="coke_can">
    <material>Gazebo/Red</material>
    <turnGravityOff>false</turnGravityOff>
    <kp>100000000.0</kp>
    <kd>1000000.0</kd>
  </gazebo>
</robot>

Here is the dae file link.

testtubeshelf.urdf :

<robot name="test_tube_shelf_model">
  <link name="test_tube_shelf">
    <inertial>
      <mass value="0.1" />
      <!-- center of mass (com) is defined w.r.t. link local coordinate system -->
      <origin xyz="0 0 0.06" /> 
      <inertia  ixx="0.1" ixy="0.0"  ixz="0.0"  iyy="0.1"  iyz="0.0"  izz="0.1" />
    </inertial>
    <visual>
      <!-- visual origin is defined w.r.t. link local coordinate system -->
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://sam_pr2_lab_auto_scene_6/urdf/test_tube_shelf.dae" scale="0.1 0.1 0.1" />
      </geometry>
    </visual>
    <collision>
      <!-- collision origin is defined w.r.t. link local coordinate system -->
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://sam_pr2_lab_auto_scene_6/urdf/test_tube_shelf.dae" scale="0.1 0.1 0.1" />
      </geometry>
    </collision>
  </link>
  <gazebo reference=" test_tube_shelf ">
    <material>Gazebo/Red</material>
    <turnGravityOff>false</turnGravityOff>
    <kp>100000000.0</kp>
    <kd>1000000.0</kd>
  </gazebo>
</robot>

testtubeshelf.dae :

<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
  <asset>
    <contributor>
      <author>Blender User</author>
      <authoring_tool>Blender 2.65.0 r52859</authoring_tool>
    </contributor>
    <created>2014-07-25T10:15:56</created>
    <modified>2014-07-25T10:15:56</modified>
    <unit name="meter" meter="1"/>
    <up_axis>Z_UP</up_axis>
  </asset>
  <library_images/>
  <library_effects/>
  <library_geometries>
    <geometry id="Square_Rack-mesh" name="Square Rack">
      <mesh>
        <source id="Square_Rack-mesh-positions">
          <float_array id="Square_Rack-mesh-positions-array" count="672">-17.625 -11.75 0 -17.625 -11.75 25 -17.625 11.75 0 -17.625 11.75 25 17.625 -11.75 0 17.625 -11.75 25 17.625 11.75 0 17.625 11.75 25 -10.79494 -11.29144 25 0.9550991 11.2914 25 10.7949 11.2914 25 -12.70507 -11.29144 25 -14.5 -10.63814 ...
(more)
edit retag flag offensive close merge delete