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

finite_array(value, shape, label)

unit_quaternion(value, label)

Classes

SceneWorker

Own one native scene, public/native maps and pending indexed writes.

unisim.backend.isaacgym.scene_worker.finite_array(value, shape, label)[source]
Parameters:
Return type:

ndarray

unisim.backend.isaacgym.scene_worker.unit_quaternion(value, label)[source]
Parameters:
Return type:

None

class unisim.backend.isaacgym.scene_worker.SceneWorker[source]

Bases: object

Own one native scene, public/native maps and pending indexed writes.

Parameters:
projection: Any
__init__(context, payload)[source]
Parameters:
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.

Parameters:
Return type:

SceneWorker

stage_fk_overlay_rows(env_ids, qpos_rows, qvel_rows)[source]

Overlay exact FK body state for freshly written envs until the first step.

Parameters:
  • env_ids (Any)

  • qpos_rows (Any)

  • qvel_rows (Any)

Return type:

None

initialize()[source]
Return type:

dict[str, Any]

refresh()[source]
Return type:

None

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/qvel plus one pos(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.

Return type:

dict[str, Any]

reset(payload)[source]
Parameters:

payload (dict[str, Any])

Return type:

dict[str, Any]

step(payload)[source]
Parameters:

payload (dict[str, Any])

Return type:

dict[str, Any]