Problems with the deformation field of a deformable body

Hello, I would like to extract the nodal displacement of a deformable body in isaac. I notice that it is feasible for a single deformable body by the deformableobject.data API. However, I have a deformable body which is attached to a rigid body. It is bulit by a articulation and saved as a usd, and this usd is loaded and simulated by python.

In the simulation, I can see the deformation of the deformable body. When I try to extract the data of the articulation, I can only find one bodyname in the articulation (in fact there are one deformable body and one rigid body). If I can change my model to both rigid bodies and simulate it in the same way, I can find two bodynames in the articulation.

Based on my understanding, this is a very common case in soft tactile grasping, but I cannot find any relevant answers. So, I am wondering what is the suitable way to obtain the deformation field of a deformable body attached to a rigid body.

Isaac Sim Version

4.2.0
4.1.0
4.0.0
2023.1.1
2023.1.0-hotfix.1
Other (please specify):

Isaac Lab Version (if applicable)

1.2
1.1
1.0
Other (please specify):

Operating System

Ubuntu 22.04
Ubuntu 20.04
Windows 11
Windows 10
Other (please specify):

Thank you for bringing this issue to our attention. I’ve consulted with our development team and can provide some clarification and a solution for your scenario.

First, it’s important to note that deformable bodies cannot be part of an articulation in Isaac Sim. This explains why you only see one body name in the articulation view, corresponding to the rigid body component.

However, you can still access the deformation field data for your setup. Here’s how you can proceed:

  1. Use a SoftBody view to query the deformable body mesh positions.
  2. Then, use the get_nodal_positions() function to retrieve the nodal positions of the deformable body.
    Here’s the API docstring for the get_nodal_positions() function:
    def get_nodal_positions(self):
        """ Gets the collision mesh nodal positions for the deformable bodies.

            .. note::
                The function raises an exception if the nodal positions cannot be obtained from the backend.

            Returns:
                Union[np.ndarray, torch.Tensor, wp.array]: An array of nodal positions with shape (count, max_vertices_per_body, 3) where count is the number of soft bodies in the view and max_vertices_per_body is the maximum number of vertices per soft body in the view. The 3 elements of the last dimension are the x, y, z components of the nodal positions.

            Example:
                .. code-block:: python

                  >>> import omni.physics.tensors as tensors
                  >>> sim_view = tensors.create_simulation_view("warp")
                  >>> soft_body_view = sim_view.create_soft_body_view("/World/Soft_*") # This assumes that the prims referenced by "/World/Soft_*" were already created in the stage
                  >>> nodal_positions = soft_body_view.get_nodal_positions() # Get the collision mesh nodal positions for all soft bodies in the view
                  >>> nodal_positions_np = nodal_positions.numpy().reshape(soft_body_view.count, soft_body_view.max_vertices_per_body, 3) # Reshape the obtained array in a 3D numpy array on the host
        """

Hi VickNV, thanks for info. By now, I have clarified some issues.
I could attach a deformable body to the articulation in Isaac sim GUI, it could move with the articulation link in GUI. However, if I load it as a USD by the articulation robot config in python, it detaches from the robot when the robot moves. As the USD is only one part of the scene for rl, I don’t know how to solve it anymore.
I know what you said, this has been achieved for an individual deformable body. For my cases, the deformable body should move the robot link. If I could not find the deformable body in the robot data, how could I access the deformation filed data?
Based on my understanding, the deformable body attached to the robot link would be a very common case, e.g., a tactile sensor, in the near future. Would you have some plans to make it feasible in the next release?
I also find some people use the pseudo rigid body as an alternative solution. In this case, is it possible to get a matrix contact deformation field or contact force field? It is relatively weak for the contact field application in Isaac compared to Mujoco. Are there any update plans in this domain?