How to add costraint to a deformable body so it does not move in other planes?

Hello, I have a deformable body in my environment and I want to model the contacts, but for that the Attachment method is not working properly because of the geometry of the deformable body and corresponding rigid contacts. So I want to constrain the body in vertical plane so that it does not move/fall off. How can this be done?

The bike frame is deformable and in physical system it is supposed to be fixed at both the ends to these 2 red support angles. I necessarily do not want to model exact that but at least the bike should be standing vertically, I even tried attaching it to the supports but it behaves weirdly after doing so. Help is much appreciated.

Hello @roboDV ,
Do I understand correctly, with respect to the coordinate cross shown in your picture you want to constrain the bike in the X-Z plane, right? So in other words to constrain the Y coordinate of the simulation mesh to be constant.
We don’t have built in support for this, but you can try to add a script that pushes the simulation vertices back to their original Y-values after every timestep.

Cheers,
Simon

Hello @SimonPhysX ,

Thanks for the answer. I was looking for that exactly, so that my specific vertices are constrained in Y. How can I access and constraint specific vertices is my doubt. I am pretty new to IssacSim and did not find how to do that.

Regards,
@roboDV

Hi @roboDV ,
I think there is a deformable view in Isaac Sim that you might be able to use for that, but I am not sure it’s supported. If you can enable updates via USD you should be able to use PhysxDeformableBodyAPI.GetSimulationPointsAttr and PhysxDeformableAPI.GetSimulationVelocitiesAttr to read and change the positions/velocities.

We have an API in omni.isaac.sim.core extension which allows you to set the kinematic target of the deformable nodes.
see this set_simulation_mesh_kinematic_targets
in source\extensions\omni.isaac.core\python\scripts\prims\soft\deformable_prim_view.py this will accept a tensor of size (soft_body_count, max_sim_vertices_per_body, 4) where the first three components are the positions data and the forth component is either 0 or 1 and depending on whether you activate it, the API kinematically enforce that position or not