cleanup processes on stop

This commit is contained in:
Hunter 2024-07-19 15:14:20 -04:00
parent 482d05f252
commit d47413de71
1 changed files with 8 additions and 3 deletions

View File

@ -60,6 +60,11 @@ ur.await_stop = True
ur.forward_position() ur.forward_position()
while True: while True:
try:
ur.move_robot_base(-current_joystick[0]) ur.move_robot_base(-current_joystick[0])
print("Setting robot base velocity to: ", current_joystick[0]) print("Setting robot base velocity to: ", current_joystick[0])
time.sleep(0.2) time.sleep(0.2)
except KeyboardInterrupt:
camera_joystick.stop()
joystick_scheduler.stop()
break