unisim.backend.isaacgym.scene_worker.SceneWorker¶
- class unisim.backend.isaacgym.scene_worker.SceneWorker[source]¶
Bases:
objectOwn one native scene, public/native maps and pending indexed writes.
Methods
__init__(context, payload)adopt_initialized_context(context, metadata, ...)Adopt a cold raw-asset loader's objects into the single scene runtime.
Assemble one batched
[qpos, qvel, (mocap_pos, mocap_quat)?]block.refresh()reset(payload)stage_fk_overlay_rows(env_ids, qpos_rows, ...)Overlay exact FK body state for freshly written envs until the first step.
step(payload)Attributes
- classmethod adopt_initialized_context(context, metadata, payload, bridge)[source]¶
Adopt a cold raw-asset loader’s objects into the single scene runtime.
The bridge’s synthetic root and D control columns are compatibility projections, not assertions about the source’s physical joint tree. Native indices below come from Gym, never actor-order arithmetic.
- stage_fk_overlay_rows(env_ids, qpos_rows, qvel_rows)[source]¶
Overlay exact FK body state for freshly written envs until the first step.
- physics_state()[source]¶
Assemble one batched
[qpos, qvel, (mocap_pos, mocap_quat)?]block.The canonical slots already carry MuJoCo-layout public state (wxyz quaternions, link-origin linear velocity, body-frame root angular velocity), so the block is a plain column concat of
qpos/qvelplus onepos(3), quat(4)tail per kinematic entity (the composed playback MJCF compiles those roots as mocap bodies, in layout order). Slots are refreshed by every step/reset/attach, and no native state can change between protocol commands, so no re-refresh happens here; the host owns the leading snapshot time column. The reply is raw C-order float32 bytes because NumPy pickle internals are not stable across the host/worker interpreter versions.