<mujoco model="box">
<compiler angle="radian" meshdir="assets" autolimits="true"/>
<option timestep="0.001" gravity="0 0 -0.98" viscosity="0.1"/>
<default>
<!-- <geom friction="1.0 0.005 0.0001" density="1000"/> -->
<geom friction="0.9 0.9 0.9" density="1000"/>
<joint armature="0.01"/>
</default>
<worldbody>
<!-- Box body -->
<!-- <body name="box" pos="-0.12 0.46 0.21"> -->
<body name="box" pos="0 0.9 0.4">
<!-- Add a free joint to allow movement in all directions -->
<joint name="box_joint" type="free" damping="0.01"/>
<!-- Box geometry -->
<geom name="box_geom" type="box" mass="0.5" size="0.5 0.1 0.4" rgba="0.6 0.6 0.6 1"/>
<!-- Add inertia for better physical behavior -->
<inertial pos="0 0 0" mass="0.5" diaginertia="0.001 0.001 0.001"/>
</body>
</worldbody>
<!-- Optionally, add a contact property for specific contact behavior -->
<contact>
<pair geom1="box_geom" geom2="floor" friction="0.2"/>
</contact>
</mujoco>
其中长方体的z方向位置要和长方体高度一致,这样才能保证在地面上!