Skip to content

Commit

Permalink
Clear the e-stop automatically after running the create3 button tests…
Browse files Browse the repository at this point in the history
…; pressing the power button may enable it
  • Loading branch information
civerachb-cpr committed Nov 4, 2024
1 parent c24d9f1 commit 28e115f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions turtlebot4_tests/turtlebot4_tests/ros_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
from rclpy.node import Node
from rclpy.qos import qos_profile_sensor_data

from irobot_create_msgs.srv import EStop

from std_msgs.msg import String

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

# Pressing the middle button can engage the e-stop, so clear it
e_stop_service_client = self.create_client(EStop, 'e_stop')
req = EStop.Request()
req.e_stop_on = False
e_stop_service_client.call(req)

self.destroy_subscription(create_button_sub)
printTestResults('Create3 Button Test', results)
logTestResults(self.log_file_name, 'Create3 Button Test', results)
Expand Down

0 comments on commit 28e115f

Please sign in to comment.