<?xml version="1.0" ?>
<sdf version="1.4">
  <world name="default">
    <physics type="ode">
      <gravity>0.000000 0.000000 -9.810000</gravity>
      <ode>
        <solver>
          <type>quick</type>
          <iters>250</iters>
          <precon_iters>0</precon_iters>
          <sor>1.400000</sor>
        </solver>
        <constraints>
          <cfm>0.000000</cfm>
          <erp>0.200000</erp>
          <contact_max_correcting_vel>0.000000</contact_max_correcting_vel>
          <contact_surface_layer>0.00000</contact_surface_layer>
        </constraints>
      </ode>
      <bullet>
        <solver>
          <type>sequential_impulse</type>
          <iters>250</iters>
          <sor>1.400000</sor>
        </solver>
        <constraints>
          <cfm>0.000000</cfm>
          <erp>0.200000</erp>
          <split_impulse>true</split_impulse>
          <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
          <contact_surface_layer>0.01000</contact_surface_layer>
        </constraints>
      </bullet>
      <simbody>
        <accuracy>0.001</accuracy>
        <max_transient_velocity>0.01</max_transient_velocity>
        <contact>
          <stiffness>1e8</stiffness>
          <dissipation>10</dissipation>
          <static_friction>0.15</static_friction>
          <dynamic_friction>0.1</dynamic_friction>
          <viscous_friction>0.0</viscous_friction>
        </contact>
      </simbody>
      <real_time_update_rate>0.000000</real_time_update_rate>
      <max_step_size>0.001000</max_step_size>
    </physics>

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

    <!-- test contributed by jesper -->
    <model name="boxes">
      <pose>0 0 0 0 0 1.57</pose>
      <link name="link1">
        <collision name="collision">
          <pose>0.5 0 0.5 0 0 0</pose>
          <geometry>
            <box>
              <size>1 1 1</size>
            </box>
          </geometry>
          <surface>
            <contact>
              <ode>
                <min_depth>0.01</min_depth>
              </ode>
            </contact>
            <friction>
              <bullet>
                <friction>1</friction>
                <friction2>1</friction2>
              </bullet>
              <ode>
                <mu>1</mu>
                <mu2>1</mu2>
              </ode>
            </friction>
          </surface>
        </collision>
        <visual name="visual">
          <pose>0.5 0 0.5 0 0 0</pose>
          <geometry>
            <box>
              <size>1 1 1</size>
            </box>
          </geometry>
        </visual>
        <inertial>
          <mass>100.0</mass>
          <pose>0.5 0 0.5 0 0 0</pose>
          <inertia>
            <ixx>1.0</ixx>
            <iyy>1.0</iyy>
            <izz>1.0</izz>
            <ixy>0.0</ixy>
            <ixz>0.0</ixz>
            <iyz>0.0</iyz>
          </inertia>
        </inertial>
      </link>
      <link name="link2">
        <pose>1.0 0 1.0 0 0 0</pose>
        <collision name="collision">
          <pose>0.5 0 0.5 0 0 0</pose>
          <geometry>
            <box>
              <size>1 1 1</size>
            </box>
          </geometry>
        </collision>
        <visual name="visual">
          <pose>0.5 0 0.5 0 0 0</pose>
          <geometry>
            <box>
              <size>1 1 1</size>
            </box>
          </geometry>
        </visual>
        <inertial>
          <mass>5.0</mass>
          <pose>0.5 0 0.5 0 0 0</pose>
          <inertia>
            <ixx>0.05</ixx>
            <iyy>0.05</iyy>
            <izz>0.05</izz>
            <ixy>0.0</ixy>
            <ixz>0.0</ixz>
            <iyz>0.0</iyz>
          </inertia>
        </inertial>
      </link>
      <link name="link3">
        <pose>2.0 0 2.0 0 0 0</pose>
        <collision name="collision">
          <pose>0.5 0 0.5 0 0 0</pose>
          <geometry>
            <box>
              <size>1 1 1</size>
            </box>
          </geometry>
        </collision>
        <visual name="visual">
          <pose>0.5 0 0.5 0 0 0</pose>
          <geometry>
            <box>
              <size>1 1 1</size>
            </box>
          </geometry>
        </visual>
        <inertial>
          <mass>1.0</mass>
          <pose>0.5 0.5 0.5 0 0 0</pose>
          <inertia>
            <ixx>0.001</ixx>
            <iyy>0.001</iyy>
            <izz>0.001</izz>
            <ixy>0.0</ixy>
            <ixz>0.0</ixz>
            <iyz>0.0</iyz>
          </inertia>
        </inertial>
      </link>
      <joint name="joint1" type="revolute">
        <physics>
          <provide_feedback>true</provide_feedback>
          <ode>
            <cfm_damping>true</cfm_damping>
          </ode>
        </physics>
        <axis>
          <xyz>0 1 0</xyz>
          <dynamics>
            <damping>100.000000</damping>
          </dynamics>
        </axis>
        <parent>link1</parent>
        <child>link2</child>

        <sensor name="force_torque" type="force_torque">
          <always_on>true</always_on>
          <visualize>true</visualize>
          <update_rate>30</update_rate>
        </sensor>

      </joint>
      <joint name="joint2" type="revolute">
        <physics>
          <provide_feedback>true</provide_feedback>
          <ode>
            <cfm_damping>true</cfm_damping>
          </ode>
        </physics>
        <axis>
          <xyz>0 1 0</xyz>
          <dynamics>
            <damping>30.000000</damping>
          </dynamics>
        </axis>
        <parent>link2</parent>
        <child>link3</child>
        <sensor name="force_torque" type="force_torque">
          <always_on>true</always_on>
          <visualize>true</visualize>
          <update_rate>30</update_rate>
        </sensor>
      </joint>
    </model>
  </world>
</sdf>
