From a018b4c631c1a1b92fdc37ef7adc53649df4ec70 Mon Sep 17 00:00:00 2001 From: Amal Nanavati Date: Wed, 27 Nov 2024 10:24:22 -0800 Subject: [PATCH] [Bugfix] Copy mesh before scaling if it was passed in as a parameter --- pymoveit2/moveit2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymoveit2/moveit2.py b/pymoveit2/moveit2.py index 4481b1a..7df168a 100644 --- a/pymoveit2/moveit2.py +++ b/pymoveit2/moveit2.py @@ -1703,7 +1703,7 @@ def add_collision_mesh( if not (scale[0] == scale[1] == scale[2] == 1.0): # If the mesh was passed in as a parameter, make a copy of it to # avoid transforming the original. - if filepath is not None: + if filepath is None: mesh = mesh.copy() # Transform the mesh transform = np.eye(4)