Skip to content

Support deformable (cloth and soft body) resets in SolverVBD.reset() #3400

Description

@mmichelis

Description

SolverVBD.reset() (tracked and added under #3256) resets rigid bodies, joints, and cables per world, but does not reset deformables (cloth and volumetric soft bodies). Particle StateFlags.PARTICLE_Q / StateFlags.PARTICLE_QD are currently ignored, and the method warns that particle resets are unsupported.

This requests first-class masked deformable reset support so cloth and soft-body particles can be restored to their model defaults per world, matching the rigid reset semantics.

Requested behavior

  • reset() honors StateFlags.PARTICLE_Q / StateFlags.PARTICLE_QD, copying model.particle_q / model.particle_qd into the state for particles in the worlds selected by world_mask.
  • Same masking semantics as the rigid path: world_mask=None also resets global (world == -1) particles; an explicit mask excludes them.
  • Works when an external solver integrates the bodies, and for particle-only models.
  • Covers both cloth and volumetric (tet) soft bodies through a single path.

Notes on scope

Unlike the rigid side, the particle side needs no solver-history cold-starting: particle_q_prev is rebaselined from the incoming state at the start of every step(), self-contact and body-particle contact buffers are rebuilt per step (no match-index warm-start path for soft contacts), and tet/cloth elasticity is stateless. So the deliverable is the masked state copy plus removing the unsupported-particle warning and documenting the behavior (including regenerating contacts after moving particles, and rebuild_bvh for large displacements with self-contact).

Motivation / Use Case

Acceptance criteria

  • SolverVBD.reset() resets cloth and soft-body particles per world via PARTICLE_Q / PARTICLE_QD.
  • Global-particle vs explicit-mask semantics match the rigid path.
  • Tests cover masked restore, flag selectivity, global-particle semantics, and a finite post-reset step for both cloth and tet soft bodies.

Metadata

Metadata

Assignees

Labels

IsaacLabIssues that are related to the Newton integration into IsaacLab.

Type

No type

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions