From 194f6cda9d1f22cb56999eb840b0572111f23302 Mon Sep 17 00:00:00 2001 From: Jonas Date: Mon, 4 Jun 2018 10:22:49 +0200 Subject: [PATCH] check if autonomouslife is already disabled in movements.py --- scripts/movements.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/movements.py b/scripts/movements.py index f3c16aa..466a70f 100644 --- a/scripts/movements.py +++ b/scripts/movements.py @@ -8,7 +8,8 @@ class NaoMover(object): self.mp = ALProxy('ALMotion', nao_ip, nao_port) self.pp = ALProxy('ALRobotPosture', nao_ip, nao_port) ap = ALProxy("ALAutonomousLife", nao_ip, nao_port) - ap.setState('disabled') + if ap.getState()!="disabled": + ap.setState('disabled') self.set_head_stiffness() self.set_hand_stiffness() self.set_arm_stiffness()