unilab.base.scene

UniLab configuration owner layered over the package-neutral UniSim scene.

Classes

SceneCfg

Task-owned scene declaration with UniLab entity materialization.

class unilab.base.scene.SceneCfg[source]

Bases: SceneCfg

Task-owned scene declaration with UniLab entity materialization.

Physics scene fields and all backend-facing behavior are implemented by UniSim. UniLab only converts Hydra/OmegaConf entity mappings into the manager facade’s EntityCfg records on the cold configuration path.

Parameters:
model_file: str
fragment_files: list[str]
terrain: TerrainSceneCfg | None = None
entities: dict[str, object]

Logical entity partitions materialized by the base-owned manager facade.

__init__(model_file, fragment_files=<factory>, terrain=None, entities=<factory>, visual_model_file=None, default_keyframe_name=None)
Parameters:
class unilab.base.scene.TerrainSceneCfg[source]

Bases: object

Backend-agnostic terrain slot declaration for a scene.

Parameters:
generator: TerrainGeneratorCfg | None = None
hfield_name: str = 'terrain_hfield'
geom_name: str | None = None
__init__(generator=None, hfield_name='terrain_hfield', geom_name=None)
Parameters:
unilab.base.scene.resolve_scene_default_qpos(cfg, backend)[source]

Resolve one named default-qpos snapshot without changing the qpos0 path.

Parameters:
Return type:

ndarray | None

unilab.base.scene.resolve_scene_fragment_path(fragment_file, model_file)[source]

Resolve a SceneCfg.fragment_files entry against the scene model file.

Single resolution rule shared by the MuJoCo and Motrix scene materializers: absolute paths pass through; relative paths that exist resolve against the CWD; anything else resolves relative to the model file’s directory.

Parameters:
  • fragment_file (str)

  • model_file (Path)

Return type:

Path