Skip to content

Commit

Permalink
Only test one model
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauch committed Jun 24, 2024
1 parent 9c916cc commit 2ef548c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ur_simulation_gz/test/test_gz.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch_ros.substitutions import FindPackageShare
from launch_testing.actions import ReadyToTest
import launch_testing

from builtin_interfaces.msg import Duration
from control_msgs.action import FollowJointTrajectory
Expand All @@ -71,24 +70,25 @@


# TODO: Add tf_prefix parametrization
# TODO: Currently, launching multiple simulations from this makes the old simulation not stop. This
# might change, once the gz launch system migration is done using gzserver and such....
# @launch_testing.parametrize(
# "ur_type",
# ["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20", "ur30"],
# )
@pytest.mark.launch_test
@launch_testing.parametrize(
"ur_type",
["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20", "ur30"],
)
def generate_test_description(ur_type):
def generate_test_description():
simulator = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
PathJoinSubstitution(
[FindPackageShare("ur_simulation_gz"), "launch", "ur_sim_control.launch.py"]
)
),
launch_arguments={
"ur_type": ur_type,
"launch_rviz": "true",
"ur_type": "ur5e",
"launch_rviz": "false",
"gazebo_gui": "false",
"start_joint_controller": "true",
# "gz_gui": "false",
}.items(),
)
return LaunchDescription([ReadyToTest(), simulator])
Expand Down Expand Up @@ -118,7 +118,7 @@ def init_robot(self):
# TODO: Replace this timeout with a proper check whether the robot is initialized
time.sleep(5)

def test_trajectory(self, ur_type):
def test_trajectory(self):
"""Test robot movement."""
# Construct test trajectory
test_trajectory = [
Expand Down

0 comments on commit 2ef548c

Please sign in to comment.