unilab.base.scene¶
UniLab configuration owner layered over the package-neutral UniSim scene.
Classes
Task-owned scene declaration with UniLab entity materialization. |
- class unilab.base.scene.SceneCfg[source]¶
Bases:
SceneCfgTask-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
EntityCfgrecords on the cold configuration path.- Parameters:
model_file (
str)terrain (
TerrainSceneCfg|None)fixed_variant_plan (
FixedVariantPlan|None)entity_variant (
EntityVariantBinding|None)
-
terrain:
TerrainSceneCfg|None= None¶
-
entities:
dict[str,object]¶ Logical entity partitions materialized by the base-owned manager facade.
-
entity_assets:
tuple[SceneEntitySpec,...] = ()¶ Physical sources, distinct from the task-owned logical entity selectors.
-
entity_variant:
EntityVariantBinding|None= None¶ One entity-bound catalog; cannot coexist with a whole-model variant plan.
- materialize_entities()[source]¶
Convert task/Hydra physical records without importing a physics SDK.
- Return type:
- __init__(model_file='', fragment_files=<factory>, terrain=None, entities=<factory>, visual_model_file=None, default_keyframe_name=None, fixed_variant_plan=None, entity_assets=(), entity_variant=None, primary_entity=None)¶
- Parameters:
model_file (
str)terrain (
TerrainSceneCfg|None)fixed_variant_plan (
FixedVariantPlan|None)entity_variant (
EntityVariantBinding|None)
- class unilab.base.scene.TerrainSceneCfg[source]¶
Bases:
objectBackend-agnostic terrain slot declaration for a scene.
- Parameters:
generator (
TerrainGeneratorCfg|None)hfield_name (
str)
-
generator:
TerrainGeneratorCfg|None= None¶
- unilab.base.scene.resolve_scene_default_qpos(cfg, backend)[source]¶
Resolve one named default-qpos snapshot without changing the qpos0 path.
- Parameters:
cfg (
SceneCfg)backend (
SimBackend)
- Return type:
- unilab.base.scene.resolve_scene_fragment_path(fragment_file, model_file)[source]¶
Resolve a
SceneCfg.fragment_filesentry 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.