unisim.backend.isaacsim.physx_solver

Bounded PhysX solver configuration shared by the IsaacSim host and worker.

The host validates constructor kwargs fail-closed, forwards the bounded set through the cold INIT payload, and strictly compares the worker’s engine readback against the request. The external worker re-validates the payload, maps the values onto IsaacLab’s sim_utils.PhysxCfg plus per-collision-shape contact/rest offsets and a per-rigid-body max depenetration velocity, and reads the applied settings back from the USD stage for its configuration report; the GPU rigid contact/patch buffer capacities are PhysX carb settings with no USD attribute, so the worker reports the authored value for those two fields instead of an engine readback (the host still compares them strictly against the request). No engine SDK is imported at module scope, so the host interpreter stays SDK-free; the stage helpers run worker-side only.

SimToolReal/MuJoCo-style substeps are intentionally not part of this set: the subprocess contract already expresses them as the step(ctrl, nsteps) decimation, where one host step walks the worker through n physics sub-steps of sim_dt.

Functions

apply_collision_offsets(stage, *[, ...])

Author collision offsets on every collision shape (worker-side only).

apply_max_depenetration_velocity(stage, ...)

Author one max depenetration velocity on every rigid body (worker-side only).

build_isaaclab_physx_cfg(sim_utils, config)

Map the bounded set onto IsaacLab's PhysxCfg (worker-side only).

read_engine_solver_values(stage, *, ...[, ...])

Read the applied solver settings back from the USD stage (worker-side only).

solver_value_matches(field, requested, reported)

Strict host comparison; only the engine's float32 storage is tolerated.

Classes

PhysxSolverConfig

The bounded, validated PhysX solver override set; None keeps defaults.

class unisim.backend.isaacsim.physx_solver.PhysxSolverConfig[source]

Bases: object

The bounded, validated PhysX solver override set; None keeps defaults.

Parameters:
solver_position_iteration_count: int | None = None
solver_velocity_iteration_count: int | None = None
bounce_threshold_velocity: float | None = None
contact_offset: float | None = None
rest_offset: float | None = None
max_depenetration_velocity: float | None = None
gpu_max_rigid_contact_count: int | None = None
gpu_max_rigid_patch_count: int | None = None
configured_fields()[source]
Return type:

tuple[str, ...]

to_payload()[source]
Return type:

dict[str, Any]

classmethod from_payload(payload)[source]

Re-validate the worker-side INIT copy; unknown keys fail closed.

Parameters:

payload (Any)

Return type:

PhysxSolverConfig

__init__(solver_position_iteration_count=None, solver_velocity_iteration_count=None, bounce_threshold_velocity=None, contact_offset=None, rest_offset=None, max_depenetration_velocity=None, gpu_max_rigid_contact_count=None, gpu_max_rigid_patch_count=None)
Parameters:
unisim.backend.isaacsim.physx_solver.solver_value_matches(field, requested, reported)[source]

Strict host comparison; only the engine’s float32 storage is tolerated.

Parameters:
Return type:

bool

unisim.backend.isaacsim.physx_solver.build_isaaclab_physx_cfg(sim_utils, config)[source]

Map the bounded set onto IsaacLab’s PhysxCfg (worker-side only).

PhysX clamps every actor’s solver iteration counts to the scene’s [min, max] range, so pinning both bounds to the requested count makes it the effective count for each actor without editing per-actor USD attributes. An unconfigured field keeps IsaacLab’s default.

Parameters:
Return type:

Any

unisim.backend.isaacsim.physx_solver.apply_collision_offsets(stage, *, contact_offset=None, rest_offset=None)[source]

Author collision offsets on every collision shape (worker-side only).

The offsets live on PhysxSchema.PhysxCollisionAPI (plain UsdPhysics.CollisionAPI has no such attributes), so the API is applied to every collision prim before values are authored. PhysX requires restOffset <= contactOffset; PhysxSolverConfig validates the relationship before the worker applies it here.

Parameters:
Return type:

int

unisim.backend.isaacsim.physx_solver.apply_max_depenetration_velocity(stage, max_depenetration_velocity)[source]

Author one max depenetration velocity on every rigid body (worker-side only).

PhysX 5 expresses the depenetration velocity cap per rigid body (physxRigidBody:maxDepenetrationVelocity); the bundled IsaacSim PhysX schema has no scene-level attribute. The value lives on PhysxSchema.PhysxRigidBodyAPI, so the API is applied to every rigid body prim before the value is authored, mirroring the IsaacGym sim_params.physx.max_depenetration_velocity semantics that apply the cap to every actor.

Parameters:
  • stage (Any)

  • max_depenetration_velocity (float)

Return type:

int

unisim.backend.isaacsim.physx_solver.read_engine_solver_values(stage, *, include_contact_offset, include_rest_offset=False, include_max_depenetration_velocity=False)[source]

Read the applied solver settings back from the USD stage (worker-side only).

Parameters:
  • stage (Any)

  • include_contact_offset (bool)

  • include_rest_offset (bool)

  • include_max_depenetration_velocity (bool)

Return type:

dict[str, Any]