@@ -187,6 +187,13 @@ def io_msg_cb(msg):
187187
188188 def test_trajectory (self , tf_prefix ):
189189 """Test robot movement."""
190+ self .assertTrue (
191+ self ._controller_manager_interface .switch_controller (
192+ strictness = SwitchController .Request .BEST_EFFORT ,
193+ deactivate_controllers = ["passthrough_trajectory_controller" ],
194+ activate_controllers = ["scaled_joint_trajectory_controller" ],
195+ ).ok
196+ )
190197 # Construct test trajectory
191198 test_trajectory = [
192199 (Duration (sec = 6 , nanosec = 0 ), [0.0 for j in ROBOT_JOINTS ]),
@@ -219,6 +226,13 @@ def test_illegal_trajectory(self, tf_prefix):
219226
220227 This is more of a validation test that the testing suite does the right thing
221228 """
229+ self .assertTrue (
230+ self ._controller_manager_interface .switch_controller (
231+ strictness = SwitchController .Request .BEST_EFFORT ,
232+ deactivate_controllers = ["passthrough_trajectory_controller" ],
233+ activate_controllers = ["scaled_joint_trajectory_controller" ],
234+ ).ok
235+ )
222236 # Construct test trajectory, the second point wrongly starts before the first
223237 test_trajectory = [
224238 (Duration (sec = 6 , nanosec = 0 ), [0.0 for j in ROBOT_JOINTS ]),
@@ -244,6 +258,13 @@ def test_illegal_trajectory(self, tf_prefix):
244258
245259 def test_trajectory_scaled (self , tf_prefix ):
246260 """Test robot movement."""
261+ self .assertTrue (
262+ self ._controller_manager_interface .switch_controller (
263+ strictness = SwitchController .Request .BEST_EFFORT ,
264+ deactivate_controllers = ["passthrough_trajectory_controller" ],
265+ activate_controllers = ["scaled_joint_trajectory_controller" ],
266+ ).ok
267+ )
247268 # Construct test trajectory
248269 test_trajectory = [
249270 (Duration (sec = 6 , nanosec = 0 ), [0.0 for j in ROBOT_JOINTS ]),
0 commit comments