Commit 8a01f4c6 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

hpp_benchmarks.py

parent 5a447bac
#!/usr/bin/env python2
from pathlib import Path
from subprocess import Popen
from integration_utils import wrap_with_processes
DEPS = ['hpp-tutorial']
PATCHES = {
'baxter_manipulation_boxes': [
('N = 20', 'N = 1'),
('#v = vf.createViewer ()', 'v = vf.createViewer()'),
('#pp = PathPlayer (v)', 'pp = PathPlayer(v)'),
]
}
def baxter_manipulation_boxes(rbprm_path, **kwargs):
script = Path(rbprm_path) / 'hpp_benchmark/future' / 'baxter-manipulation-boxes' / 'script.py'
temp = '/tmp/gepetto-integrations-hpp-benchmarks.py'
with open(temp, 'w') as f_out:
with script.open() as f_in:
for line in f_in:
for before, after in PATCHES['baxter_manipulation_boxes']:
line = line.replace(before, after)
f_out.write(line)
f_out.write('pp(0)')
Popen(['python2', temp])
if __name__ == '__main__':
wrap_with_processes(['gepetto-gui', 'hppcorbaserver'], baxter_manipulation_boxes, DEPS)
......@@ -8,6 +8,8 @@ parser.add_argument('--python', default=27)
parser.add_argument('--qt', default=4)
parser.add_argument(
'--rbprm_path', default='/local/gsaurel/humanoid-path-planner', help='TODO this scripts should be installed')
parser.add_argument(
'--hpp_doc_path', default='/local/gsaurel/humanoid-path-planner', help='TODO this scripts should be packaged')
def wrap_with_processes(processes, f, deps):
......
......@@ -3,7 +3,6 @@
from pathlib import Path
from subprocess import Popen
import pinocchio as pin
from integration_utils import wrap_with_processes
DEPS = ['py-qt-hpp-gepetto-viewer', 'hpp-rbprm-corba', 'osg-dae', 'py-pinocchio']
......
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