<mujoco model="baxter">
  <asset>
    <mesh name="base_link" file="meshes/torso/base_link.stl" />
    <mesh name="base_link_collision" file="meshes/torso/base_link_collision.stl" />
    <mesh name="H0" file="meshes/head/H0.stl" />
    <mesh name="H1" file="meshes/head/H1.stl" />
    <mesh name="S0" file="meshes/upper_shoulder/S0.stl" />
    <mesh name="S1" file="meshes/lower_shoulder/S1.stl" />
    <mesh name="E0" file="meshes/upper_elbow/E0.stl" />
    <mesh name="E1" file="meshes/lower_elbow/E1.stl" />
    <mesh name="W0" file="meshes/upper_forearm/W0.stl" />
    <mesh name="W1" file="meshes/lower_forearm/W1.stl" />
    <mesh name="W2" file="meshes/wrist/W2.stl" />
  </asset>
  <default>
    <default class="viz">
      <geom contype="0" conaffinity="0" group="1" type="mesh" />
    </default>
    <default class="right_col">
      <geom contype="4" conaffinity="3" group="0" />
    </default>
    <default class="left_col">
      <geom contype="2" conaffinity="5" group="0" />
    </default>
  </default>
  <contact>
    <exclude body1="right_upper_shoulder" body2="torso" />
    <exclude body1="right_upper_shoulder" body2="right_upper_elbow" />
    <exclude body1="right_lower_shoulder" body2="torso" />
    <exclude body1="left_upper_shoulder" body2="torso" />
    <exclude body1="left_upper_shoulder" body2="left_upper_elbow" />
    <exclude body1="left_lower_shoulder" body2="torso" />
    <exclude body1="collision_head_link_1" body2="torso" />
    <exclude body1="collision_head_link_2" body2="torso" />
  </contact>
  <worldbody>
    <body name="base" pos="0 0 -0.062">
      <!-- robot view -->
      <camera mode="fixed" name="robotview" pos="1.3 0 0.4" quat="0.653 0.271 0.271 0.653"/>
      <inertial pos="0 0 0" mass="10" diaginertia="0.001 0.001 0.001" />
      <!-- mount attached here -->
      <body name="collision_head_link_1" pos="0.11 0 0.75">
        <inertial pos="0 0 0" mass="0.0001" diaginertia="1e-008 1e-008 1e-008" />
        <geom name="collision_head_link_1_vis" margin="0.001" type="sphere" class="viz" size="0.001" rgba="0.8 0.3 0.3 1" pos="0 0 0" />
        <geom name="collision_head_link_1_col" margin="0.001" type="sphere" size="0.22" rgba="0.8 0.3 0.3 0.3" pos="-0.07 -0.04 0"/>
      </body>
      <body name="collision_head_link_2" pos="0.11 0 0.75">
        <inertial pos="0 0 0" mass="0.0001" diaginertia="1e-008 1e-008 1e-008" />
        <geom name="collision_head_link_2_col0" margin="0.001" type="sphere" size="0.001" rgba="0.8 0.3 0.3 0.3" pos="0 0 0" />
        <geom name="collision_head_link_2_col1" margin="0.001" type="sphere" size="0.22" rgba="0.8 0.3 0.3 0.3" pos="-0.07 0.04 0" />
      </body>
      <body name="torso" pos="0 0 0">
        <inertial pos="0 0 0" quat="0.997433 0.00167178 0.0715546 -0.00209003" mass="35.3365" diaginertia="1.87139 1.66268 0.779991" />
        <geom name="base_link_vis" margin="0.001" class="viz" mesh="base_link" rgba="0.49 0.49 0.49 1"/>
        <geom name="base_link_col" margin="0.001" type="mesh" mesh="base_link_collision"/>
        <body name="head" pos="0.06 0 0.686">
          <inertial pos="0 0 0" quat="0.339345 0.850736 -0.347392 0.201027" mass="0.547767" diaginertia="0.00474065 0.00461087 0.00199949" />
          <!-- Don't use head joint -->
          <!-- <joint limited="true" damping="0" armature=".01" name="head_pan" type="hinge" pos="0 0 0" axis="0 0 1" range="-1.5708 1.5708" /> -->
          <geom name="head_vis" margin="0.001" class="viz" rgba="0.2 0.2 0.2 1" mesh="H0" />
          <body name="screen" pos="0.1227 0 0" quat="0.453099 0.542864 0.542864 0.453099">
            <inertial pos="0 0 0" quat="0.995785 0.0113501 -0.000390852 0.0910132" mass="0.440171" diaginertia="0.0040484 0.00275826 0.00150834" />
            <geom name="screen1_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="H1" pos="0 0 -.03" euler="0 -1.57 0" />
            <geom name="screen2_vis" margin="0.001" class="viz" type="box" size="0.109 0.08 0.002" rgba="0.9 0.9 0.9 1" pos="0 -0.016 0" quat="0.991445 0.130526 0 0" />
          </body>
        </body>
        <body name="right_arm_mount" pos="0.024645 -0.219645 0.118588" quat="0.923879 0 0 -0.382684">
          <inertial pos="0 0 0" mass="0.0001" diaginertia="1e-008 1e-008 1e-008" />
          <body name="right_upper_shoulder" pos="0.055695 0 0.011038">
            <inertial pos="0.01783 0.00086 0.19127" quat="0.975667 0.0673303 -0.206117 0.0325173" mass="5.70044" diaginertia="0.0498344 0.0377511 0.0331351" />
            <joint limited="true" damping="0" armature=".01" name="right_s0" type="hinge" pos="0 0 0" axis="0 0 1" range="-1.70168 1.70168" />
            <geom name="right_s0_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="S0" />
            <geom margin="0.001" class="right_col" type="cylinder" size="0.06 0.1361" rgba="0.5 0.1 0.1 1" pos="0 0 0.1361" name="right_s0_collision"/>
            <body name="right_lower_shoulder" pos="0.069 0 0.27035" quat="0.707107 -0.707107 0 0">
              <inertial pos="0.06845 0.00269 -0.00529" quat="0.447487 0.536948 0.56425 0.439391" mass="3.22698" diaginertia="0.0278991 0.0212327 0.0112937" />
              <joint limited="true" damping="0" armature=".01" name="right_s1" type="hinge" pos="0 0 0" axis="0 0 1" range="-2.147 1.047" />
              <geom name="right_s1_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="S1" />
              <geom margin="0.001" class="right_col" type="cylinder" size="0.06 0.06" rgba="0.5 0.1 0.1 1" pos="0 0 0" name="right_s1_collision"/>
              <body name="right_upper_elbow" pos="0.102 0 0" quat="0.5 0.5 0.5 0.5">
                <inertial pos="-0.00276 0.00132 0.18086" quat="0.838995 -0.0423128 -0.121287 0.52876" mass="4.31272" diaginertia="0.0287695 0.0273625 0.011409" />
                <joint limited="true" damping="0" armature=".01" name="right_e0" type="hinge" pos="0 0 0" axis="0 0 1" range="-3.05418 3.05418" />
                <geom name="right_e0_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="E0" />
                <geom margin="0.001" class="right_col" type="cylinder" size="0.06 0.0535" rgba="0.5 0.1 0.1 1" pos="0 0 -0.0535" name="right_e0_collision"/>
                <geom margin="0.001" class="right_col" name="right_upper_elbow_col" type="cylinder" size="0.06 0.1365" pos="0 0 0.1365" rgba="0.499 0.499 0.499 1"/>
                <body name="right_lower_elbow" pos="0.069 0 0.26242" quat="0.5 -0.5 -0.5 -0.5">
                  <inertial pos="0.02611 0.00159 -0.01117" quat="0.440433 0.577149 0.562777 0.395221" mass="2.07206" diaginertia="0.0132096 0.00950002 0.00685697" />
                  <joint limited="true" damping="0" armature=".01" name="right_e1" type="hinge" pos="0 0 0" axis="0 0 1" range="-0.05 2.618" />
                  <geom name="right_e1_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="E1" />
                  <geom margin="0.001" class="right_col" type="cylinder" size="0.06 0.05" rgba="0.5 0.1 0.1 1" pos="0 0 0" name="right_e1_collision" />
                  <body name="right_upper_forearm" pos="0.10359 0 0" quat="0.5 0.5 0.5 0.5">
                    <inertial pos="-0.00168 0.0046 0.13952" quat="0.892709 -0.0256256 0.00446984 0.449882" mass="2.24665" diaginertia="0.016916 0.0165511 0.00371123" />
                    <joint limited="true" damping="0" armature=".01" name="right_w0" type="hinge" pos="0 0 0" axis="0 0 1" range="-3.059 3.059" />
                    <geom name="right_w0_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="W0" />
                    <geom margin="0.001" class="right_col" type="cylinder" size="0.06 0.044" rgba="0.5 0.1 0.1 1" pos="0 0 -0.044" name="right_w0_collision" />
                    <geom margin="0.001" class="right_col" name="right_upper_forearm_col" type="cylinder" size="0.06 0.1036" pos="0 0 0.1" rgba="0.499 0.499 0.499 1"/>
                    <body name="right_lower_forearm" pos="0.01 0 0.2707" quat="0.5 -0.5 -0.5 -0.5">
                      <inertial pos="0.06041 0.00697 0.006" quat="0.456911 0.468526 0.475683 0.587743" mass="1.60979" diaginertia="0.00708828 0.00552689 0.00379383" />
                      <joint limited="true" damping="0" armature=".01" name="right_w1" type="hinge" pos="0 0 0" axis="0 0 1" range="-1.5708 2.094" />
                      <geom name="right_w1_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="W1" />
                      <geom margin="0.001" class="right_col" type="cylinder" size="0.06 0.05" rgba="0.5 0.1 0.1 1" pos="0 0 0" name="right_w1_collision" />
                      <body name="right_wrist" pos="0.115975 0 0" quat="0.5 0.5 0.5 0.5">
                        <inertial pos="0.00198 0.00125 0.01855" quat="0.0594843 0.68926 -0.16016 0.704082" mass="0.35093" diaginertia="0.0003082 0.000269928 0.000251035" />
                        <joint limited="true" damping="0" armature=".01" name="right_w2" type="hinge" pos="0 0 0" axis="0 0 1" range="-3.059 3.059" />
                        <geom name="right_w2_vis" margin="0.001" class="viz" rgba="0.1 0.1 0.1 1" mesh="W2" />
                        <geom margin="0.001" class="right_col" type="cylinder" size="0.06 0.0825" rgba="0.1 0.1 0.1 1" pos="0 0 0" name="right_w2_collision" />
                        <body name="right_hand" pos="0 0 0.11355">
                          <!-- This sites were added for visualization. They are all standardized between models-->
                          <!-- Position mimics the gripper attachment point (right_hand) -->
                          <!--  Y-axis should be perpendicular to grasping motion, and Z-axis should point out of the robot eef -->
                          <site name="right_ee" pos="0 0 0" size="0.01 0.01 0.01" rgba="0 0 1 1" type="sphere" group="1"/>
                          <site name="right_ee_x" pos="0 0 0" size="0.005 .1"  quat="0.707105 0.707108 0 0 " rgba="1 0 0 0" type="cylinder" group="1"/>
                          <site name="right_ee_z" pos="0 0 0" size="0.005 .1" quat="0.707105 0 0 0.707108" rgba="0 0 1 0" type="cylinder" group="1"/>
                          <site name="right_ee_y" pos="0 0 0" size="0.005 .1" quat="0.707105 0 0.707108 0 " rgba="0 1 0 0" type="cylinder" group="1"/>
				          <!-- This camera points out from the eef. -->
                          <camera mode="fixed" name="right_eye_in_hand" pos="0.05 0 0" quat="0 0.707108 0.707108 0" fovy="75"/>
                          <!-- right gripper gets added here -->
                        </body>
                      </body>
                    </body>
                  </body>
                </body>
              </body>
            </body>
          </body>
        </body>
        <body name="left_arm_mount" pos="0.024645 0.219645 0.118588" quat="0.923879 0 0 0.382684">
          <inertial pos="0 0 0" mass="0.0001" diaginertia="1e-008 1e-008 1e-008" />
          <body name="left_upper_shoulder" pos="0.055695 0 0.011038">
            <inertial pos="0.01783 0.00086 0.19127" quat="0.975667 0.0673303 -0.206117 0.0325173" mass="5.70044" diaginertia="0.0498344 0.0377511 0.0331351" />
            <joint limited="true" damping="0" armature=".01" name="left_s0" type="hinge" pos="0 0 0" axis="0 0 1" range="-1.70168 1.70168" />
            <geom name="left_s0_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="S0" />
            <geom margin="0.001" class="left_col" type="cylinder" size="0.06 0.1361" rgba="0.5 0.1 0.1 1" pos="0 0 0.1361" name="left_s0_collision" />
            <body name="left_lower_shoulder" pos="0.069 0 0.27035" quat="0.707107 -0.707107 0 0">
              <inertial pos="0.06845 0.00269 -0.00529" quat="0.447487 0.536948 0.56425 0.439391" mass="3.22698" diaginertia="0.0278991 0.0212327 0.0112937" />
              <joint limited="true" damping="0" armature=".01" name="left_s1" type="hinge" pos="0 0 0" axis="0 0 1" range="-2.147 1.047" />
              <geom name="left_s1_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="S1" />
              <geom margin="0.001" class="left_col" type="cylinder" size="0.06 0.06" rgba="0.5 0.1 0.1 1" pos="0 0 0" name="left_s1_collision" />
              <body name="left_upper_elbow" pos="0.102 0 0" quat="0.5 0.5 0.5 0.5">
                <inertial pos="-0.00276 0.00132 0.18086" quat="0.838995 -0.0423128 -0.121287 0.52876" mass="4.31272" diaginertia="0.0287695 0.0273625 0.011409" />
                <joint limited="true" damping="0" armature=".01" name="left_e0" type="hinge" pos="0 0 0" axis="0 0 1" range="-3.05418 3.05418" />
                <geom name="left_e0_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="E0" />
                <geom margin="0.001" class="left_col" type="cylinder" size="0.06 0.0535" rgba="0.5 0.1 0.1 1" pos="0 0 -0.0535" name="left_e0_collision" />
                <geom margin="0.001" class="left_col" name="left_upper_elbow_col" type="cylinder" size="0.06 0.1365" pos="0 0 0.1365" rgba="0.499 0.499 0.499 1"/>
                <body name="left_lower_elbow" pos="0.069 0 0.26242" quat="0.5 -0.5 -0.5 -0.5">
                  <inertial pos="0.02611 0.00159 -0.01117" quat="0.440433 0.577149 0.562777 0.395221" mass="2.07206" diaginertia="0.0132096 0.00950002 0.00685697" />
                  <joint limited="true" damping="0" armature=".01" name="left_e1" type="hinge" pos="0 0 0" axis="0 0 1" range="-0.05 2.618" />
                  <geom name="left_e1_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="E1" />
                  <geom margin="0.001" class="left_col" type="cylinder" size="0.06 0.05" rgba="0.5 0.1 0.1 1" pos="0 0 0" name="left_e1_collision" />
                  <body name="left_upper_forearm" pos="0.10359 0 0" quat="0.5 0.5 0.5 0.5">
                    <inertial pos="-0.00168 0.0046 0.13952" quat="0.892709 -0.0256256 0.00446984 0.449882" mass="2.24665" diaginertia="0.016916 0.0165511 0.00371123" />
                    <joint limited="true" damping="0" armature=".01" name="left_w0" type="hinge" pos="0 0 0" axis="0 0 1" range="-3.059 3.059" />
                    <geom name="left_w0_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="W0" />
                    <geom margin="0.001" class="left_col" type="cylinder" size="0.06 0.044" rgba="0.5 0.1 0.1 1" pos="0 0 -0.044" name="left_w0_collision" />
                    <geom margin="0.001" class="left_col" name="left_upper_forearm_col" type="cylinder" size="0.06 0.136" pos="0 0 0.1" rgba="0.499 0.499 0.499 1"/>
                    <body name="left_lower_forearm" pos="0.01 0 0.2707" quat="0.5 -0.5 -0.5 -0.5">
                      <inertial pos="0.06041 0.00697 0.006" quat="0.456911 0.468526 0.475683 0.587743" mass="1.60979" diaginertia="0.00708828 0.00552689 0.00379383" />
                      <joint limited="true" damping="0" armature=".01" name="left_w1" type="hinge" pos="0 0 0" axis="0 0 1" range="-1.5708 2.094" />
                      <geom name="left_w1_vis" margin="0.001" class="viz" rgba="0.499 0.1 0.1 1" mesh="W1" />
                      <geom margin="0.001" class="left_col" type="cylinder" size="0.06 0.05" rgba="0.5 0.1 0.1 1" pos="0 0 0" name="left_w1_collision" />
                      <body name="left_wrist" pos="0.115975 0 0" quat="0.5 0.5 0.5 0.5">
                        <inertial pos="0.00198 0.00125 0.01855" quat="0.0594843 0.68926 -0.16016 0.704082" mass="0.35093" diaginertia="0.0003082 0.000269928 0.000251035" />
                        <joint limited="true" damping="0" armature=".01" name="left_w2" type="hinge" pos="0 0 0" axis="0 0 1" range="-3.059 3.059" />
                        <geom name="left_w2_vis" margin="0.001" class="viz" rgba="0.1 0.1 0.1 1" mesh="W2" />
                        <geom margin="0.001" class="left_col" type="cylinder" size="0.06 0.0825" rgba="0.1 0.1 0.1 1" pos="0 0 0" name="left_w2_collision" />
                        <body name="left_hand" pos="0 0 0.11355">
                          <!-- This sites were added for visualization. They are all standardized between models-->
                          <!-- Position mimics the gripper attachment point (right_hand) -->
                          <!--  Y-axis should be perpendicular to grasping motion, and Z-axis should point out of the robot eef -->
                          <site name="left_ee" pos="0 0 0" size="0.01 0.01 0.01" rgba="0 0 1 1" type="sphere" group="1"/>
                          <site name="left_ee_x" pos="0 0 0" size="0.005 .1"  quat="0.707105 0.707108 0 0 " rgba="1 0 0 0" type="cylinder" group="1"/>
                          <site name="left_ee_z" pos="0 0 0" size="0.005 .1" quat="0.707105 0 0 0.707108" rgba="0 0 1 0" type="cylinder" group="1"/>
                          <site name="left_ee_y" pos="0 0 0" size="0.005 .1" quat="0.707105 0 0.707108 0 " rgba="0 1 0 0" type="cylinder" group="1"/>
       				      <!-- This camera points out from the eef. -->
                          <camera mode="fixed" name="left_eye_in_hand" pos="0.05 0 0" quat="0 0.707108 0.707108 0" fovy="75"/>
                          <!-- left gripper gets added here -->
                        </body>
                      </body>
                    </body>
                  </body>
                </body>
              </body>
            </body>
          </body>
        </body>
      </body>
    </body>
  </worldbody>
  <actuator>

    <motor ctrllimited="true" ctrlrange="-50 50" joint="right_s0" name="torq_right_j0"/>
    <motor ctrllimited="true" ctrlrange="-100 100" joint="right_s1" name="torq_right_j1"/>
    <motor ctrllimited="true" ctrlrange="-50 50" joint="right_e0" name="torq_right_j2"/>
    <motor ctrllimited="true" ctrlrange="-50 50" joint="right_e1" name="torq_right_j3"/>
    <motor ctrllimited="true" ctrlrange="-15 15" joint="right_w0" name="torq_right_j4"/>
    <motor ctrllimited="true" ctrlrange="-15 15" joint="right_w1" name="torq_right_j5"/>
    <motor ctrllimited="true" ctrlrange="-15 15" joint="right_w2" name="torq_right_j6"/>

    <motor ctrllimited="true" ctrlrange="-50 50" joint="left_s0" name="torq_left_j0"/>
    <motor ctrllimited="true" ctrlrange="-100 100" joint="left_s1" name="torq_left_j1"/>
    <motor ctrllimited="true" ctrlrange="-50 50" joint="left_e0" name="torq_left_j2"/>
    <motor ctrllimited="true" ctrlrange="-50 50" joint="left_e1" name="torq_left_j3"/>
    <motor ctrllimited="true" ctrlrange="-15 15" joint="left_w0" name="torq_left_j4"/>
    <motor ctrllimited="true" ctrlrange="-15 15" joint="left_w1" name="torq_left_j5"/>
    <motor ctrllimited="true" ctrlrange="-15 15" joint="left_w2" name="torq_left_j6"/>


</actuator>
</mujoco>
