Closed OhLeMatt closed 1 month ago
Hello warp community,
I noticed that the initialization of cloth bending constraints for arbitrary cloth-mesh presents what is mostlikely a typo in the call of add_edges(...). The fourth argument is currently: https://github.com/NVIDIA/warp/blob/a7ecac07d10ce5daa636d60fd6c24ae8576fd0ab/warp/sim/model.py#L4018 Whereas it should probably be (to reflect the same functionning as in add_cloth_grid):
add_edges(...)
add_cloth_grid
edgeinds[:, 3],
For some more context, this is the current code:
adj = wp.utils.MeshAdjacency(self.tri_indices[start_tri:end_tri], end_tri - start_tri) edgeinds = np.fromiter( (x for e in adj.edges.values() for x in (e.o0, e.o1, e.v0, e.v1)), int, ).reshape(-1, 4) self.add_edges( edgeinds[:, 0], edgeinds[:, 1], edgeinds[:, 2], edgeinds[:, 0], edge_ke=[edge_ke] * len(edgeinds), edge_kd=[edge_kd] * len(edgeinds), )
I hope this issue was not already raised, I looked and found nothing yet. Thank you for your time and awesome lib!
No response
I just submitted a fixing MR.
Fix is merged in main and will be in the next Warp release, thanks!
main
Bug Description
Hello warp community,
I noticed that the initialization of cloth bending constraints for arbitrary cloth-mesh presents what is mostlikely a typo in the call of
add_edges(...)
. The fourth argument is currently: https://github.com/NVIDIA/warp/blob/a7ecac07d10ce5daa636d60fd6c24ae8576fd0ab/warp/sim/model.py#L4018 Whereas it should probably be (to reflect the same functionning as inadd_cloth_grid
):For some more context, this is the current code:
I hope this issue was not already raised, I looked and found nothing yet. Thank you for your time and awesome lib!
System Information
No response