unisim.backend.mjwarp.variants

Compiler-coherent fixed model variants for the MJWarp adapter.

Functions

install_fixed_variant_fields(warp, ...)

Install fixed per-world rows into already expanded Warp Model arrays.

prepare_fixed_variants(plan, *, sim_dt[, ...])

Compile and merge a construction-time FixedVariantPlan.

Classes

FixedVariantRealization

Backend-local canonical model and per-variant compiler outputs.

class unisim.backend.mjwarp.variants.FixedVariantRealization[source]

Bases: object

Backend-local canonical model and per-variant compiler outputs.

Parameters:
canonical_model: Any
source_indices: tuple[int, ...]
fields: Mapping[str, ndarray]
geom_dataid: ndarray
geom_matid: ndarray
playback_model_files: tuple[str, ...]
report_requested: tuple[dict[str, Any], ...] = ()
executor_rows(source_indices)[source]

Map immutable catalog indices to this realization’s compact rows.

Parameters:

source_indices (ndarray)

Return type:

ndarray

__init__(canonical_model, source_indices, fields, geom_dataid, geom_matid, playback_model_files, report_requested=())
Parameters:
unisim.backend.mjwarp.variants.prepare_fixed_variants(plan, *, sim_dt, sensor_body_names=())[source]

Compile and merge a construction-time FixedVariantPlan.

Parameters:
Return type:

FixedVariantRealization

unisim.backend.mjwarp.variants.install_fixed_variant_fields(warp, device_model, realization, assignment)[source]

Install fixed per-world rows into already expanded Warp Model arrays.

Parameters:
Return type:

None