Skip to content

Commit

Permalink
Parametrize urdf tests with all robot models, tf_prefix and mock hard…
Browse files Browse the repository at this point in the history
…ware
  • Loading branch information
fmauch committed Nov 15, 2023
1 parent 2578755 commit d5de765
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/test_ur_urdf_xacro.py
Expand Up @@ -32,20 +32,23 @@
import shutil
import subprocess
import tempfile
import pytest

from ament_index_python.packages import get_package_share_directory


def test_ur_urdf_xacro():
@pytest.mark.parametrize(
"ur_type", ["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20"]
)
@pytest.mark.parametrize("description_file", ["ur.urdf.xacro", "ur_mocked.urdf.xacro"])
@pytest.mark.parametrize("prefix", ["", "my_ur_"])
def test_ur_urdf_xacro(ur_type, description_file, prefix):
# Initialize Arguments
ur_type = "ur3"
safety_limits = "true"
safety_pos_margin = "0.15"
safety_k_position = "20"
# General Arguments
description_package = "ur_description"
description_file = "ur.urdf.xacro"
prefix = '""'

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

0 comments on commit d5de765

Please sign in to comment.