From c72d3ad59331a53d8c128606ae00dfa05c736e25 Mon Sep 17 00:00:00 2001 From: Tea Molnar Date: Tue, 21 May 2024 10:47:40 +1000 Subject: [PATCH 1/2] fixed handling of mesh filenames in URDF parsing --- roboticstoolbox/tools/urdf/urdf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roboticstoolbox/tools/urdf/urdf.py b/roboticstoolbox/tools/urdf/urdf.py index 2069af158..dde81808c 100644 --- a/roboticstoolbox/tools/urdf/urdf.py +++ b/roboticstoolbox/tools/urdf/urdf.py @@ -303,6 +303,9 @@ def filename(self, value): if value.startswith("package://"): value = value.replace("package://", "") + if value.startswith("file://"): + value = value.replace("file://", "") + if _base_path is None: value = rtb_path_to_datafile("xacro", value) else: From 7fc5361301e5da9a3781e2e07807595fb0fbca16 Mon Sep 17 00:00:00 2001 From: Tea Molnar Date: Tue, 21 May 2024 11:25:37 +1000 Subject: [PATCH 2/2] minor change to execution flow of filename checks for correctness --- roboticstoolbox/tools/urdf/urdf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/roboticstoolbox/tools/urdf/urdf.py b/roboticstoolbox/tools/urdf/urdf.py index dde81808c..6094cf5c3 100644 --- a/roboticstoolbox/tools/urdf/urdf.py +++ b/roboticstoolbox/tools/urdf/urdf.py @@ -302,8 +302,7 @@ def filename(self, value): if value.startswith("package://"): value = value.replace("package://", "") - - if value.startswith("file://"): + elif value.startswith("file://"): value = value.replace("file://", "") if _base_path is None: