Skip to content

Commit

Permalink
test_xacro
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed May 8, 2024
1 parent e645eac commit 0b9dd52
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rosbot_xl_controller/test/test_xacro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 0b9dd52

Please sign in to comment.