@@ -105,7 +105,8 @@ def setUp(self):
105105 # Tests
106106 #
107107
108- def test_trajectory_with_tool_contact_no_trigger_succeeds (self , tf_prefix ):
108+ def test_trajectory_with_tool_contact_no_trigger_succeeds (self , tf_prefix , initial_joint_controller ):
109+ self ._controller_manager_interface .wait_for_controller (initial_joint_controller )
109110 self .assertTrue (
110111 self ._controller_manager_interface .switch_controller (
111112 strictness = SwitchController .Request .BEST_EFFORT ,
@@ -133,18 +134,13 @@ def test_trajectory_with_tool_contact_no_trigger_succeeds(self, tf_prefix):
133134 self .assertEqual (
134135 result .until_condition_result , FollowJointTrajectoryUntil .Result .NOT_TRIGGERED
135136 )
136- self .assertTrue (
137- self ._controller_manager_interface .switch_controller (
138- strictness = SwitchController .Request .BEST_EFFORT ,
139- deactivate_controllers = ["tool_contact_controller" ],
140- ).ok
141- )
142137
143- def test_trajectory_until_can_cancel (self , tf_prefix ):
138+ def test_trajectory_until_can_cancel (self , tf_prefix , initial_joint_controller ):
139+ self ._controller_manager_interface .wait_for_controller (initial_joint_controller )
144140 self .assertTrue (
145141 self ._controller_manager_interface .switch_controller (
146142 strictness = SwitchController .Request .BEST_EFFORT ,
147- activate_controllers = ["tool_contact_controller" ],
143+ activate_controllers = ["tool_contact_controller" , initial_joint_controller ],
148144 ).ok
149145 )
150146 trajectory = JointTrajectory ()
@@ -162,9 +158,3 @@ def test_trajectory_until_can_cancel(self, tf_prefix):
162158 self .assertTrue (goal_handle .accepted )
163159 result = self ._trajectory_until_interface .cancel_goal (goal_handle )
164160 self .assertEqual (result .return_code , CancelGoal_Response .ERROR_NONE )
165- self .assertTrue (
166- self ._controller_manager_interface .switch_controller (
167- strictness = SwitchController .Request .BEST_EFFORT ,
168- deactivate_controllers = ["tool_contact_controller" ],
169- ).ok
170- )
0 commit comments