From 0b9dd52eac49fbca6fcb2f9038b3e9d5eb7ce5dd Mon Sep 17 00:00:00 2001 From: rafal-gorecki Date: Wed, 8 May 2024 14:00:55 +0200 Subject: [PATCH] test_xacro --- rosbot_xl_controller/test/test_xacro.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rosbot_xl_controller/test/test_xacro.py b/rosbot_xl_controller/test/test_xacro.py index afa9485..465265c 100644 --- a/rosbot_xl_controller/test/test_xacro.py +++ b/rosbot_xl_controller/test/test_xacro.py @@ -13,10 +13,10 @@ # limitations under the License. import itertools +import os import xacro -from launch.substitutions import PathJoinSubstitution -from launch_ros.substitutions import FindPackageShare +from ament_index_python.packages import get_package_share_directory def test_rosbot_description_parsing(): @@ -69,9 +69,8 @@ def test_rosbot_description_parsing(): "lidar_model": lidar_model, "camera_model": camera_model, } - xacro_path = PathJoinSubstitution( - [FindPackageShare("rosbot_xl_description"), "urdf", "rosbot_xl.urdf.xacro"] - ) + rosbot_xl_description = get_package_share_directory("rosbot_xl_description") + xacro_path = os.path.join(rosbot_xl_description, "urdf/rosbot_xl.urdf.xacro") try: xacro.process_file(xacro_path, mappings=mappings) except xacro.XacroException as e: