From 3df2ac332aa77933fae144e6fc335645d6a9e33b Mon Sep 17 00:00:00 2001
From: pFernbach <pierre.fernbach@gmail.com>
Date: Thu, 2 May 2019 10:40:50 +0200
Subject: [PATCH] [script] moveEffector correctly write configs in infos.log
 file

---
 script/scenarios/memmo/talos_moveEffector_flat.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/script/scenarios/memmo/talos_moveEffector_flat.py b/script/scenarios/memmo/talos_moveEffector_flat.py
index 5a98e0de..2d7aaf1e 100644
--- a/script/scenarios/memmo/talos_moveEffector_flat.py
+++ b/script/scenarios/memmo/talos_moveEffector_flat.py
@@ -12,7 +12,7 @@ statusFilename = "infos.log"
 
 fullBody = Robot ()
 # Set the bounds for the root
-fullBody.setJointBounds ("root_joint", [-0.3,0.3, -0.3, 0.3, 0.9, 1.05])
+fullBody.setJointBounds ("root_joint", [-0.3,0.3, -0.3, 0.3, 1.01, 1.03])
 ## reduce bounds on joints along x, to put conservative condition on the contact generation for sideway steps
 joint6L_bounds_prev=fullBody.getJointBounds('leg_left_6_joint')
 joint2L_bounds_prev=fullBody.getJointBounds('leg_left_2_joint')
@@ -108,7 +108,9 @@ else:
     print "Contact generation failed."
 
 
-f = open(statusFilename,"a")
+f = open(statusFilename,"w")
+f.write("q_init= "+str(s0.q())+"\n")
+f.write("q_goal= "+str(s1.q())+"\n")
 f.write("cg_success: "+str(cg_success)+"\n")
 f.write("cg_reach_goal: "+str(cg_reach_goal)+"\n")
 f.close()
-- 
GitLab