From 3bccce9cfcec4fe245cce60b253b153e934394b0 Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Mon, 12 Aug 2019 17:22:55 +0200
Subject: [PATCH] Make demo darpa_hyq Python 3 compatible.

---
 script/scenarios/demos/darpa_hyq.py      | 4 ++--
 script/scenarios/demos/darpa_hyq_path.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/script/scenarios/demos/darpa_hyq.py b/script/scenarios/demos/darpa_hyq.py
index aff1edf5..a6bb26a4 100644
--- a/script/scenarios/demos/darpa_hyq.py
+++ b/script/scenarios/demos/darpa_hyq.py
@@ -103,7 +103,7 @@ def genPlan(stepsize=0.06):
 	start = time.time() 
 	configs = fullBody.interpolate(stepsize, 5, 0., filterStates = True,testReachability = False)
 	end = time.time() 
-	print "Contact plan generated in " + str(end-start) + "seconds"
+	print("Contact plan generated in " + str(end-start) + "seconds")
 	
 def contactPlan(step = 0.5):
 	v.client.gui.setVisibility("hyq", "ON")
@@ -115,6 +115,6 @@ def contactPlan(step = 0.5):
 		time.sleep(step)
                 		
 		
-print "Root path generated in " + str(tp.t) + " ms."
+print("Root path generated in " + str(tp.t) + " ms.")
 
 genPlan(0.01);contactPlan(0.01)
diff --git a/script/scenarios/demos/darpa_hyq_path.py b/script/scenarios/demos/darpa_hyq_path.py
index 60f30022..c98745c5 100644
--- a/script/scenarios/demos/darpa_hyq_path.py
+++ b/script/scenarios/demos/darpa_hyq_path.py
@@ -57,7 +57,7 @@ t = ps.solve ()
 if isinstance(t, list):
 	t = t[0]* 3600000 + t[1] * 60000 + t[2] * 1000 + t[3]	
 
-print "computation time for root path ", t
+print("computation time for root path ", t)
 
 # Playing the computed path
 from hpp.gepetto import PathPlayer
-- 
GitLab