From 325e51ad873e1137f77fda47d89a665ea6ae2848 Mon Sep 17 00:00:00 2001 From: rafal-gorecki Date: Thu, 16 Nov 2023 17:02:22 +0100 Subject: [PATCH] Fix --- rosbot_controller/test/test_xacro.py | 10 ++-------- rosbot_description/urdf/body.urdf.xacro | 4 ++-- rosbot_description/urdf/rosbot.urdf.xacro | 2 +- rosbot_description/urdf/rosbot_macro.urdf.xacro | 4 ++-- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/rosbot_controller/test/test_xacro.py b/rosbot_controller/test/test_xacro.py index 95e46489..7101b0ce 100644 --- a/rosbot_controller/test/test_xacro.py +++ b/rosbot_controller/test/test_xacro.py @@ -50,22 +50,16 @@ def test_rosbot_description_parsing(): links = urdf.getElementsByTagName("link") for link in links: link_name = link.getAttribute("name") - if namespace != "None": + if namespace != "": if tf_prefix not in link_name: assert False, f"Link name '{link_name}' does not contain '{namespace}'" - else: - if tf_prefix in link_name: - assert False, f"Link name '{link_name}' does not contain '{namespace}'" joints = urdf.getElementsByTagName("joint") for joint in joints: joint_name = joint.getAttribute("name") - if namespace != "None": + if namespace != "": if tf_prefix not in joint_name: assert False, f"Joint name '{joint_name}' does not contain '{namespace}'" - else: - if tf_prefix in joint_name: - assert False, f"Joint name '{joint_name}' does not contain '{namespace}'" except xacro.XacroException as e: assert False, ( diff --git a/rosbot_description/urdf/body.urdf.xacro b/rosbot_description/urdf/body.urdf.xacro index b553f02a..3c243260 100644 --- a/rosbot_description/urdf/body.urdf.xacro +++ b/rosbot_description/urdf/body.urdf.xacro @@ -4,9 +4,9 @@ - + - + diff --git a/rosbot_description/urdf/rosbot.urdf.xacro b/rosbot_description/urdf/rosbot.urdf.xacro index b2c68b5a..e406722a 100644 --- a/rosbot_description/urdf/rosbot.urdf.xacro +++ b/rosbot_description/urdf/rosbot.urdf.xacro @@ -10,7 +10,7 @@ - + diff --git a/rosbot_description/urdf/rosbot_macro.urdf.xacro b/rosbot_description/urdf/rosbot_macro.urdf.xacro index 799e53ba..1ba322db 100644 --- a/rosbot_description/urdf/rosbot_macro.urdf.xacro +++ b/rosbot_description/urdf/rosbot_macro.urdf.xacro @@ -9,9 +9,9 @@ - + - +