<mujoco model="t1d1_3d">
    <include file="./common/visual.xml"/>
    <include file="./common/skybox.xml"/>
    <include file="./common/materials.xml"/>
    
    <option timestep="0.01" iterations="50" integrator="RK4" solver="Newton" tolerance="1e-10" gravity="0 0 0" collision="predefined" viscosity="0.0"/>

    <size njmax="500" nconmax="200" nstack="5000"/>

    <visual>
        <rgba haze=".15 .25 .35 1"/>
    </visual>

    <default>
        <joint type="hinge" pos="0 0 0" limited="false" range="-180 180" damping="0.2"/>
        <motor ctrllimited="false" ctrlrange="-1 1" gear="1"/>
		<tendon stiffness="0" damping="0.2" width="0.01"/>
		<geom material="self"/>
		<site size="0.1"/>
    </default>

    <worldbody>
        <light directional="true" diffuse=".8 .8 .8" specular=".2 .2 .2" pos="0 0 5" dir="0 0 -1"/>

        <site name="f0" pos="0 0 0" size="0.01"/>

        <body pos="0 0 0">
            <geom type="sphere" mass="1e-6" size="0.06"/>
            <joint name="s1" type="slide" axis="1 0 0" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
            <joint name="s2" type="slide" axis="0 1 0" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
            <joint name="s3" type="slide" axis="0 0 1" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
            <body pos="0 0 0">
                <geom name="lbar1" type="capsule" fromto="0 0 0  -1.057961884250790 1.832443735993672 12" mass="42.2642422330568" size="0.0271300805993088"/>
                <site name="lb1e" pos="-1.057961884250790 1.832443735993672 12"/>
                <joint name="lj1" axis="0 0 1"/>
                <joint axis="1.832443735993672 1.057961884250790 0"/>
                <body name="lbar2" pos="-1.057961884250790 1.832443735993672 12">
                    <geom name="lbar2" type="capsule" fromto="0 0 0  1.057961884250790 -1.832443735993672 12" mass="42.2638605396005" size="0.0271299580915213"/>
                    <joint name="lj2" axis="1.832443735993672 1.057961884250790 0"/>
                    <site name="lb2e" pos="1.057961884250790 -1.832443735993672 12"/>
                    <body pos="1.057961884250790 -1.832443735993672 12">
                        <geom name="lbar3" type="capsule" fromto="0 0 0  -4.367642811194428 7.564979258301711 0" mass="8.72587633150034" size="0.0145594646386997"/>
                        <joint name="lj3" axis="0 0 1"/>
                        <joint axis="1.832443735993672 1.057961884250790 0"/>
                        <site name="lb3e" pos="-4.367642811194428 7.564979258301711 0"/>
                    </body>
                    <body pos="1.057961884250790 -1.832443735993672 12">
                        <geom name="lbar4" type="capsule" fromto="0 0 0  -1.057961884250790 1.832443735993672 12" mass="42.2634598276698" size="0.0271298294789962"/>
                        <joint name="lj4" axis="0 0 1"/>
                        <joint axis="1.832443735993672 1.057961884250790 0"/>
                        <site name="lb4e" pos="-1.057961884250790 1.832443735993672 12"/>
                        <body name="lbar5" pos="-1.057961884250790 1.832443735993672 12">
                            <geom name="lbar5" type="capsule" fromto="0 0 0  1.057961884250790 -1.832443735993672 12" mass="42.263078141279" size="0.0271297069723425"/>
                            <joint name="lj5" axis="1.832443735993672 1.057961884250790 0"/>
                            <site name="lb5e" pos="1.057961884250790 -1.832443735993672 12"/>
                        </body>
                    </body>
                    <body pos="1.057961884250790 -1.832443735993672 12">
                        <geom name="mbar3" type="capsule" fromto="0 0 0  -4.367642811194428 -7.564979258301711 0" mass="8.72587633150034" size="0.0145594646386997"/>
                        <joint name="mj3" axis="0 0 1"/>
                        <joint axis="7.564979258301711 -4.367642811194428 0"/>
                        <site name="mb3e" pos="-4.367642811194428 -7.564979258301711 0"/>
                    </body>
                    <body pos="1.057961884250790 -1.832443735993672 12">
                        <geom name="rbar3" type="capsule" fromto="0 0 0  8.735285622388856 0 0" mass="8.72587633150034" size="0.0145594646386997"/>
                        <joint name="rj3" axis="0 0 1"/>
                        <joint axis="0 1 0"/>
                        <site name="rb3e" pos="8.735285622388856 0 0"/>
                    </body>
                </body>
            </body>
            
            <body pos="0 0 0">
                <geom name="mbar1" type="capsule" fromto="0 0 0  -1.057961884250790 -1.832443735993672 12" mass="42.2642422330568" size="0.0271300805993089"/>
                <site name="mb1e" pos="-1.057961884250790 -1.832443735993672 12"/>
                <joint axis="0 0 1"/>
                <joint name="mj1" axis="1.832443735993672 -1.057961884250790 0"/>
                <body name="mbar2" pos="-1.057961884250790 -1.832443735993672 12">
                    <geom name="mbar2" type="capsule" fromto="0 0 0  1.057961884250790 1.832443735993672 12" mass="42.2638605396005" size="0.0271299580915214"/>
                    <joint name="mj2" axis="1.832443735993672 -1.057961884250790 0"/>
                    <body pos="1.057961884250790 1.832443735993672 12">
                        <geom name="mbar4" type="capsule" fromto="0 0 0  -1.057961884250790 -1.832443735993672 12" mass="42.2634598276698" size="0.0271298294789962"/>
                        <joint axis="0 0 1"/>
                        <joint name="mj4" axis="1.832443735993672 -1.057961884250790 0"/>
                        <site name="mb4e" pos="-1.057961884250790 -1.832443735993672 12"/>
                        <body name="mbar5" pos="-1.057961884250790 -1.832443735993672 12">
                            <geom name="mbar5" type="capsule" fromto="0 0 0  1.057961884250790 1.832443735993672 12" mass="42.263078141279" size="0.0271297069723425"/>
                            <joint name="mj5" axis="1.832443735993672 -1.057961884250790 0"/>
                        </body>
                    </body>
                </body>
            </body>

            <body pos="0 0 0">
                <geom name="rbar1" type="capsule" fromto="0 0 0  2.115923768501580 0 12" mass="42.2642422330568" size="0.0271300805993089"/>
                <site name="rb1e" pos="2.115923768501580 0 12"/>
                <joint axis="0 0 1"/>
                <joint name="rj1" axis="0 1 0"/>
                <body name="rbar2" pos="2.115923768501580 0 12">
                    <geom name="rbar2" type="capsule" fromto="0 0 0  -2.115923768501580 0 12" mass="42.2638605396005" size="0.0271299580915214"/>
                    <joint name="rj2" axis="0 1 0"/>
                    <body pos="-2.115923768501580 0 12">
                        <geom name="rbar4" type="capsule" fromto="0 0 0  2.115923768501580 0 12" mass="42.2634598276698" size="0.0271298294789962"/>
                        <joint axis="0 0 1"/>
                        <joint name="rj4" axis="0 1 0"/>
                        <site name="rb4e" pos="2.115923768501580 0 12"/>
                        <body name="rbar5" pos="2.115923768501580 0 12">
                            <geom name="rbar5" type="capsule" fromto="0 0 0  -2.115923768501580 0 12" mass="42.263078141279" size="0.0271297069723425"/>
                            <joint name="rj5" axis="0 1 0"/>
                        </body>
                    </body>
                </body>
            </body>
        </body>
		
		<body pos="0 0 0">
			<geom name="floor" pos="0 0 0" size="0 0 1" type="plane" material="grid"/>
            <body pos="-8.735285622388856 15.129958516603422 0">
                <geom type="sphere" mass="1e-6" size="0.06"/>
                <site name="fl" pos="0 0 0"/>
                <joint name="s4" type="slide" axis="1 0 0" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
                <joint name="s5" type="slide" axis="0 1 0" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
                <joint name="s6" type="slide" axis="0 0 1" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
            </body>
            <body pos="-8.735285622388856 -15.129958516603422 0">
                <geom type="sphere" mass="1e-6" size="0.06"/>
                <site name="fm" pos="0 0 0"/>
                <joint name="s7" type="slide" axis="1 0 0" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
                <joint name="s8" type="slide" axis="0 1 0" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
                <joint name="s9" type="slide" axis="0 0 1" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
            </body>
            <body pos="17.470571244777712 0 0">
                <geom type="sphere" mass="1e-6" size="0.06"/>
                <site name="fr" pos="0 0 0"/>
                <joint name="s10" type="slide" axis="1 0 0" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
                <joint name="s11" type="slide" axis="0 1 0" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
                <joint name="s12" type="slide" axis="0 0 1" limited="true" range="-3. 3." solreflimit=".08 1" damping="5e-4"/>
            </body>
		</body>
    </worldbody>
	
	<equality>
		<connect active="true" name="c1" body1="lbar2" body2="rbar2" anchor="1.057961884250790 -1.832443735993672 12"/>
        <connect active="true" name="c2" body1="lbar5" body2="rbar5" anchor="1.057961884250790 -1.832443735993672 12"/>
        <connect active="true" name="c3" body1="lbar2" body2="mbar2" anchor="1.057961884250790 -1.832443735993672 12"/>
        <connect active="true" name="c4" body1="lbar5" body2="mbar5" anchor="1.057961884250790 -1.832443735993672 12"/>
	</equality>

    <tendon>
        <spatial name="S1">
            <site site="f0"/>
            <site site="lb2e"/>
        </spatial>
		<spatial name="S2">
            <site site="rb1e"/>
            <site site="lb1e"/>
        </spatial>
        <spatial name="S3">
            <site site="mb1e"/>
            <site site="lb1e"/>
        </spatial>
        <spatial name="S4">
            <site site="mb1e"/>
            <site site="rb1e"/>
        </spatial>
		<spatial name="S5">
            <site site="lb2e"/>
            <site site="lb5e"/>
        </spatial>
		<spatial name="S6">
            <site site="rb4e"/>
            <site site="lb4e"/>
        </spatial>
        <spatial name="S7">
            <site site="mb4e"/>
            <site site="lb4e"/>
        </spatial>
        <spatial name="S8">
            <site site="mb4e"/>
            <site site="rb4e"/>
        </spatial>
        <spatial name="S9">
            <site site="f0"/>
            <site site="lb3e"/>
        </spatial>
        <spatial name="S10">
            <site site="f0"/>
            <site site="rb3e"/>
        </spatial>
        <spatial name="S11">
            <site site="f0"/>
            <site site="mb3e"/>
        </spatial>
        <spatial name="S12">
            <site site="lb5e"/>
            <site site="lb3e"/>
        </spatial>
        <spatial name="S13">
            <site site="lb5e"/>
            <site site="rb3e"/>
        </spatial>
        <spatial name="S14">
            <site site="lb5e"/>
            <site site="mb3e"/>
        </spatial>
        <spatial name="S15">
            <site site="lb3e"/>
            <site site="rb3e"/>
        </spatial>
        <spatial name="S16">
            <site site="lb3e"/>
            <site site="mb3e"/>
        </spatial>
        <spatial name="S17">
            <site site="rb3e"/>
            <site site="mb3e"/>
        </spatial>
        <spatial name="S18">
            <site site="fl"/>
            <site site="lb3e"/>
        </spatial>
        <spatial name="S19">
            <site site="fr"/>
            <site site="rb3e"/>
        </spatial>
        <spatial name="S20">
            <site site="fm"/>
            <site site="mb3e"/>
        </spatial>
    </tendon>   

    <actuator>
        <motor tendon="S19"/>
        <motor tendon="S18"/>
        <motor tendon="S20"/>
        <motor tendon="S10"/>
        <motor tendon="S9"/>
        <motor tendon="S11"/>
        <motor tendon="S13"/>
        <motor tendon="S12"/>
        <motor tendon="S14"/>
        <motor tendon="S17"/>
        <motor tendon="S16"/>
        <motor tendon="S15"/>
        <motor tendon="S4"/>
        <motor tendon="S3"/>
        <motor tendon="S2"/>
        <motor tendon="S1"/>
        <motor tendon="S8"/>
        <motor tendon="S7"/>
		<motor tendon="S6"/>
        <motor tendon="S5"/>
    </actuator>
	
	<sensor>
		<framelinvel objtype="site" objname="f0"/>
		<framelinvel objtype="site" objname="lb1e"/>
		<framelinvel objtype="site" objname="lb2e"/>
		<framelinvel objtype="site" objname="lb3e"/>
		<framelinvel objtype="site" objname="lb4e"/>
		<framelinvel objtype="site" objname="lb5e"/>
		<framelinvel objtype="site" objname="rb3e"/>
        <framelinvel objtype="site" objname="mb3e"/>
		<framelinvel objtype="site" objname="rb1e"/>
		<framelinvel objtype="site" objname="rb4e"/>
        <framelinvel objtype="site" objname="mb1e"/>
		<framelinvel objtype="site" objname="mb4e"/>
		<framelinvel objtype="site" objname="fl"/>
        <framelinvel objtype="site" objname="fm"/>
		<framelinvel objtype="site" objname="fr"/>
	</sensor>
</mujoco>
