<!-- ======================================================
	This file is part of MuJoCo.     
	Copyright 2009-2015 Roboti LLC.
	
	Model 		:: Swimmer
		
	Mujoco		:: Advanced physics simulation engine
		Source		: www.roboti.us
		Version		: 1.31
		Released 	: 23Apr16
		
	Author		:: Vikash Kumar
		Contacts 	: kumar@roboti.us
		Last edits 	: 30Apr'16, 21Jan'16, 30Nov'15, 10Oct'15
====================================================== -->
<mujoco model="swimmer (v1.31)">
	<compiler inertiafromgeom="true" angle="radian"/>
	<default>
		<joint limited="true" range="-1.5 1.5"/>
		<motor ctrllimited="true" ctrlrange="-10 10"/>
		<default class="body">
			<geom contype="1" conaffinity="1" friction="1 0.1 0.1" material="MatBody"/>
		</default>
	</default>
	
	<!--Viscosity:: water:0.000894, air:0.00001983 -->
	<!--Density:: water:1000, air:1.2 -->
	<option timestep="0.001" viscosity="0.000894" density="1000"/> 
	
	
	<asset>
		<texture type="skybox" builtin="gradient" rgb1="0.35 0.64 0.85" rgb2="0.25 0.64 0.85" width="100" height="100"/>
		<texture name="groundplane" type="2d" builtin="gradient" random=".08" rgb1="0.25 0.64 0.85" rgb2="0.2 0.6 0.85" width="200" height="10" mark="random" markrgb=".8 .8 .8"/>

		<material name="MatBody" specular="3" shininess=".5" reflectance="1" rgba=".3 .4 .35 1"/>
		<material name="MatGnd" texture="groundplane" texrepeat="3 1" specular="1" shininess="1" reflectance="0.00001"/>
	</asset>
	
	<worldbody>
		<light directional="true" cutoff="100" exponent="1" diffuse="1 1 1" specular=".1 .1 .1" pos="0 0 1.3" dir="-0 0 -1.3"/>
		<geom name="ground" material="MatGnd" type="plane" pos="0 0 0" size="10 10 1" contype="0" conaffinity="0" rgba="0.25 0.64 0.85 .2"/>
		<site name="target" type="sphere" rgba=".9 .8 .9 1" size="0.05" pos="-1 1 .03"/>
		
		<body pos="0 0 0.03" childclass="body">
			<site name="eyeL" type="sphere" size="0.02" pos="-.065 -.045 .02" rgba=".9 .4 .2 1"/>
			<site name="eyer" type="sphere" size="0.02" pos="-.065 0.045 .02" rgba=".9 .4 .2 1"/>
			<site name="head" material="MatBody" type="sphere" size="0.08" pos="0 0 0" rgba="0 0 0 1"/>
			<inertial pos="0.15 0 0" quat="0.707 0 -0.707 0" mass="2.749" diaginertia="0.03 0.03 0.001"/>
			<joint type="slide" pos="0 0 0" axis="1 0 0" limited="false"/>
			<joint type="slide" pos="0 0 0" axis="0 1 0" limited="false"/>
			<joint type="hinge" pos="0 0 0" axis="0 0 1" limited="false"/>
			<geom type="capsule" pos="0.15 0 0" quat="0.707 0 -0.707 0" size="0.07 0.15" />
			<body pos="0.3 0 0">
				<inertial pos="0.15 0 0" quat="0.707 0 -0.707 0" mass="2.749" diaginertia="0.03 0.03 0.001"/>
				<joint name="j1" type="hinge" pos="0 0 0" axis="0 0 1"/>
				<geom type="capsule" pos="0.15 0 0" quat="0.707 0 -0.707 0" size="0.065 0.15" />
				<body pos="0.3 0 0">
					<inertial pos="0.15 0 0" quat="0.707 0 -0.707 0" mass="2.749" diaginertia="0.03 0.03 0.001"/>
					<joint name="j2" type="hinge" pos="0 0 0" axis="0 0 1"/>
					<geom type="capsule" pos="0.15 0 0" quat="0.707 0 -0.707 0" size="0.06 0.15" />
					<body pos="0.3 0 0">
						<inertial pos="0.15 0 0" quat="0.707 0 -0.707 0" mass="2.749" diaginertia="0.03 0.03 0.001"/>
						<joint name="j3" type="hinge" pos="0 0 0" axis="0 0 1"/>
						<geom type="capsule" pos="0.15 0 0" quat="0.707 0 -0.707 0" size="0.055 0.15" />
						<body pos="0.3 0 0">
							<inertial pos="0.15 0 0" quat="0.707 0 -0.707 0" mass="2.749" diaginertia="0.03 0.03 0.001"/>
							<joint name="j4" type="hinge" pos="0 0 0" axis="0 0 1"/>
							<geom type="capsule" pos="0.15 0 0" quat="0.707 0 -0.707 0" size="0.05 0.15" />
						</body>
					</body>
				</body>
			</body>
		</body>
	</worldbody>
	
	<actuator>
		<motor joint="j1" gear="10"/>
		<motor joint="j2" gear="10"/>
		<motor joint="j3" gear="10"/>
		<motor joint="j4" gear="10"/>
	</actuator>

</mujoco>
