<?xml version="1.0" encoding="utf-8"?>
<mujoco>
	<compiler angle="radian" coordinate="local" meshdir="../stls/fetch" texturedir="../textures"></compiler>
	<option timestep="0.002">
		<flag warmstart="enable"></flag>
	</option>

	<include file="shared.xml"></include>
	<actuator>
        <motor ctrllimited="true" ctrlrange="-50.0 50.0" joint="Actuator1" name="torq_j1"/>
        <motor ctrllimited="true" ctrlrange="-50.0 50.0" joint="Actuator2" name="torq_j2"/>
        <motor ctrllimited="true" ctrlrange="-30.0 30.0" joint="Actuator3" name="torq_j3"/>
        <motor ctrllimited="true" ctrlrange="-30.0 30.0" joint="Actuator4" name="torq_j4"/>
        <motor ctrllimited="true" ctrlrange="-30.0 30.0" joint="Actuator5" name="torq_j5"/>
        <motor ctrllimited="true" ctrlrange="-20.0 20.0" joint="Actuator6" name="torq_j6"/>
        <motor ctrllimited="true" ctrlrange="-20.0 20.0" joint="Actuator7" name="torq_j7"/>
        <velocity ctrllimited="true" ctrlrange="-2.1750 2.1750" joint="Actuator1" kv="10" name="vel_j1"/>
        <velocity ctrllimited="true" ctrlrange="-2.1750 2.1750" joint="Actuator2" kv="10" name="vel_j2"/>
        <velocity ctrllimited="true" ctrlrange="-2.1750 2.1750" joint="Actuator3" kv="10" name="vel_j3"/>
        <velocity ctrllimited="true" ctrlrange="-2.1750 2.1750" joint="Actuator4" kv="5" name="vel_j4"/>
        <velocity ctrllimited="true" ctrlrange="-2.6100 2.6100" joint="Actuator5" kv="5" name="vel_j5"/>
        <velocity ctrllimited="true" ctrlrange="-2.6100 2.6100" joint="Actuator6" kv="2.0" name="vel_j6"/>
        <velocity ctrllimited="true" ctrlrange="-2.6100 2.6100" joint="Actuator7" kv="2.0" name="vel_j7"/>
    </actuator> 

	<asset>
        <mesh name="link_base" file="link_base.STL" />
        <mesh name="link1" file="link1.STL" />
        <mesh name="link2" file="link2.STL" />
        <mesh name="link3" file="link3.STL" />
        <mesh name="link4" file="link4.STL" />
        <mesh name="link5" file="link5.STL" />
        <mesh name="link6" file="link6.STL" />
        <mesh name="link7" file="link7.STL" />

    </asset>

	<equality>
        <weld body1="robot0:mocap2" body2="link7" solimp="0.9 0.95 0.001" solref="0.02 1"></weld>
    </equality>

	<worldbody>
		<geom name="floor0" pos="0.8 0.75 0" size="0.85 0.7 1" type="plane" condim="3" material="floor_mat"></geom>
		<body name="floor0" pos="0.8 0.75 0">
			<site name="target0" pos="0 0 0.5" size="0.02 0.02 0.02" rgba="1 0 0 1" type="sphere"></site>
		</body>

		<include file="robot_xarm.xml"></include>
		
		<body pos="1.3 0.75 0.2" name="table0">
			<geom size="0.25 0.35 0.2" type="box" mass="2000" material="table_mat"></geom>
		</body>

		<light directional="true" ambient="0.2 0.2 0.2" diffuse="0.8 0.8 0.8" specular="0.3 0.3 0.3" castshadow="false" pos="0 0 4" dir="0 0 -1" name="light0"></light>
	</worldbody>
	
	<actuator></actuator>
</mujoco>
