Skip to content

Commit d5de765

Browse files
author
Felix Exner
committed
Parametrize urdf tests with all robot models, tf_prefix and mock hardware
1 parent 2578755 commit d5de765

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/test_ur_urdf_xacro.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,23 @@
3232
import shutil
3333
import subprocess
3434
import tempfile
35+
import pytest
3536

3637
from ament_index_python.packages import get_package_share_directory
3738

3839

39-
def test_ur_urdf_xacro():
40+
@pytest.mark.parametrize(
41+
"ur_type", ["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20"]
42+
)
43+
@pytest.mark.parametrize("description_file", ["ur.urdf.xacro", "ur_mocked.urdf.xacro"])
44+
@pytest.mark.parametrize("prefix", ["", "my_ur_"])
45+
def test_ur_urdf_xacro(ur_type, description_file, prefix):
4046
# Initialize Arguments
41-
ur_type = "ur3"
4247
safety_limits = "true"
4348
safety_pos_margin = "0.15"
4449
safety_k_position = "20"
4550
# General Arguments
4651
description_package = "ur_description"
47-
description_file = "ur.urdf.xacro"
48-
prefix = '""'
4952

5053
joint_limit_params = os.path.join(
5154
get_package_share_directory(description_package), "config", ur_type, "joint_limits.yaml"

0 commit comments

Comments
 (0)