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
|
Author collision offsets on every collision shape (worker-side only). |
|
Author one max depenetration velocity on every rigid body (worker-side only). |
|
Map the bounded set onto IsaacLab's |
|
Read the applied solver settings back from the USD stage (worker-side only). |
|
Strict host comparison; only the engine's float32 storage is tolerated. |
Classes
The bounded, validated PhysX solver override set; |
- class unisim.backend.isaacsim.physx_solver.PhysxSolverConfig[source]¶
Bases:
objectThe bounded, validated PhysX solver override set;
Nonekeeps defaults.- Parameters:
- classmethod from_payload(payload)[source]¶
Re-validate the worker-side INIT copy; unknown keys fail closed.
- Parameters:
payload (
Any)- Return type:
- __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.
- 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:
sim_utils (
Any)config (
PhysxSolverConfig)
- Return type:
- 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(plainUsdPhysics.CollisionAPIhas no such attributes), so the API is applied to every collision prim before values are authored. PhysX requiresrestOffset <= contactOffset;PhysxSolverConfigvalidates the relationship before the worker applies it here.
- 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 onPhysxSchema.PhysxRigidBodyAPI, so the API is applied to every rigid body prim before the value is authored, mirroring the IsaacGymsim_params.physx.max_depenetration_velocitysemantics that apply the cap to every actor.