Skip to content

Commit 28e115f

Browse files
committed
Clear the e-stop automatically after running the create3 button tests; pressing the power button may enable it
1 parent c24d9f1 commit 28e115f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

turtlebot4_tests/turtlebot4_tests/ros_tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
from rclpy.node import Node
4343
from rclpy.qos import qos_profile_sensor_data
4444

45+
from irobot_create_msgs.srv import EStop
46+
4547
from std_msgs.msg import String
4648

4749
from turtlebot4_msgs.msg import UserButton, UserLed
@@ -196,6 +198,12 @@ def createButtonTest(self):
196198
pass
197199
results.append(boolTestResults(True, 'Create Button 2'))
198200

201+
# Pressing the middle button can engage the e-stop, so clear it
202+
e_stop_service_client = self.create_client(EStop, 'e_stop')
203+
req = EStop.Request()
204+
req.e_stop_on = False
205+
e_stop_service_client.call(req)
206+
199207
self.destroy_subscription(create_button_sub)
200208
printTestResults('Create3 Button Test', results)
201209
logTestResults(self.log_file_name, 'Create3 Button Test', results)

0 commit comments

Comments
 (0)