<?xml version="1.0"?>
<!--
Defines an SDF model with various types of joints used for testing the parser.
-->
<sdf xmlns:drake="http://drake.mit.edu" version="1.10">
  <world name="joint_parsing_test_world">
    <model name="joint_parsing_test">
      <link name="link1">
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.1</iyy>
            <iyz>0</iyz>
            <izz>0.1</izz>
          </inertia>
        </inertial>
      </link>
      <link name="link2">
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.1</iyy>
            <iyz>0</iyz>
            <izz>0.1</izz>
          </inertia>
        </inertial>
      </link>
      <joint name="revolute_joint" type="revolute">
        <child>link2</child>
        <parent>link1</parent>
        <axis>
          <xyz expressed_in="__model__">0 0 1</xyz>
          <limit>
            <lower>-1</lower>
            <upper>2</upper>
            <effort>100</effort>
            <velocity>100</velocity>
            <drake:acceleration>200</drake:acceleration>
          </limit>
          <dynamics>
            <damping>0.2</damping>
            <spring_reference>0</spring_reference>
            <spring_stiffness>0</spring_stiffness>
          </dynamics>
        </axis>
      </joint>
      <link name="link3">
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.1</iyy>
            <iyz>0</iyz>
            <izz>0.1</izz>
          </inertia>
        </inertial>
      </link>
      <joint name="prismatic_joint" type="prismatic">
        <child>link3</child>
        <parent>link2</parent>
        <axis>
          <xyz expressed_in="__model__">0 0 1</xyz>
          <limit>
            <lower>-2</lower>
            <upper>1</upper>
            <effort>100</effort>
            <velocity>5</velocity>
            <drake:acceleration>10</drake:acceleration>
          </limit>
          <dynamics>
            <damping>0.3</damping>
            <spring_reference>0</spring_reference>
            <spring_stiffness>0</spring_stiffness>
          </dynamics>
        </axis>
      </joint>
      <link name="link4">
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.1</iyy>
            <iyz>0</iyz>
            <izz>0.1</izz>
          </inertia>
        </inertial>
      </link>
      <joint name="revolute_joint_no_limits" type="revolute">
        <child>link4</child>
        <parent>link3</parent>
        <axis>
          <xyz expressed_in="__model__">0 0 1</xyz>
          <dynamics>
            <spring_reference>0</spring_reference>
            <spring_stiffness>0</spring_stiffness>
          </dynamics>
        </axis>
      </joint>
      <link name="link5">
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.1</iyy>
            <iyz>0</iyz>
            <izz>0.1</izz>
          </inertia>
        </inertial>
      </link>
      <joint name="ball_joint" type="ball">
        <child>link5</child>
        <parent>link4</parent>
        <axis>
          <dynamics>
            <damping>0.1</damping>
          </dynamics>
          <xyz expressed_in="__model__">0 0 1</xyz>
          <limit>
            <!-- not actuated -->
            <effort>0</effort>
          </limit>
        </axis>
      </joint>
      <link name="link6">
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.1</iyy>
            <iyz>0</iyz>
            <izz>0.1</izz>
          </inertia>
        </inertial>
      </link>
      <joint name="universal_joint" type="universal">
        <!-- This pose is relative to the parent frame (link5) which is
             coincident with the world frame.-->
        <pose>1 2 3 0 0 0</pose>
        <child>link6</child>
        <parent>link5</parent>
        <axis>
          <dynamics>
            <damping>0.1</damping>
          </dynamics>
          <limit>
            <!-- not actuated -->
            <effort>0</effort>
          </limit>
          <xyz expressed_in="__model__">0 0 1</xyz>
        </axis>
        <axis2>
          <dynamics>
            <damping>0.1</damping>
          </dynamics>
          <limit>
            <!-- not actuated -->
            <effort>0</effort>
          </limit>
          <xyz expressed_in="__model__">0 1 0</xyz>
        </axis2>
      </joint>
      <link name="link7">
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.1</iyy>
            <iyz>0</iyz>
            <izz>0.1</izz>
          </inertia>
        </inertial>
      </link>
      <frame name='frame6' attached_to='link6'/>
      <frame name='frame7' attached_to='link7'/>
      <drake:joint name="planar_joint" type="planar">
        <drake:child>frame7</drake:child>
        <drake:parent>frame6</drake:parent>
        <drake:damping>0.1 0.1 0.1</drake:damping>
      </drake:joint>
      <link name="link8">
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.1</iyy>
            <iyz>0</iyz>
            <izz>0.1</izz>
          </inertia>
        </inertial>
      </link>
      <joint name="continuous_joint" type="continuous">
        <child>link8</child>
        <parent>link7</parent>
        <axis>
          <xyz expressed_in="__model__">0 0 1</xyz>
          <dynamics>
            <spring_reference>0</spring_reference>
            <spring_stiffness>0</spring_stiffness>
          </dynamics>
        </axis>
      </joint>
      <link name="link9">
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.1</iyy>
            <iyz>0</iyz>
            <izz>0.1</izz>
          </inertia>
        </inertial>
      </link>
      <joint name="screw_joint" type="screw">
        <child>link9</child>
        <parent>link8</parent>
        <screw_thread_pitch>0.04</screw_thread_pitch>
        <axis>
          <xyz expressed_in="__model__">1 0 0</xyz>
          <dynamics>
            <damping>0.1</damping>
          </dynamics>
        </axis>
      </joint>
    </model>
    <model name="joint_parsing_test2">
      <link name="link6">
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.1</iyy>
            <iyz>0</iyz>
            <izz>0.1</izz>
          </inertia>
        </inertial>
      </link>
      <link name="link7">
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.1</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.1</iyy>
            <iyz>0</iyz>
            <izz>0.1</izz>
          </inertia>
        </inertial>
      </link>
      <frame name='frame6' attached_to='link6'/>
      <frame name='frame7' attached_to='link7'/>
      <drake:joint name="planar_joint" type="planar">
        <drake:child>frame7</drake:child>
        <drake:parent>frame6</drake:parent>
        <drake:damping>0.2 0.2 0.2</drake:damping>
      </drake:joint>
    </model>
  </world>
</sdf>
