<?xml version="1.0"?>
<sdf version="1.7">
  <model name="acrobot">
    <!-- This sdf file produces a model with the default parameters documented
         in AcrobotParameters in make_acrobot_plant.h.
         They MUST be kept in sync. -->
    <link name="Link1">
      <!-- The origin of the Link1 frame is defined to be coincident with
           the origin of the x-z plane in the world frame. -->
      <pose>0 0.15 0 0 0 0</pose>
      <inertial>
        <pose>0 0 -0.5 0 0 0</pose>
        <mass>1</mass>
        <!-- This inertia is based on a solid cylinder with
             radius=0.001 meters and height=1.0 meters. -->
        <!-- For this model we could make izz = 0 however, sdformat will throw
             an exception. -->
        <inertia>
          <ixx>0.083</ixx>
          <iyy>0.083</iyy>
          <izz>5e-7</izz>
          <ixy>0</ixy>
          <ixz>0</ixz>
          <iyz>0</iyz>
        </inertia>
      </inertial>
      <visual name="Link1_visual">
        <pose>0 0 -0.5 0 0 0</pose>
        <geometry>
          <cylinder>
            <length>1.1</length>
            <radius>0.05</radius>
          </cylinder>
        </geometry>
        <material>
          <diffuse>0 1 0 1</diffuse>
        </material>
      </visual>
      <!-- A visual to show the link's pivot point -->
      <visual name="Link1_pivot_visual">
        <!-- Pose of the sphere used for visual in Link1's frame -->
        <geometry>
          <sphere>
            <radius>0.125</radius>
          </sphere>
        </geometry>
        <material>
          <diffuse>0 0 1 1</diffuse>
        </material>
      </visual>
    </link>
    <joint name="ShoulderJoint" type="revolute">
      <child>Link1</child>
      <parent>world</parent>
      <axis>
        <xyz expressed_in="__model__">0 1 0</xyz>
        <limit>
          <!-- Drake parses a zero effort joint as an un-actuated joint. -->
          <effort>0</effort>
        </limit>
        <dynamics>
          <damping>0.1</damping>
        </dynamics>
      </axis>
    </joint>
    <link name="Link2">
      <!-- The origin of the Link2 frame is defined to be coincident with
           the origin of the x-z plane in the elbow joint frame. -->
      <pose>0 0.25 -1 0 0 0</pose>
      <inertial>
        <pose>0 0 -1 0 0 0</pose>
        <mass>1</mass>
        <!-- This inertia is based on a solid cylinder with
             radius=1.0 meters and height=2.0 meters. -->
        <!-- For this model we could make izz = 0 however, sdformat will throw
             an exception. -->
        <inertia>
          <ixx>0.33</ixx>
          <iyy>0.33</iyy>
          <izz>5e-7</izz>
          <ixy>0</ixy>
          <ixz>0</ixz>
          <iyz>0</iyz>
        </inertia>
      </inertial>
      <visual name="Link2_visual">
        <pose>0 0 -1 0 0 0</pose>
        <geometry>
          <cylinder>
            <length>2.1</length>
            <radius>0.05</radius>
          </cylinder>
        </geometry>
        <material>
          <diffuse>1 0 0 1</diffuse>
        </material>
      </visual>
    </link>
    <joint name="ElbowJoint" type="revolute">
      <parent>Link1</parent>
      <child>Link2</child>
      <!-- Pose X_CJ of the joint frame J in the frame C of the child link -->
      <axis>
        <xyz expressed_in="__model__">0 1 0</xyz>
        <limit>
          <!-- No limit provided. sdformat defaults to -1, which we parse as
               an actuated joint. -->
        </limit>
        <dynamics>
          <damping>0.1</damping>
        </dynamics>
      </axis>
    </joint>
  </model>
</sdf>
