<mujoco model='ZeWalk'>
    <compiler angle="degree" inertiafromgeom="true"/>
    <default>
        <joint armature="1" damping="1" limited="true"/>
        <geom conaffinity="1" condim="1" contype="1" margin="0.001" material="geom" rgba="0.8 0.6 .4 1"/>
        <motor ctrllimited="true" ctrlrange="-.4 .4"/>
    </default>
    <option integrator="RK4" iterations="50" solver="PGS" timestep="0.003">
        <!-- <flags solverstat="enable" energy="enable"/>-->
    </option>
    <size nkey="5" nuser_geom="1"/>

    <visual>
        <map fogend="5" fogstart="3"/>
    </visual>

    <asset>
        <texture builtin="gradient" height="100" rgb1=".4 .5 .6" rgb2="0 0 0" type="skybox" width="100"/>
        <!-- <texture builtin="gradient" height="100" rgb1="1 1 1" rgb2="0 0 0" type="skybox" width="100"/>-->
        <texture builtin="flat" height="1278" mark="cross" markrgb="1 1 1" name="texgeom" random="0.01" rgb1="0.8 0.6 0.4" rgb2="0.8 0.6 0.4" type="cube" width="127"/>
        <texture builtin="checker" height="100" name="texplane" rgb1="0 0 0" rgb2="0.8 0.8 0.8" type="2d" width="100"/>
        <material name="MatPlane" reflectance="0.5" shininess="1" specular="1" texrepeat="60 60" texture="texplane"/>
        <material name="geom" texture="texgeom" texuniform="true"/>
    </asset>

    <worldbody>
        <light cutoff="100" diffuse="1 1 1" dir="-0 0 -1.3" directional="true" exponent="1" pos="0 0 1.3" specular=".1 .1 .1"/>
        <geom condim="3" friction="1.5 .1 .1" material="MatPlane" name="floor" pos="0 0 0" rgba="0.8 0.9 0.8 1" size="20 20 0.125" type="plane"/>

        <body name='torso' pos='0 0 1.4'>
            <joint name='root' type='free' pos='0 0 0' limited='false' damping='0' armature='0' stiffness='0'/>
            <geom name='torso1' type='capsule' fromto='0 -.07 0 0 .07 0'  size='0.07' />
            <geom name="head" pos="0 0 .19" size=".09" type="sphere" user="258" />
            <geom name='uwaist' type='capsule' fromto='-.01 -.06 -.12 -.01 .06 -.12' size='0.06' />
            <body name='lwaist' pos='-.01 0 -0.260' quat='1.000 0 -0.002 0' >
                <geom name='lwaist' type='capsule' fromto='0 -.06 0 0 .06 0'  size='0.06'  />
                <joint name='abdomen_z' type='hinge' pos='0 0 0.065' axis='0 0 1' range='-45 45' damping='5' stiffness='20' armature='0.02' />
                <joint name='abdomen_y' type='hinge' pos='0 0 0.065' axis='0 1 0' range='-75 30' damping='5' stiffness='10' armature='0.02' />
                <body name='pelvis' pos='0 0 -0.165' quat='1.000 0 -0.002 0' >
                    <joint name='abdomen_x' type='hinge' pos='0 0 0.1' axis='1 0 0' range='-35 35' damping='5' stiffness='10' armature='0.02' />
                    <geom name='butt' type='capsule' fromto='-.02 -.08 0 -.02 .08 0'  size='0.09'  />
                    <body name='right_thigh' pos='0 -0.10 -0.04' >
                        <joint name='right_hip_x' type='hinge' pos='0 0 0' axis='1 0 0' range='-25 5'   damping='5' stiffness='10' armature='0.01' />
                        <joint name='right_hip_z' type='hinge' pos='0 0 0' axis='0 0 1' range='-60 35'  damping='5' stiffness='10' armature='0.01' />
                        <joint name='right_hip_y' type='hinge' pos='0 0 0' axis='0 1 0' range='-110 20' damping='5' stiffness='20' armature='0.0080' />
                        <geom name='right_thigh1' type='capsule' fromto='0 0 0 0 0.01 -.34'  size='0.06' />
                        <body name='right_shin' pos='0 0.01 -0.403' >
                            <joint name='right_knee' type='hinge' pos='0 0 .02' axis='0 -1 0' range='-160 5' armature='0.0060' />
                            <geom name='right_shin1' type='capsule' fromto='0 0 0 0 0 -.3'   size='0.049' />
                            <body name='right_foot' pos='0 0 -.39' >
                                <joint name='right_ankle_y' type='hinge' pos='0 0 0.08' axis='0 1 0'   range='-40 40' stiffness='4' armature='0.0008' />
                                <joint name='right_ankle_z' type='hinge' pos='0 0 0.04' axis='0 0 1' range='-40 40' stiffness='1'  armature='0.0006' />
                                <joint name='right_ankle_x' type='hinge' pos='0 0 0.04' axis='1 0 0' range='-40 40' stiffness='1'  armature='0.0006' />
                                <geom name="right_foot_cap1" type="capsule" fromto="-.07 -0.02 0 0.14 -0.04 0" size="0.027"/>
                                <geom name="right_foot_cap2" type="capsule" fromto="-.07 0 0 0.14  0.02 0" size="0.027"/>
                            </body>
                        </body>
                    </body>
                    <body name='left_thigh' pos='0 0.10 -0.04' >
                        <joint name='left_hip_x' type='hinge' pos='0 0 0' axis='-1 0 0' range='-25 5'  damping='5' stiffness='10' armature='0.01' />
                        <joint name='left_hip_z' type='hinge' pos='0 0 0' axis='0 0 -1' range='-60 35' damping='5' stiffness='10' armature='0.01' />
                        <joint name='left_hip_y' type='hinge' pos='0 0 0' axis='0 1 0' range='-120 20' damping='5' stiffness='20' armature='0.01' />
                        <geom name='left_thigh1' type='capsule' fromto='0 0 0 0 -0.01 -.34'  size='0.06' />
                        <body name='left_shin' pos='0 -0.01 -0.403' >
                            <joint name='left_knee' type='hinge' pos='0 0 .02' axis='0 -1 0' range='-160 5' stiffness='1' armature='0.0060' />
                            <geom name='left_shin1' type='capsule' fromto='0 0 0 0 0 -.3'   size='0.049' />
                            <body name='left_foot' pos='0 0 -.39' >
                                <joint name='left_ankle_y' type='hinge' pos='0 0 0.08' axis='0 1 0' range='-40 40'  stiffness='4' armature='0.0008' />
                                <joint name='left_ankle_z' type='hinge' pos='0 0 0.04' axis='0 0 1' range='-40 40'  stiffness='1'  armature='0.0006' />
                                <joint name='left_ankle_x' type='hinge' pos='0 0 0.04' axis='-1 0 0' range='-40 40'  stiffness='1'  armature='0.0006' />
                                <geom name="left_foot_cap1" type="capsule" fromto="-.07 0.02 0 0.14 0.04 0" size="0.027"/>
                                <geom name="left_foot_cap2" type="capsule" fromto="-.07 0 0 0.14  -0.02 0" size="0.027"/>
                            </body>
                        </body>
                    </body>
                </body>
            </body>
            <body name='right_upper_arm' pos='0 -0.17 0.06' >
                <joint name='right_shoulder1' type='hinge' pos='0 0 0' axis='2 1 1'  range='-85 60' stiffness='1' armature='0.0068' />
                <joint name='right_shoulder2' type='hinge' pos='0 0 0' axis='0 -1 1' range='-85 60' stiffness='1'  armature='0.0051' />
                <geom name='right_uarm1' type='capsule' fromto='0 0 0 .18 -.18 -.18'  size='0.04 0.16' />
                <body name='right_lower_arm' pos='.18 -.18 -.18' >
                    <joint name='right_elbow' type='hinge' pos='0 0 0' axis='0 -1 1' range='-90 50'  stiffness='0' armature='0.0028' />
                    <geom name='right_larm' type='capsule' fromto='0.01 0.01 0.01 .19 .19 .19'  size='0.031' />
                    <geom name='right_hand' type='sphere' pos='.18 .18 .18'  size='0.04' />
                </body>
            </body>
            <body name='left_upper_arm' pos='0 0.17 0.06' >
                <joint name='left_shoulder1' type='hinge' pos='0 0 0' axis='2 -1 1' range='-60 85' stiffness='1' armature='0.0068' />
                <joint name='left_shoulder2' type='hinge' pos='0 0 0' axis='0 1 1' range='-60 85'  stiffness='1' armature='0.0051' />
                <geom name='left_uarm1' type='capsule' fromto='0 0 0 .18 .18 -.18'  size='0.04 0.16'  />
                <body name='left_lower_arm' pos='.18 .18 -.18' >
                    <joint name='left_elbow' type='hinge' pos='0 0 0' axis='0 -1 -1' range='-90 50' stiffness='0' armature='0.0028' />
                    <geom name='left_larm' type='capsule' fromto='0.01 -0.01 0.01 .19 -.19 .19'  size='0.031'  />
                    <geom name='left_hand' type='sphere' pos='.18 -.18 .18'  size='0.04' />
                </body>
            </body>
        </body>
    </worldbody>

    <tendon>
        <fixed name="left_hipknee">
            <joint coef="-1" joint="left_hip_y"/>
            <joint coef="1" joint="left_knee"/>
        </fixed>
        <fixed name="right_hipknee">
            <joint coef="-1" joint="right_hip_y"/>
            <joint coef="1" joint="right_knee"/>
        </fixed>
    </tendon>

    <actuator>
        <motor name='right_ankle_y'   gear='150' joint='right_ankle_y' />
        <motor name='right_ankle_z'   gear='100' joint='right_ankle_z' />
        <motor name='right_ankle_x'   gear='100' joint='right_ankle_x' />

        <motor name='left_ankle_y'    gear='150' joint='left_ankle_y' />
        <motor name='left_ankle_z'    gear='100' joint='left_ankle_z' />
        <motor name='left_ankle_x'    gear='100' joint='left_ankle_x' />

        <motor gear="100" joint="abdomen_y" name="abdomen_y"/>
        <motor gear="100" joint="abdomen_z" name="abdomen_z"/>
        <motor gear="100" joint="abdomen_x" name="abdomen_x"/>
        <motor gear="100" joint="right_hip_x" name="right_hip_x"/>
        <motor gear="100" joint="right_hip_z" name="right_hip_z"/>
        <motor gear="300" joint="right_hip_y" name="right_hip_y"/>
        <motor gear="200" joint="right_knee" name="right_knee"/>
        <motor gear="100" joint="left_hip_x" name="left_hip_x"/>
        <motor gear="100" joint="left_hip_z" name="left_hip_z"/>
        <motor gear="300" joint="left_hip_y" name="left_hip_y"/>
        <motor gear="200" joint="left_knee" name="left_knee"/>
        <motor gear="25" joint="right_shoulder1" name="right_shoulder1"/>
        <motor gear="25" joint="right_shoulder2" name="right_shoulder2"/>
        <motor gear="25" joint="right_elbow" name="right_elbow"/>
        <motor gear="25" joint="left_shoulder1" name="left_shoulder1"/>
        <motor gear="25" joint="left_shoulder2" name="left_shoulder2"/>
        <motor gear="25" joint="left_elbow" name="left_elbow"/>
    </actuator>

</mujoco>
