From f69be1495ecf5e015198a9a2b7dda0fb92e7fd4f Mon Sep 17 00:00:00 2001 From: Francois Keith <keith@lirmm.fr> Date: Sun, 2 Jun 2013 22:20:33 +0200 Subject: [PATCH] Resets the posture of the robot between configs in sot-concept.py --- python/ros/sot-concept.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/python/ros/sot-concept.py b/python/ros/sot-concept.py index 9c6dfb8..3a3b7dc 100644 --- a/python/ros/sot-concept.py +++ b/python/ros/sot-concept.py @@ -325,8 +325,15 @@ ball.move((0.5,-0.2,1.0),0) next() next() next() - + +import time def config(ref=0): + # reset the robot configuration + stop() # stop the control loop + time.sleep(0.1) # wait (pb of sync with the viewer) + robot.device.set(robot.halfSitting) + next() # manual reset of the robot's posture + if ref==0: print '''Only the task RH''' elif ref==1: @@ -411,6 +418,8 @@ def menu(ref=0): print '''6: Task RH + foot constraint + COM= + SINGULARITE ''' print '''7: Task RH + foot constraint + COM= + SINGULARITE + DAMPING''' print '' + print '''Please re-type menu() to display this choice again''' + print '' uinp = raw_input(' Config? >> ') config(int(uinp)) -- GitLab