<?xml version="1.0" ?>
<sdf version="1.5">
  <world name="default">

    <physics type="ode">
      <ode>
        <solver>
          <iters>100</iters>
          <sor>1.0</sor>
        </solver>
      </ode>
      <real_time_factor>0</real_time_factor>
    </physics>

    <model name="tire">
      <pose>0 0 0.5  0 0 0</pose>

      <link name="wheel">
        <pose>0 0 0  1.5707963267948966 0 0</pose>
        <inertial>
          <mass>2.5</mass>
          <inertia>
            <ixx>0.20833333333333331</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.20833333333333331</iyy>
            <iyz>0</iyz>
            <izz>0.3125</izz>
          </inertia>
        </inertial>
        <collision name="collision">
          <geometry>
            <sphere>
              <radius>0.5</radius>
            </sphere>
            <!--
            <cylinder>
              <radius>0.5</radius>
              <length>0.5</length>
            </cylinder>
            -->
          </geometry>
          <surface>
            <contact>
              <ode>
                <max_vel>1e5</max_vel>
                <min_depth>0.0</min_depth>
                <kp>250e3</kp>
                <kd>5</kd>
              </ode>
            </contact>
            <friction>
              <ode>
                <mu>1.0</mu>
                <mu2>1.0</mu2>
                <fdir1>0 0 1</fdir1>
              </ode>
            </friction>
          </surface>
        </collision>

        <visual name="visual_indicator">
          <pose>0 0 0.2 0 0 0</pose>
          <geometry>
            <box>
              <size>0.2 0.4 0.2</size>
            </box>
          </geometry>
          <material>
            <ambient>0.8 0.2 0.2 1</ambient>
            <diffuse>0.8 0.2 0.2 1</diffuse>
            <specular>0.8 0.2 0.2 1</specular>
          </material>
        </visual>

        <visual name="visual">
          <geometry>
            <sphere>
              <radius>0.5</radius>
            </sphere>
            <!--
            <cylinder>
              <radius>0.5</radius>
              <length>0.5</length>
            </cylinder>
            -->
          </geometry>
          <material>
            <ambient>0.2 0.2 0.2 1</ambient>
            <diffuse>0.2 0.2 0.2 1</diffuse>
            <specular>0.2 0.2 0.2 1</specular>
          </material>
        </visual>
      </link>

      <link name="axle">
        <pose>0 0.35 0  0 0 0</pose>

        <inertial>
          <mass>0.5</mass>
          <inertia>
            <ixx>0.0029166</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.0029166</iyy>
            <iyz>0</iyz>
            <izz>0.0025</izz>
          </inertia>
        </inertial>

        <collision name="collision">
          <geometry>
            <cylinder>
              <radius>0.1</radius>
              <length>0.2</length>
            </cylinder>
          </geometry>
        </collision>

        <visual name="visual">
          <geometry>
            <cylinder>
              <radius>0.1</radius>
              <length>0.2</length>
            </cylinder>
          </geometry>
          <material>
            <ambient>0.2 0.8 0.2 1</ambient>
            <diffuse>0.2 0.8 0.2 1</diffuse>
            <specular>0.2 0.8 0.2 1</specular>
          </material>
        </visual>
      </link>

      <link name="upright">
        <pose>0 0.55 0.4 0 0 0</pose>

        <inertial>
          <mass>1.0</mass>
          <inertia>
            <ixx>0.08667</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.08667</iyy>
            <iyz>0</iyz>
            <izz>0.0066667</izz>
          </inertia>
        </inertial>

        <collision name="collision">
          <geometry>
            <box>
              <size>0.2 0.2 1</size>
            </box>
          </geometry>
        </collision>
        <visual name="visual">
          <geometry>
            <box>
              <size>0.2 0.2 1</size>
            </box>
          </geometry>
          <material>
            <ambient>0.2 0.2 0.8 1</ambient>
            <diffuse>0.2 0.2 0.8 1</diffuse>
            <specular>0.2 0.2 0.8 1</specular>
          </material>
        </visual>
      </link>

      <joint type="revolute" name="axle_wheel">
        <parent>axle</parent>
        <child>wheel</child>
        <axis>
          <xyz>0 0 1</xyz>
        </axis>

        <sensor name="force_torque" type="force_torque">
          <always_on>true</always_on>
          <visualize>true</visualize>
          <update_rate>1000</update_rate>
          <force_torque>
            <frame>parent</frame>
          </force_torque>
        </sensor>
      </joint>

      <joint type="revolute" name="steer">
        <parent>upright</parent>
        <child>axle</child>
        <axis>
          <xyz>0 0 1</xyz>
          <limit>
            <upper>0</upper>
            <lower>-0</lower>
          </limit>
        </axis>
      </joint>

      <joint type="prismatic" name="world_upright">
        <parent>world</parent>
        <child>upright</child>
        <axis>
          <xyz>0 0 1</xyz>
          <limit>
            <upper>0.1</upper>
            <lower>-0.1</lower>
          </limit>
        </axis>
      </joint>
      <plugin
        filename="libignition-gazebo-wheel-slip-system.so"
        name="ignition::gazebo::systems::WheelSlip">
        <wheel link_name="wheel">
          <wheel_radius>0.1</wheel_radius>
          <slip_compliance_lateral>0.01</slip_compliance_lateral>
          <slip_compliance_longitudinal>0.01</slip_compliance_longitudinal>
          <wheel_normal_force>1000</wheel_normal_force>
        </wheel>
      </plugin>
    </model>



    <model name="drum">
      <pose>0 0 -4.0  1.5707963267948966 0 0</pose>

      <link name="link">
        <inertial>
          <mass>10</mass>
          <inertia>
            <ixx>43.33333333333333</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>43.33333333333333</iyy>
            <iyz>0</iyz>
            <izz>80.0</izz>
          </inertia>
        </inertial>
        <collision name="collision">
          <geometry>
            <cylinder>
              <radius>4.0</radius>
              <length>2.0</length>
            </cylinder>
          </geometry>
          <surface>
            <contact>
              <ode>
                <max_vel>1e5</max_vel>
                <min_depth>0.0</min_depth>
              </ode>
            </contact>
            <friction>
              <ode>
                <mu>1.5</mu>
                <mu2>1.5</mu2>
              </ode>
            </friction>
          </surface>
        </collision>

        <visual name="visual">
          <geometry>
            <cylinder>
              <radius>4.0</radius>
              <length>2.0</length>
            </cylinder>
          </geometry>
          <material>
            <ambient>0.8 0.5 0.2 1</ambient>
            <diffuse>0.8 0.5 0.2 1</diffuse>
            <specular>0.8 0.5 0.2 1</specular>
          </material>
        </visual>


        <visual name='block0'>
          <pose>0.0 4.0 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block1'>
          <pose>1.035276180410083 3.8637033051562732 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block2'>
          <pose>1.9999999999999998 3.464101615137755 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block3'>
          <pose>2.82842712474619 2.8284271247461903 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block4'>
          <pose>3.4641016151377544 2.0000000000000004 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block5'>
          <pose>3.8637033051562732 1.035276180410083 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block6'>
          <pose>4.0 2.4492935982947064e-16 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block7'>
          <pose>3.8637033051562732 -1.0352761804100825 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block8'>
          <pose>3.4641016151377553 -1.9999999999999991 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block9'>
          <pose>2.8284271247461903 -2.82842712474619 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block10'>
          <pose>1.9999999999999998 -3.464101615137755 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block11'>
          <pose>1.035276180410084 -3.863703305156273 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block12'>
          <pose>4.898587196589413e-16 -4.0 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block13'>
          <pose>-1.0352761804100832 -3.8637033051562732 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block14'>
          <pose>-1.9999999999999991 -3.4641016151377553 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block15'>
          <pose>-2.8284271247461885 -2.8284271247461916 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block16'>
          <pose>-3.4641016151377535 -2.0000000000000018 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block17'>
          <pose>-3.8637033051562732 -1.0352761804100825 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block18'>
          <pose>-4.0 -7.347880794884119e-16 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block19'>
          <pose>-3.8637033051562737 1.0352761804100812 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block20'>
          <pose>-3.4641016151377544 2.0 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block21'>
          <pose>-2.8284271247461907 2.82842712474619 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block22'>
          <pose>-2.0000000000000018 3.4641016151377535 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

        <visual name='block23'>
          <pose>-1.035276180410086 3.8637033051562724 1 0 0 0</pose>
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
          <material>
            <ambient>0.0 0.0 0.0 1</ambient>
            <diffuse>0.0 0.0 0.0 1</diffuse>
            <specular>0.0 0.0 0.0 1</specular>
          </material>
        </visual>

      </link>

      <joint type="revolute" name="joint">
        <parent>world</parent>
        <child>link</child>
        <axis>
          <xyz>0 0 1</xyz>
        </axis>
      </joint>
    </model>

  </world>
</sdf>
