Skip to content

[Feature]: Stress tensor readout and contact force isolation for deformable entities #2711

@KIMHYUNKYU333

Description

@KIMHYUNKYU333

What feature or enhancement are you proposing?

Summary

Genesis already exposes deformation gradient (MPM) and per-vertex forces (FEM), which is great. However, there's currently no public API to read out per-element stress tensors or to isolate contact forces from internal elastic forces on deformable entities.

What's missing

  • Stress tensor: Computed inside solver kernels but not persisted — no way to query Cauchy stress or von Mises without patching the solver or re-implementing material logic in Python.
  • Contact force isolation: get_forces() returns combined internal + external. No way to separate "elastic restoring force" from "contact reaction force from a rigid body."
  • ContactForceSensor is rigid-only (rigid_solver.collider.get_contacts). No equivalent for FEM/MPM/PBD entities.

Use case

Generating synthetic datasets for soft-body manipulation research. Per-step stress and contact force ground truth are essential for training contact-aware policies and sim-to-real transfer.

Proposed API (sketch)

entity.get_stress(kind="cauchy")   # (B, n_elem, 3, 3)
entity.get_von_mises()             # (B, n_elem)
entity.get_contact_forces()        # (B, n_surface_vert, 3)

A DeformableContactForceSensor that integrates with the existing Sensor/Recorder pipeline would also be very useful.

Happy to discuss or contribute if there's interest.

Motivation

As a [e.g. civil engineering researcher working on flood simulation]
I want to [e.g. be able to simulate city-scale fluid / terrain simulations]
Because [e.g. this enables the efficient design and validation of flood protection structures].

Potential Benefit

Potential benefits

  • Enables large-scale synthetic data generation for soft-body manipulation without external solver coupling
  • Opens up benchmarking for deformable grasping tasks (grasp quality metrics, damage prediction)
  • Makes Genesis competitive as an end-to-end data pipeline for contact-rich robotics research

What is the expected outcome of the implementation work?

A public API on deformable entities (FEM/MPM/PBD) that exposes per-element stress tensors and isolated contact forces, plus a corresponding sensor type compatible with the existing Recorder pipeline.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions