Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Weird collision/gravity behavior

I have a simulation with a coke can and a trash can, and I'm trying to get a robot to put the coke can in the trash can. The problem is that the coke can doesn't always fall into the trash can, sometimes it just kind of sits on top. Sometimes it falls straight in, and sometimes it falls in an incredibly slow way. Sometimes it slowly drops in and then falls the rest of the way at a normal speed.

The coke can is the one that comes with ROS's gazebo_worlds package.

I am using this model for the trashcan: http://www.3dm3.com/modelsbank/model174.htm

It is wrapped in the following URDF:

<robot name="waste_can_model">
  <link name="waste_can">
    <inertial>
      <mass value="10.0" />
      <!-- center of mass (com) is defined w.r.t. link local coordinate system -->
      <origin xyz="0 0 0.06" />
      <inertia  ixx="3.0" ixy="0.0"  ixz="0.0"  iyy="3.0"  iyz="0.0"  izz="3.0" />
    </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://vicarious/objects/3dm-wastcan2.dae" scale="0.03 0.03 0.03" />
      </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://vicarious/objects/3dm-wastcan2.dae" scale="0.03 0.03 0.03" />
      </geometry>
    </collision>
  </link>
  <gazebo reference="coke_can">
    <material>Gazebo/Red</material>
    <turnGravityOff>false</turnGravityOff>
    <kp>100000000.0</kp>
    <kd>1000000.0</kd>
  </gazebo>
</robot>

Any idea what's going wrong? Is something wrong with the mesh? Is there a way to validate the mesh?