update the mesh during simulation
cyanzhao42 opened this issue · comments
Hi, thanks for the great work. I am interested in simulating cloth with moving objects. I am following the example code: https://github.com/NVIDIA/warp/blob/main/examples/example_sim_cloth.py here. I am wondering if it would be possible to update the "mesh" (builder.add_shape_mesh) vertices during the simulation.
I found the example here - https://github.com/NVIDIA/warp/blob/main/examples/example_mesh.py, on how to update the mesh, however, the mesh object is not compatible with wp.sim. I am wondering if there is a smart way to address this. Thanks!
Hi @cyanzhao42, yes take a look at the wp.sim.Mesh
class: https://github.com/NVIDIA/warp/blob/main/warp/sim/model.py#L256. Here you can see it contains a regular mesh that can be updated + refit() as desired.
Cheers,
Miles
The Omniverse cloth node extension also does this, you can look here for an example:
Cheers,
Miles