From 667e5c88b6ae0dbb3fb6667044a8118b95660aec Mon Sep 17 00:00:00 2001 From: Lorenzo Conti Date: Fri, 15 Nov 2024 16:41:36 +0100 Subject: [PATCH] Removed extra search paths in ergocub model building --- src/jaxsim/parsers/rod/utils.py | 4 ++-- tests/conftest.py | 5 ----- tests/test_meshes.py | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/jaxsim/parsers/rod/utils.py b/src/jaxsim/parsers/rod/utils.py index 74ecb98a3..ac23144dc 100644 --- a/src/jaxsim/parsers/rod/utils.py +++ b/src/jaxsim/parsers/rod/utils.py @@ -242,8 +242,8 @@ def create_mesh_collision( W_H_L = collision.pose.transform() if collision.pose is not None else np.eye(4) # Extract translation from transformation matrix - W_p_L = H[:3, 3] - mesh_points_wrt_link = points @ H[:3, :3].T + W_p_L + W_p_L = W_H_L[:3, 3] + mesh_points_wrt_link = points @ W_H_L[:3, :3].T + W_p_L collidable_points = [ descriptions.CollidablePoint( parent_link=link_description, diff --git a/tests/conftest.py b/tests/conftest.py index a6a824d48..2ffb1c06d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -244,14 +244,9 @@ def jaxsim_model_ur10() -> js.model.JaxSimModel: """ import robot_descriptions.ur10_description - from robot_descriptions._package_dirs import get_package_dirs model_urdf_path = pathlib.Path(robot_descriptions.ur10_description.URDF_PATH) - os.environ["GAZEBO_MODEL_PATH"] = os.environ.get( - "GAZEBO_MODEL_PATH", "" - ) + ":".join(get_package_dirs(robot_descriptions.ur10_description)) - return build_jaxsim_model(model_description=model_urdf_path) diff --git a/tests/test_meshes.py b/tests/test_meshes.py index 7765ae15b..d38e958a5 100644 --- a/tests/test_meshes.py +++ b/tests/test_meshes.py @@ -68,9 +68,7 @@ def test_mesh_wrapping_points_over_axis(): # Test 1.1: Remove 10 points from the lower end of the x-axis # First, create a box with origin at (0,0,0) and extents (3,3,3) -> points span from -1.5 to 1.5 on axis - mesh = trimesh.creation.box( - extents=[3.0, 3.0, 3.0], - ) + mesh = trimesh.creation.box(extents=[3.0, 3.0, 3.0]) points = meshes.extract_points_select_points_over_axis( mesh=mesh, axis="x", direction="lower", n=4 )