@@ -120,6 +120,7 @@ def setUp(self):
120120 self .assertTrue (self ._io_status_controller_interface .resend_robot_program ().success )
121121 self .tf_buffer = Buffer ()
122122 self .tf_listener = TransformListener (self .tf_buffer , self .node )
123+ time .sleep (1 ) # Wait whether the controller stopper resets controllers
123124
124125 def wait_for_lookup (self , source , target , timepoint , timeout = 5.0 ):
125126 """
@@ -139,11 +140,10 @@ def wait_for_lookup(self, source, target, timepoint, timeout=5.0):
139140 return trans
140141 except TransformException :
141142 rclpy .spin_once (self .node )
142- time .sleep (0.1 )
143143 raise TimeoutError ()
144144
145145 def lookup_tcp_in_base (self , tf_prefix , timepoint ):
146- return self .wait_for_lookup (tf_prefix + "base" , tf_prefix + "tool0 " , timepoint )
146+ return self .wait_for_lookup (tf_prefix + "base" , tf_prefix + "tool0_controller " , timepoint )
147147
148148 # Implementation of force mode test to be reused
149149 # todo: If we move to pytest this could be done using parametrization
@@ -534,7 +534,6 @@ def test_deactivating_controller_stops_force_mode(self, tf_prefix):
534534 ],
535535 ).ok
536536 )
537- self ._force_mode_controller_interface = ForceModeInterface (self .node )
538537
539538 time .sleep (0.5 )
540539 trans_before_wait = self .lookup_tcp_in_base (tf_prefix , self .node .get_clock ().now ())
@@ -546,6 +545,8 @@ def test_deactivating_controller_stops_force_mode(self, tf_prefix):
546545 self .assertAlmostEqual (
547546 trans_before_wait .transform .translation .z ,
548547 trans_after_wait .transform .translation .z ,
548+ delta = 1e-7 ,
549+ msg = "Robot should not move after force mode is stopped" ,
549550 )
550551
551552 def test_params_out_of_range_fails (self , tf_prefix ):
0 commit comments