<!-- Copyright 2021 DeepMind Technologies Limited
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
         http://www.apache.org/licenses/LICENSE-2.0
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<mujoco>
  <!--
  body2 is held by body1 through the connect constraint, so the force sensor on body1
  should register 20 (for the weight of both bodies), rotated into the y-z plane.
  -->
  <option gravity="0 0 -1"/>

  <default>
    <!-- A cube of size 0.1^3 with density of 1000 has mass of 1. -->
    <geom size="0.05 0.05 0.05" type="box"/>
  </default>

  <worldbody>
    <body name="body1" euler="0 45 0">
      <geom/>
      <site name="sensor" euler="0 0 90"/>
    </body>
    <body name="body2" pos="0 0 -0.2">
      <joint type="slide" axis="0 0 1"/>
      <geom/>
    </body>
  </worldbody>

  <equality>
    <connect body1="body1" body2="body2" anchor="0 0 0"/>
  </equality>

  <sensor>
    <force site="sensor" user="0 1.41421356237 1.41421356237"/>
  </sensor>
</mujoco>
