Commit c8e717ed authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

Refactor python3 : fix relative imports

parent 6b48f744
...@@ -5,7 +5,7 @@ import time ...@@ -5,7 +5,7 @@ import time
from constraint_to_dae import * from constraint_to_dae import *
from hpp.corbaserver.rbprm.rbprmstate import State,StateHelper from hpp.corbaserver.rbprm.rbprmstate import State,StateHelper
from hpp.corbaserver.rbprm.tools.display_tools import * from hpp.corbaserver.rbprm.tools.display_tools import *
import flatGround_hrp2_pathKino as tp from . import flatGround_hrp2_pathKino as tp
import time import time
import numpy as np import numpy as np
tPlanning = tp.tPlanning tPlanning = tp.tPlanning
...@@ -175,7 +175,7 @@ mid_sid = fullBody.addState(q,[lLegId,rLegId]) ...@@ -175,7 +175,7 @@ mid_sid = fullBody.addState(q,[lLegId,rLegId])
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
import fullBodyPlayerHrp2 from . import fullBodyPlayerHrp2
tStart = time.time() tStart = time.time()
configsFull = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = 0, filterStates = True,testReachability=False,quasiStatic=False) configsFull = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = 0, filterStates = True,testReachability=False,quasiStatic=False)
......
...@@ -7,7 +7,7 @@ from constraint_to_dae import * ...@@ -7,7 +7,7 @@ from constraint_to_dae import *
from hpp.corbaserver.rbprm.rbprmstate import State,StateHelper from hpp.corbaserver.rbprm.rbprmstate import State,StateHelper
from hpp.corbaserver.rbprm.tools.display_tools import * from hpp.corbaserver.rbprm.tools.display_tools import *
#calling script darpa_hyq_path to compute root path #calling script darpa_hyq_path to compute root path
import flatGround_hyq_pathKino as tp from . import flatGround_hyq_pathKino as tp
from os import environ from os import environ
ins_dir = environ['DEVEL_DIR'] ins_dir = environ['DEVEL_DIR']
......
from flatGround_hrp2_interp import * from .flatGround_hrp2_interp import *
print("# generating MUSCOD problem #") print("# generating MUSCOD problem #")
print("####################################") print("####################################")
......
...@@ -5,7 +5,7 @@ import time ...@@ -5,7 +5,7 @@ import time
from constraint_to_dae import * from constraint_to_dae import *
from hpp.corbaserver.rbprm.rbprmstate import State,StateHelper from hpp.corbaserver.rbprm.rbprmstate import State,StateHelper
from hpp.corbaserver.rbprm.tools.display_tools import * from hpp.corbaserver.rbprm.tools.display_tools import *
import plateform_hand_hrp2_path as tp from . import plateform_hand_hrp2_path as tp
import time import time
tPlanning = tp.tPlanning tPlanning = tp.tPlanning
...@@ -144,7 +144,7 @@ mid_sid = fullBody.addState(q,[lLegId,rLegId]) ...@@ -144,7 +144,7 @@ mid_sid = fullBody.addState(q,[lLegId,rLegId])
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
import fullBodyPlayerHrp2 from . import fullBodyPlayerHrp2
tStart = time.time() tStart = time.time()
......
...@@ -5,7 +5,7 @@ import time ...@@ -5,7 +5,7 @@ import time
from constraint_to_dae import * from constraint_to_dae import *
from hpp.corbaserver.rbprm.rbprmstate import State,StateHelper from hpp.corbaserver.rbprm.rbprmstate import State,StateHelper
from hpp.corbaserver.rbprm.tools.display_tools import * from hpp.corbaserver.rbprm.tools.display_tools import *
import plateform_hrp2_path as tp from . import plateform_hrp2_path as tp
import time import time
tPlanning = tp.tPlanning tPlanning = tp.tPlanning
...@@ -134,7 +134,7 @@ mid_sid = fullBody.addState(q,[lLegId,rLegId]) ...@@ -134,7 +134,7 @@ mid_sid = fullBody.addState(q,[lLegId,rLegId])
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
import fullBodyPlayerHrp2 from . import fullBodyPlayerHrp2
""" """
tStart = time.time() tStart = time.time()
......
...@@ -5,7 +5,7 @@ import time ...@@ -5,7 +5,7 @@ import time
from constraint_to_dae import * from constraint_to_dae import *
from hpp.corbaserver.rbprm.rbprmstate import State,StateHelper from hpp.corbaserver.rbprm.rbprmstate import State,StateHelper
from hpp.corbaserver.rbprm.tools.display_tools import * from hpp.corbaserver.rbprm.tools.display_tools import *
import plateform_hrp2_path as tp from . import plateform_hrp2_path as tp
import time import time
tPlanning = tp.tPlanning tPlanning = tp.tPlanning
...@@ -134,7 +134,7 @@ mid_sid = fullBody.addState(q,[lLegId,rLegId]) ...@@ -134,7 +134,7 @@ mid_sid = fullBody.addState(q,[lLegId,rLegId])
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
import fullBodyPlayerHrp2 from . import fullBodyPlayerHrp2
""" """
tStart = time.time() tStart = time.time()
......
...@@ -5,7 +5,7 @@ from hpp.corbaserver.rbprm.problem_solver import ProblemSolver ...@@ -5,7 +5,7 @@ from hpp.corbaserver.rbprm.problem_solver import ProblemSolver
from hpp.gepetto import Viewer from hpp.gepetto import Viewer
#calling script darpa_hyq_path to compute root path #calling script darpa_hyq_path to compute root path
import prepareJump_hyq_pathKino as tp from . import prepareJump_hyq_pathKino as tp
from os import environ from os import environ
ins_dir = environ['DEVEL_DIR'] ins_dir = environ['DEVEL_DIR']
...@@ -95,7 +95,7 @@ r(configs[-1]) ...@@ -95,7 +95,7 @@ r(configs[-1])
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
from fullBodyPlayer import Player from .fullBodyPlayer import Player
player = Player(fullBody,pp,tp,configs,draw=False,optim_effector=False,use_velocity=dynamic,pathId = 0) player = Player(fullBody,pp,tp,configs,draw=False,optim_effector=False,use_velocity=dynamic,pathId = 0)
#player.displayContactPlan() #player.displayContactPlan()
......
...@@ -2,7 +2,7 @@ from hpp.corbaserver.rbprm.rbprmbuilder import Builder ...@@ -2,7 +2,7 @@ from hpp.corbaserver.rbprm.rbprmbuilder import Builder
from hpp.corbaserver.rbprm.rbprmfullbody import FullBody from hpp.corbaserver.rbprm.rbprmfullbody import FullBody
from hpp.gepetto import Viewer from hpp.gepetto import Viewer
from tools import * from tools import *
import walkBauzil_hrp2_pathKino as tp from . import walkBauzil_hrp2_pathKino as tp
import time import time
import omniORB.any import omniORB.any
...@@ -142,7 +142,7 @@ fullBody.setStaticStability(True) # only set it after the init/goal configuratio ...@@ -142,7 +142,7 @@ fullBody.setStaticStability(True) # only set it after the init/goal configuratio
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
import fullBodyPlayerHrp2 from . import fullBodyPlayerHrp2
tStart = time.time() tStart = time.time()
configs = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = robTreshold, filterStates = False) configs = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = robTreshold, filterStates = False)
......
...@@ -9,7 +9,7 @@ from hpp.gepetto import Viewer ...@@ -9,7 +9,7 @@ from hpp.gepetto import Viewer
#calling script darpa_hyq_path to compute root path #calling script darpa_hyq_path to compute root path
import sideWall_hyq_pathKino as tp from . import sideWall_hyq_pathKino as tp
from os import environ from os import environ
...@@ -105,7 +105,7 @@ r(configs[-1]) ...@@ -105,7 +105,7 @@ r(configs[-1])
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
from fullBodyPlayer import Player from .fullBodyPlayer import Player
player = Player(fullBody,pp,tp,configs,draw=True,optim_effector=False,use_velocity=dynamic,pathId = 1) player = Player(fullBody,pp,tp,configs,draw=True,optim_effector=False,use_velocity=dynamic,pathId = 1)
#player.displayContactPlan() #player.displayContactPlan()
......
...@@ -11,7 +11,7 @@ from hpp.gepetto import Viewer ...@@ -11,7 +11,7 @@ from hpp.gepetto import Viewer
#calling script darpa_hyq_path to compute root path #calling script darpa_hyq_path to compute root path
import sideWall_hyq_pathKino as tp from . import sideWall_hyq_pathKino as tp
from os import environ from os import environ
...@@ -135,7 +135,7 @@ r(configs[-1]) ...@@ -135,7 +135,7 @@ r(configs[-1])
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
from fullBodyPlayer import Player from .fullBodyPlayer import Player
player = Player(fullBody,pp,tp,configs,draw=True,optim_effector=False,use_velocity=False,pathId = 0) player = Player(fullBody,pp,tp,configs,draw=True,optim_effector=False,use_velocity=False,pathId = 0)
#player.displayContactPlan() #player.displayContactPlan()
......
...@@ -11,7 +11,7 @@ from hpp.gepetto import Viewer ...@@ -11,7 +11,7 @@ from hpp.gepetto import Viewer
#calling script darpa_hyq_path to compute root path #calling script darpa_hyq_path to compute root path
import sideWall_hyq_pathKino as tp from . import sideWall_hyq_pathKino as tp
from os import environ from os import environ
......
...@@ -11,7 +11,7 @@ from hpp.gepetto import Viewer ...@@ -11,7 +11,7 @@ from hpp.gepetto import Viewer
#calling script darpa_hyq_path to compute root path #calling script darpa_hyq_path to compute root path
import sideWall_hyq_pathKino as tp from . import sideWall_hyq_pathKino as tp
from os import environ from os import environ
...@@ -135,7 +135,7 @@ r(configs[-1]) ...@@ -135,7 +135,7 @@ r(configs[-1])
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
from fullBodyPlayer import Player from .fullBodyPlayer import Player
player = Player(fullBody,pp,tp,configs,draw=True,optim_effector=False,use_velocity=dynamic,pathId = 0) player = Player(fullBody,pp,tp,configs,draw=True,optim_effector=False,use_velocity=dynamic,pathId = 0)
......
...@@ -2,7 +2,7 @@ from hpp.corbaserver.rbprm.rbprmbuilder import Builder ...@@ -2,7 +2,7 @@ from hpp.corbaserver.rbprm.rbprmbuilder import Builder
from hpp.corbaserver.rbprm.rbprmfullbody import FullBody from hpp.corbaserver.rbprm.rbprmfullbody import FullBody
from hpp.gepetto import Viewer from hpp.gepetto import Viewer
#from tools import * #from tools import *
import slalom_bauzil_hrp2_pathKino as tp from . import slalom_bauzil_hrp2_pathKino as tp
import time import time
import omniORB.any import omniORB.any
from constraint_to_dae import * from constraint_to_dae import *
...@@ -136,7 +136,7 @@ fullBody.setStaticStability(True) # only set it after the init/goal configuratio ...@@ -136,7 +136,7 @@ fullBody.setStaticStability(True) # only set it after the init/goal configuratio
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
import fullBodyPlayerHrp2 from . import fullBodyPlayerHrp2
tStart = time.time() tStart = time.time()
configsFull = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = robTreshold, filterStates = True,testReachability=True,quasiStatic=False) configsFull = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = robTreshold, filterStates = True,testReachability=True,quasiStatic=False)
......
...@@ -2,7 +2,7 @@ from hpp.corbaserver.rbprm.rbprmbuilder import Builder ...@@ -2,7 +2,7 @@ from hpp.corbaserver.rbprm.rbprmbuilder import Builder
from hpp.corbaserver.rbprm.rbprmfullbody import FullBody from hpp.corbaserver.rbprm.rbprmfullbody import FullBody
from hpp.gepetto import Viewer from hpp.gepetto import Viewer
#from tools import * #from tools import *
import slalom_bauzil_hrp2_path as tp from . import slalom_bauzil_hrp2_path as tp
import time import time
import omniORB.any import omniORB.any
from hpp.corbaserver.rbprm.tools.display_tools import * from hpp.corbaserver.rbprm.tools.display_tools import *
...@@ -148,7 +148,7 @@ fullBody.setStaticStability(True) # only set it after the init/goal configuratio ...@@ -148,7 +148,7 @@ fullBody.setStaticStability(True) # only set it after the init/goal configuratio
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
import fullBodyPlayerHrp2 from . import fullBodyPlayerHrp2
tStart = time.time() tStart = time.time()
configs = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = robTreshold, filterStates = True,testReachability=True,quasiStatic=False) configs = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = robTreshold, filterStates = True,testReachability=True,quasiStatic=False)
......
...@@ -2,7 +2,7 @@ from hpp.corbaserver.rbprm.rbprmbuilder import Builder ...@@ -2,7 +2,7 @@ from hpp.corbaserver.rbprm.rbprmbuilder import Builder
from hpp.corbaserver.rbprm.rbprmfullbody import FullBody from hpp.corbaserver.rbprm.rbprmfullbody import FullBody
from hpp.gepetto import Viewer from hpp.gepetto import Viewer
from tools import * from tools import *
import slalom_hrp2_pathKino as tp from . import slalom_hrp2_pathKino as tp
import time import time
import omniORB.any import omniORB.any
...@@ -128,7 +128,7 @@ fullBody.setStaticStability(False) # only set it after the init/goal configurati ...@@ -128,7 +128,7 @@ fullBody.setStaticStability(False) # only set it after the init/goal configurati
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
import fullBodyPlayerHrp2 from . import fullBodyPlayerHrp2
tStart = time.time() tStart = time.time()
configs = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = robTreshold, filterStates = True) configs = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = robTreshold, filterStates = True)
......
...@@ -2,7 +2,7 @@ from hpp.corbaserver.rbprm.rbprmbuilder import Builder ...@@ -2,7 +2,7 @@ from hpp.corbaserver.rbprm.rbprmbuilder import Builder
from hpp.corbaserver.rbprm.rbprmfullbody import FullBody from hpp.corbaserver.rbprm.rbprmfullbody import FullBody
from hpp.gepetto import Viewer from hpp.gepetto import Viewer
import slalom_hrp2_pathKino as tp from . import slalom_hrp2_pathKino as tp
import time import time
import omniORB.any import omniORB.any
...@@ -108,7 +108,7 @@ fullBody.runLimbSampleAnalysis(lLegId, "jointLimitsDistance", True) ...@@ -108,7 +108,7 @@ fullBody.runLimbSampleAnalysis(lLegId, "jointLimitsDistance", True)
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
import fullBodyPlayerHrp2 from . import fullBodyPlayerHrp2
configs = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = 1, filterStates = True) configs = fullBody.interpolate(0.01,pathId=pId,robustnessTreshold = 1, filterStates = True)
print("number of configs :", len(configs)) print("number of configs :", len(configs))
......
...@@ -167,7 +167,7 @@ pp.speed=1 ...@@ -167,7 +167,7 @@ pp.speed=1
#pp (0) #pp (0)
import parse_bench from . import parse_bench
parse_bench.parseBenchmark(t) parse_bench.parseBenchmark(t)
......
...@@ -5,7 +5,7 @@ from hpp.corbaserver.rbprm.problem_solver import ProblemSolver ...@@ -5,7 +5,7 @@ from hpp.corbaserver.rbprm.problem_solver import ProblemSolver
from hpp.gepetto import Viewer from hpp.gepetto import Viewer
import omniORB.any import omniORB.any
#calling script darpa_hyq_path to compute root path #calling script darpa_hyq_path to compute root path
import slalom_hyq_pathKino as tp from . import slalom_hyq_pathKino as tp
from os import environ from os import environ
ins_dir = environ['DEVEL_DIR'] ins_dir = environ['DEVEL_DIR']
......
...@@ -5,7 +5,7 @@ from hpp.corbaserver.rbprm.problem_solver import ProblemSolver ...@@ -5,7 +5,7 @@ from hpp.corbaserver.rbprm.problem_solver import ProblemSolver
from hpp.gepetto import Viewer from hpp.gepetto import Viewer
#calling script darpa_hyq_path to compute root path #calling script darpa_hyq_path to compute root path
import slalom_hyq_pathKino05 as tp from . import slalom_hyq_pathKino05 as tp
from os import environ from os import environ
ins_dir = environ['DEVEL_DIR'] ins_dir = environ['DEVEL_DIR']
...@@ -96,7 +96,7 @@ r(configs[-1]) ...@@ -96,7 +96,7 @@ r(configs[-1])
from hpp.gepetto import PathPlayer from hpp.gepetto import PathPlayer
pp = PathPlayer (fullBody.client.basic, r) pp = PathPlayer (fullBody.client.basic, r)
import fullBodyPlayer from . import fullBodyPlayer
player = fullBodyPlayer.Player(fullBody,pp,tp,configs,draw=True,optim_effector=False,use_velocity=dynamic,pathId = pathId) player = fullBodyPlayer.Player(fullBody,pp,tp,configs,draw=True,optim_effector=False,use_velocity=dynamic,pathId = pathId)
#player.displayContactPlan() #player.displayContactPlan()
......
...@@ -134,7 +134,7 @@ pp.displayVelocityPath(ps.numberPaths()-1) ...@@ -134,7 +134,7 @@ pp.displayVelocityPath(ps.numberPaths()-1)
pp.speed=0.5 pp.speed=0.5
#pp (0) #pp (0)
import parse_bench from . import parse_bench
parse_bench.parseBenchmark(t) parse_bench.parseBenchmark(t)
print("path lenght = ",str(ps.client.problem.pathLength(ps.numberPaths()-1))) print("path lenght = ",str(ps.client.problem.pathLength(ps.numberPaths()-1)))
......
Markdown is supported
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