From e5e17d743fd97bda7ea874c277b9cc3f16bcf9ef Mon Sep 17 00:00:00 2001 From: Michel Breyer <10465414+mbreyer@users.noreply.github.com> Date: Mon, 6 Dec 2021 10:22:04 +0100 Subject: [PATCH] Add option to stop an experiment --- scripts/run.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/run.py b/scripts/run.py index 0f3bba9..57bb81a 100755 --- a/scripts/run.py +++ b/scripts/run.py @@ -32,7 +32,9 @@ def main(): controller.gripper.move(0.08) controller.switch_to_joint_trajectory_control() controller.moveit.goto("ready") - input("Press Enter to continue...") + i = input("Run policy? [y/n] ") + if i != "y": + exit() rospy.loginfo("Running policy ...") info = controller.run() logger.log_run(info)