unisim.backend.isaacgym.scene_worker¶
Native multi-actor execution for the versioned scene IPC profile.
Loaded by file path in the isolated Python 3.8 worker. Only stdlib and NumPy are imported here; IsaacGym must be imported before Torch during initialization.
Functions
|
|
|
Classes
Own one native scene, public/native maps and pending indexed writes. |
- class unisim.backend.isaacgym.scene_worker.SceneWorker[source]¶
Bases:
objectOwn one native scene, public/native maps and pending indexed writes.
- 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.