Commit 5f05f20f authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[demo] talos maze and flatGround can now work without viewer

parent 8bf700fc
......@@ -46,7 +46,18 @@ from hpp.corbaserver.affordance.affordance import AffordanceTool
afftool = AffordanceTool ()
afftool.setAffordanceConfig('Support', [0.5, 0.03, 0.00005])
afftool.loadObstacleModel ("hpp_environments", "multicontact/ground", "planning", vf)
v = vf.createViewer(displayArrows = True)
try :
v = vf.createViewer(displayArrows = True)
except Exception:
print "No viewer started !"
class FakeViewer():
def __init__(self):
return
def __call__(self,q):
return
def addLandmark(self,a,b):
return
v = FakeViewer()
#afftool.visualiseAffordances('Support', v, v.color.lightBrown)
# Setting initial configuration
......@@ -84,7 +95,7 @@ from hpp.gepetto import PathPlayer
pp = PathPlayer (v)
pp.dt=0.1
#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)
......
......@@ -55,7 +55,18 @@ afftool = AffordanceTool ()
afftool.setAffordanceConfig('Support', [0.5, 0.03, 5.])
afftool.loadObstacleModel ("hpp_environments", "multicontact/maze_hard", "planning", vf)
#load the viewer
v = vf.createViewer(displayArrows = True)
try :
v = vf.createViewer(displayArrows = True)
except Exception:
print "No viewer started !"
class FakeViewer():
def __init__(self):
return
def __call__(self,q):
return
def addLandmark(self,a,b):
return
v = FakeViewer()
v.addLandmark(v.sceneName,1)
afftool.visualiseAffordances('Support', v, v.color.lightBrown)
......@@ -96,11 +107,11 @@ from hpp.gepetto import PathPlayer
pp = PathPlayer (v)
pp.dt=0.01
pp.displayPath(pathId)
v.client.gui.setVisibility("path_"+str(pathId)+"_root","ALWAYS_ON_TOP")
#v.client.gui.setVisibility("path_"+str(pathId)+"_root","ALWAYS_ON_TOP")
pp.dt=0.01
#pp(pathId)
v.client.gui.writeNodeFile("path_"+str(pathId)+"_root","guide_path_maze_hard.obj")
#v.client.gui.writeNodeFile("path_"+str(pathId)+"_root","guide_path_maze_hard.obj")
# move the robot out of the view before computing the contacts
q_far = q_init[::]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment