0. Static Scene#
In this tutorial, we will show you how to use MetaSim to simulate a static scene.
Common Usage#
python get_started/0_static_scene.py --sim <simulator>
you can also render in the headless mode by adding --headless
flag. By using this, there will be no window popping up and the rendering will also be faster.
Examples#
Isaac Lab#
python get_started/0_static_scene.py --sim isaacsim
/isaacsim
Isaac Gym#
python get_started/0_static_scene.py --sim isaacgym
Mujoco#
python get_started/0_static_scene.py --sim mujoco --headless
Note that we find the non-headless
mode of Mujoco is not stable. So we recommend using the headless
mode.
Genesis#
python get_started/0_static_scene.py --sim genesis
Note that we find the headless
mode of Genesis is not stable. So we recommend using the non-headless
mode.
Sapien#
python get_started/0_static_scene.py --sim sapien3
Pybullet#
python get_started/0_static_scene.py --sim pybullet
You will get the following image:#
Isaac Lab |
Isaac Gym |
Mujoco |
---|---|---|
Genesis |
Sapien |
PyBullet |
---|---|---|
Code Highlights#
Object Configuration: Objects are added to scenario.objects
with different types:
PrimitiveCubeCfg
/PrimitiveSphereCfg
: Simple geometric objectsRigidObjCfg
: Static objects with physics propertiesArticulationObjCfg
: Objects with joints (like the box_base)
Initial State Setup: Use handler.set_states()
to position objects:
init_states = [{
"objects": {
"cube": {"pos": torch.tensor([0.3, -0.2, 0.05]), "rot": torch.tensor([1.0, 0.0, 0.0, 0.0])},
"sphere": {"pos": torch.tensor([0.4, -0.6, 0.05]), "rot": torch.tensor([1.0, 0.0, 0.0, 0.0])},
}
}]