Skip to content

Commit 08bab9a

Browse files
authored
Remove controller switch to passthrough controller (#1857)
The way it was implemented right now, the test was flakey, since it didn't wait for the passthrough controller to be loaded. This way, it could happen that the switch command was called while the CM didn't even know the passthrough controller resulting in the service call failing. Switching the controller shouldn't be necessary for the test, anyway, so it is removed in this commit.
1 parent 08ecfa3 commit 08bab9a

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

ur_robot_driver/test/integration_test_hand_back_control.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import pytest
3939
import rclpy
4040
from control_msgs.action import FollowJointTrajectory
41-
from controller_manager_msgs.srv import SwitchController
4241
from rclpy.node import Node
4342
from std_msgs.msg import Bool
4443

@@ -166,13 +165,6 @@ def program_state_cb(msg):
166165
self._controller_manager_interface.wait_for_controller(
167166
"joint_trajectory_controller", "active"
168167
)
169-
self.assertTrue(
170-
self._controller_manager_interface.switch_controller(
171-
strictness=SwitchController.Request.BEST_EFFORT,
172-
deactivate_controllers=["passthrough_trajectory_controller"],
173-
activate_controllers=["joint_trajectory_controller"],
174-
).ok
175-
)
176168

177169
self.assertTrue(
178170
external_control_running, "Robot program should be running before hand_back_control"

0 commit comments

Comments
 (0)