Skip to content
Snippets Groups Projects
Commit 43e6b6bf authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[demo] minor changes in talos_flatGround

parent e603228a
No related branches found
No related tags found
No related merge requests found
...@@ -32,9 +32,9 @@ tStart = time.time() ...@@ -32,9 +32,9 @@ tStart = time.time()
# generate databases : # generate databases :
nbSamples = 50000 nbSamples = 50000
fullBody.addLimb(fullBody.rLegId,fullBody.rleg,fullBody.rfoot,fullBody.rLegOffset,fullBody.rLegNormal, fullBody.rLegx, fullBody.rLegy, nbSamples, "fixedStep1", 0.01,kinematicConstraintsPath=fullBody.rLegKinematicConstraints) fullBody.addLimb(fullBody.rLegId,fullBody.rleg,fullBody.rfoot,fullBody.rLegOffset,fullBody.rLegNormal, fullBody.rLegx, fullBody.rLegy, nbSamples, "fixedStep08", 0.01,kinematicConstraintsPath=fullBody.rLegKinematicConstraints)
fullBody.runLimbSampleAnalysis(fullBody.rLegId, "ReferenceConfiguration", True) fullBody.runLimbSampleAnalysis(fullBody.rLegId, "ReferenceConfiguration", True)
fullBody.addLimb(fullBody.lLegId,fullBody.lleg,fullBody.lfoot,fullBody.lLegOffset,fullBody.rLegNormal, fullBody.lLegx, fullBody.lLegy, nbSamples, "fixedStep1", 0.01,kinematicConstraintsPath=fullBody.lLegKinematicConstraints) fullBody.addLimb(fullBody.lLegId,fullBody.lleg,fullBody.lfoot,fullBody.lLegOffset,fullBody.rLegNormal, fullBody.lLegx, fullBody.lLegy, nbSamples, "fixedStep08", 0.01,kinematicConstraintsPath=fullBody.lLegKinematicConstraints)
fullBody.runLimbSampleAnalysis(fullBody.lLegId, "ReferenceConfiguration", True) fullBody.runLimbSampleAnalysis(fullBody.lLegId, "ReferenceConfiguration", True)
...@@ -84,9 +84,10 @@ tStart = time.time() ...@@ -84,9 +84,10 @@ tStart = time.time()
configs = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = 2, filterStates = True) configs = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = 2, filterStates = True)
tInterpolateConfigs = time.time() - tStart tInterpolateConfigs = time.time() - tStart
print "Done." print "Done."
print "Contact plan generated in : "+str(tInterpolateConfigs)+" s"
print "number of configs :", len(configs) print "number of configs :", len(configs)
raw_input("Press Enter to display the contact sequence ...") #raw_input("Press Enter to display the contact sequence ...")
displayContactSequence(v,configs) #displayContactSequence(v,configs)
from hpp.corbaserver.rbprm.talos_abstract import Robot from hpp.corbaserver.rbprm.talos_abstract import Robot
from hpp.gepetto import Viewer from hpp.gepetto import Viewer
from hpp.corbaserver import Client
from hpp.corbaserver import ProblemSolver from hpp.corbaserver import ProblemSolver
import time import time
...@@ -84,9 +83,10 @@ print "Guide planning time : ",t ...@@ -84,9 +83,10 @@ print "Guide planning time : ",t
# display solution : # display solution :
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (v) pp = PathPlayer (v)
pp.dt=0.03 pp.dt=0.1
pp.displayVelocityPath(0) #pp.displayVelocityPath(0)
v.client.gui.setVisibility("path_0_root","ALWAYS_ON_TOP") v.client.gui.setVisibility("path_0_root","ALWAYS_ON_TOP")
pp.dt=0.01
#pp(0) #pp(0)
# move the robot out of the view before computing the contacts # move the robot out of the view before computing the contacts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment