Skip to content

Commit 4008da7

Browse files
authored
Wait for used controllers in test setup (backport #1519) (#1520)
1 parent 4f1f0a6 commit 4008da7

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

ur_robot_driver/test/integration_test_force_mode.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ def init_robot(self):
114114
FollowJointTrajectory,
115115
)
116116

117+
self._controller_manager_interface.wait_for_controller("force_mode_controller")
118+
self._controller_manager_interface.wait_for_controller("scaled_joint_trajectory_controller")
119+
self._controller_manager_interface.wait_for_controller("joint_trajectory_controller")
120+
117121
def setUp(self):
118122
self._dashboard_interface.start_robot()
119123
time.sleep(1)

ur_robot_driver/test/integration_test_passthrough_controller.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ def init_robot(self):
107107
FollowJointTrajectory,
108108
)
109109

110+
# Wait for all controllers needed below, as controller manager services might fail
111+
# e.g. when attempting to deactivate an unknown controller
112+
self._controller_manager_interface.wait_for_controller("scaled_joint_trajectory_controller")
113+
110114
def setUp(self):
111115
self._dashboard_interface.start_robot()
112116
time.sleep(1)

ur_robot_driver/test/integration_test_scaled_joint_controller.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ def init_robot(self):
8888
FollowJointTrajectory,
8989
)
9090

91+
# Wait for all controllers needed below, as controller manager services might fail
92+
# e.g. when attempting to deactivate an unknown controller
93+
self._controller_manager_interface.wait_for_controller("passthrough_trajectory_controller")
94+
9195
def setUp(self):
9296
self._dashboard_interface.start_robot()
9397
time.sleep(1)

0 commit comments

Comments
 (0)