unilab.base.entity.EntityScene¶
- class unilab.base.entity.EntityScene[source]¶
-
Read-only name-addressable collection of backend-bound entities.
- Parameters:
backend (
SimBackend)reset_state (
ResetStateTransaction|None)
Methods
__init__(entities, backend[, ...])bind_gravity_write(*, term_name)Bind immutable backend gravity for a reset event on the cold path.
bind_sensor_data(names)Bind existing backend sensors for a manager term on the cold path.
from_scene_cfg(cfg, backend[, ...])get(k[,d])items()keys()reset_to_default(env_ids, *, term_name)Stage a full-scene default state in the active reset transaction.
values()write_gravity_to_sim(values, env_ids, *, ...)Stage gravity values in the exactly-once reset transaction.
Attributes
Pinned community-style read-only entity mapping.
Read-only per-environment origins; flat UniLab scenes default to zero.
- __init__(entities, backend, control_buffer=None, *, reset_state=None, default_qpos=None)[source]¶
- Parameters:
backend (
SimBackend)reset_state (
ResetStateTransaction|None)
- classmethod from_scene_cfg(cfg, backend, control_buffer=None, *, reset_state=None, default_qpos=None)[source]¶
- Parameters:
cfg (
SceneCfg)backend (
SimBackend)reset_state (
ResetStateTransaction|None)
- Return type:
- property env_origins: ndarray¶
Read-only per-environment origins; flat UniLab scenes default to zero.
- reset_to_default(env_ids, *, term_name)[source]¶
Stage a full-scene default state in the active reset transaction.
- bind_gravity_write(*, term_name)[source]¶
Bind immutable backend gravity for a reset event on the cold path.
- write_gravity_to_sim(values, env_ids, *, term_name)[source]¶
Stage gravity values in the exactly-once reset transaction.
- bind_sensor_data(names)[source]¶
Bind existing backend sensors for a manager term on the cold path.
The returned view owns the backend-specific reader. Terms retain that view and only call
BackendSensorView.read()while stepping, so the scene facade never exposes a backend model, data object, or native handle.
- get(k[, d]) D[k] if k in D, else d. d defaults to None.¶
- items() a set-like object providing a view on D's items¶
- keys() a set-like object providing a view on D's keys¶
- values() an object providing a view on D's values¶