<mujoco model="swimmer">
  <include file="./common/visual.xml"/>
  <include file="./common/skybox.xml"/>
  <include file="./common/materials.xml"/>

  <option timestep="0.002" density="0" integrator="Euler">
    <flag contact="disable"/>
  </option>

  <default>
    <default class="swimmer">
      <joint type="hinge" pos="0 -.05 0" axis="0 0 1" limited="false" solreflimit=".05 1" solimplimit="0 .8 .1" armature="1e-6"/>
      <default class="inertial">
        <geom type="box" size=".001 .05 .01" rgba="0 0 0 0" mass=".01"/>
      </default>
      <default class="visual">
        <geom type="capsule" size=".01" fromto="0 -.05 0 0 .05 0" material="self" mass="0"/>
      </default>
      <site size=".01" rgba="0 0 0 0"/>
    </default>
    <default class="free">
      <joint limited="false" stiffness="0" armature="0"/>
    </default>
    <motor gear="1" ctrllimited="true" ctrlrange="-1 1"/>
  </default>

  <worldbody>
    <geom name="ground" type="plane" size="2 2 0.1" material="grid"/>
    <body name="head" pos="0 0 .05" childclass="swimmer">
      <light name="light_1" diffuse=".8 .8 .8" pos="0 0 1.5"/>
      <geom name="head" type="ellipsoid" size=".02 .04 .017" pos="0 -.022 0" material="self" mass="0"/>
      <geom name="nose" type="sphere" pos="0 -.06 0" size=".004" material="effector" mass="0"/>
      <geom name="eyes" type="capsule" fromto="-.006 -.054 .005 .006 -.054 .005" size=".004" material="eye" mass="0"/>
      <camera name="tracking1" pos="0.0 -0.30000000000000004 0.75" xyaxes="1 0 0 0 1 1" mode="trackcom" fovy="60"/>
      <camera name="tracking2" pos="-1.35 0.75 0.22499999999999998" xyaxes="0 -1 0 .3 0 1" mode="trackcom" fovy="60"/>
      <camera name="eyes" pos="0 -.058 .005" xyaxes="-1 0 0 0 0 1"/>
      <joint name="rootx" class="free" type="slide" axis="1 0 0" pos="0 -.05 0"/>
      <joint name="rooty" class="free" type="slide" axis="0 1 0" pos="0 -.05 0"/>
      <joint name="rootz" class="free" type="hinge" axis="0 0 1" pos="0 -.05 0"/>
      <geom name="inertial" class="inertial"/>
      <geom name="visual" class="visual"/>
      <site name="head"/>
    <body name="segment_0" pos="0 .1 0"><geom class="visual" name="visual_0"/><geom class="inertial" name="inertial_0"/><site name="site_0"/><joint name="joint_0" range="-40.0 40.0"/><body name="segment_1" pos="0 .1 0"><geom class="visual" name="visual_1"/><geom class="inertial" name="inertial_1"/><site name="site_1"/><joint name="joint_1" range="-40.0 40.0"/><body name="segment_2" pos="0 .1 0"><geom class="visual" name="visual_2"/><geom class="inertial" name="inertial_2"/><site name="site_2"/><joint name="joint_2" range="-40.0 40.0"/><body name="segment_3" pos="0 .1 0"><geom class="visual" name="visual_3"/><geom class="inertial" name="inertial_3"/><site name="site_3"/><joint name="joint_3" range="-40.0 40.0"/><body name="segment_4" pos="0 .1 0"><geom class="visual" name="visual_4"/><geom class="inertial" name="inertial_4"/><site name="site_4"/><joint name="joint_4" range="-40.0 40.0"/><body name="segment_5" pos="0 .1 0"><geom class="visual" name="visual_5"/><geom class="inertial" name="inertial_5"/><site name="site_5"/><joint name="joint_5" range="-40.0 40.0"/><body name="segment_6" pos="0 .1 0"><geom class="visual" name="visual_6"/><geom class="inertial" name="inertial_6"/><site name="site_6"/><joint name="joint_6" range="-40.0 40.0"/><body name="segment_7" pos="0 .1 0"><geom class="visual" name="visual_7"/><geom class="inertial" name="inertial_7"/><site name="site_7"/><joint name="joint_7" range="-40.0 40.0"/></body></body></body></body></body></body></body></body></body>
    <geom name="target" type="sphere" pos="1 1 .05" size=".1" material="target"/>
    <light name="target_light" diffuse="1 1 1" pos="1 1 1.5"/>
  </worldbody>

  <sensor>
    <framepos name="nose_pos" objtype="geom" objname="nose"/>
    <framepos name="target_pos" objtype="geom" objname="target"/>
    <framexaxis name="head_xaxis" objtype="xbody" objname="head"/>
    <frameyaxis name="head_yaxis" objtype="xbody" objname="head"/>
    <velocimeter name="head_vel" site="head"/>
    <gyro name="head_gyro" site="head"/>
  </sensor>

<actuator><motor name="motor_0" joint="joint_0"/><motor name="motor_1" joint="joint_1"/><motor name="motor_2" joint="joint_2"/><motor name="motor_3" joint="joint_3"/><motor name="motor_4" joint="joint_4"/><motor name="motor_5" joint="joint_5"/><motor name="motor_6" joint="joint_6"/><motor name="motor_7" joint="joint_7"/></actuator><sensor><velocimeter name="velocimeter_0" site="site_0"/><gyro name="gyro_0" site="site_0"/><velocimeter name="velocimeter_1" site="site_1"/><gyro name="gyro_1" site="site_1"/><velocimeter name="velocimeter_2" site="site_2"/><gyro name="gyro_2" site="site_2"/><velocimeter name="velocimeter_3" site="site_3"/><gyro name="gyro_3" site="site_3"/><velocimeter name="velocimeter_4" site="site_4"/><gyro name="gyro_4" site="site_4"/><velocimeter name="velocimeter_5" site="site_5"/><gyro name="gyro_5" site="site_5"/><velocimeter name="velocimeter_6" site="site_6"/><gyro name="gyro_6" site="site_6"/><velocimeter name="velocimeter_7" site="site_7"/><gyro name="gyro_7" site="site_7"/></sensor></mujoco>
