<mujoco model='wheeled'>
  <compiler inertiafromgeom='true' coordinate='local' angle='radian' settotalmass='14' />
  <default>
    <geom contype='1' conaffinity='0' condim='3' friction='.4 .4 .4' rgba='0.8 0.6 .4 1' solimp='0.0 0.8 0.01' solref='0.02 1' />
    <!-- <motor ctrlrange='-1 1' ctrllimited='true' /> -->
    </default>
    <size nstack='300000' nuser_geom='1' />
    <option timestep='0.01' gravity='0 0 -9.81' />
    <asset>
      <texture type="skybox" builtin="gradient" width="100" height="100" rgb1="1 1 1" rgb2="0 0 0" />
      <texture name="texgeom" type="cube" builtin="flat" mark="cross" width="127" height="1278" rgb1="0.8 0.6 0.4" rgb2="0.8 0.6 0.4" markrgb="1 1 1" random="0.01" />
      <texture name="texplane" type="2d" builtin="checker" rgb1="0 0 0" rgb2="0.8 0.8 0.8" width="100" height="100" />
      <material name='MatPlane' texture="texplane" shininess="1" texrepeat="60 60" specular="1"  reflectance="0.5" />
      <material name='geom' texture="texgeom" texuniform="true" />
    </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='floor' material="MatPlane" pos='0 0 0' size='40 40 40' type='plane' conaffinity='1' rgba='0.8 0.9 0.8 1' condim='3' />
      <body name='car' pos='0 0 -0.4'>
        <geom name='body' type='box' pos ='0 0 .6' rgba="1 0 0 1" size='0.15 0.1 0.046' />
        <joint name="xmove" type="slide" limited="false" pos="0 0 0" axis="1 0 0" margin="0.01" armature="0" damping="0" />
        <joint name="ymove" type="slide" limited="false" pos="0 0 0" axis="0 1 0" margin="0.01" armature="0" damping="0" />
        <joint name="zmove" type="slide" limited="true" range="-1 0.03" pos="0 0 0" axis="0 0 1" margin="0.01" armature="0" damping="0" />
        <joint name="zrotate" type="hinge" limited="false" pos="0 0 0" axis="0 0 1" margin="0.01" armature="0" damping="0" />

        <body name='wheelbody1' pos='0 -0.2 0'>
          <geom name='wheel1' type='cylinder' axisangle="1 0 0 1.57" pos ='0 0 0.5' size='0.1 0.046' />
          <joint name="rotate_wheels1" type="hinge" limited="false" pos="0 0 0.5" axis="0 1 0" margin="0.01" armature="0" damping="0" /> 
        </body>

        <body name='wheelbody2' pos='0 0.2 0'>
          <geom name='wheel2' type='cylinder' axisangle="1 0 0 1.57" pos ='0 0 0.5' size='0.1 0.046' />
          <joint name="rotate_wheels2" type="hinge" limited="false" pos="0 0 0.5" axis="0 1 0" margin="0.01" armature="0" damping="0" /> 
        </body>
      </body>
                                                       
      <body name="goal" pos="-2 -2 0.1">
        <geom name="goal" contype='0' conaffinity='0' condim='1' type='sphere' rgba='0 1 0 1' pos="0 0 0" size="0.1"/>
      </body>

    </worldbody>
    <actuator>
      <motor name='rotate_wheels1' ctrlrange='-2 2' joint='rotate_wheels1' ctrllimited='true' />
      <motor name='rotate_wheels2' ctrlrange='-2 2' joint='rotate_wheels2' ctrllimited='true'/>
    </actuator>
</mujoco>
