Module kos_sim.scenes

Functions

def get_scene_model(scene_type: str) ‑> str
Expand source code
def get_scene_model(scene_type: str) -> str:
    scenes = {
        "smooth": """
        <mujoco>
            <asset>
                <texture name="grid" type="2d" builtin="checker" rgb1=".1 .2 .3" rgb2=".2 .3 .4" width="300" height="300"/>
                <material name="floor" texture="grid" texrepeat="1 1"/>
            </asset>
            <worldbody>
                <light pos="0 0 3" dir="0 0 -1" diffuse="0.7 0.7 0.7"/>
                <geom type="plane" name="floor" material="floor" size="10 10 0.1"/>
            </worldbody>
        </mujoco>
        """,
        "rough": """
        <mujoco>
            <asset>
                <texture name="grid" type="2d" builtin="checker" rgb1=".2 .3 .4" rgb2=".3 .4 .5" width="300" height="300"/>
                <material name="floor" texture="grid" texrepeat="1 1"/>
            </asset>
            <worldbody>
                <light pos="0 0 3" dir="0 0 -1" diffuse="0.7 0.7 0.7"/>
                <geom type="plane" name="floor" material="floor" size="10 10 0.1" friction="1 0.005 0.0001"/>
            </worldbody>
        </mujoco>
        """,
        "narrow": """
        <mujoco>
            <asset>
                <texture name="grid" type="2d" builtin="checker" rgb1=".1 .2 .3" rgb2=".2 .3 .4" width="300" height="300"/>
                <material name="floor" texture="grid" texrepeat="1 1"/>
            </asset>
            <worldbody>
                <light pos="0 0 3" dir="0 0 -1" diffuse="0.7 0.7 0.7"/>
                <geom type="plane" name="floor" material="floor" size="2 10 0.1"/>
            </worldbody>
        </mujoco>
        """,
        "wide": """
        <mujoco>
            <asset>
                <texture name="grid" type="2d" builtin="checker" rgb1=".1 .2 .3" rgb2=".2 .3 .4" width="300" height="300"/>
                <material name="floor" texture="grid" texrepeat="1 1"/>
            </asset>
            <worldbody>
                <light pos="0 0 3" dir="0 0 -1" diffuse="0.7 0.7 0.7"/>
                <geom type="plane" name="floor" material="floor" size="20 20 0.1"/>
            </worldbody>
        </mujoco>
        """,
    }
    return scenes[scene_type]