res = ps.client.manipulation.problem.applyConstraints (cg.nodes['free'], q_goal_monotone) if not res[0]: raise Exception ('Goal configuration could not be projected.') q_goal_monotone_proj = res [1] res = ps.client.manipulation.problem.applyConstraints (cg.nodes['free'], q_goal_inverted) if not res[0]: raise Exception ('Goal configuration could not be projected.') q_goal_inverted_proj = res [1] ps.setInitialConfig (q_init_proj) # ps.addGoalConfig (q_goal_monotone_proj) ps.addGoalConfig (q_goal_inverted_proj) # from hpp.corbaserver import Benchmark import sys from hpp.corbaserver import Benchmark b = Benchmark (robot.client.basic, robot, ps) b.seedRange = xrange (20) b.iterPerCase = 1 b.tryResumeAndDelete () try: b.do() except: sys.exit(1) b.writeResume (filename = "results.pickle")
cg.setConstraints (graph = True, lockDof = lockAll) res = ps.client.manipulation.problem.applyConstraints (cg.nodes['free'], q_init) if not res[0]: raise Exception ('Init configuration could not be projected.') q_init_proj = res [1] res = ps.client.manipulation.problem.applyConstraints (cg.nodes['free'], q_goal) if not res[0]: raise Exception ('Goal configuration could not be projected.') q_goal_proj = res [1] ps.setInitialConfig (q_init_proj) ps.addGoalConfig (q_goal_proj) from hpp.corbaserver import Benchmark import random, sys b = Benchmark (robot.client.basic, robot, ps) b.seedRange = random.sample (xrange (100000), 20) # b.iterPerCase = 3 b.tryResumeAndDelete () try: results = b.do() except: sys.exit(1) b.writeResume (filename = "results.pickle")
v = Viewer (ps) v.loadObstacleModel("hpp-ompl-benchmark", "Abstract_env", "env") q_init = [2.1, -5.81216, -1, 1 , 0, 0, 0] q_goal = [-3, -4.3, 1, 0.7071, 0.7071, 0, 0] v(q_init) robot.setJointBounds ('base_joint_xyz', [-5.5, 6.5, -12, 0, -5, 6]) # robot.setJointBounds ('base_joint_SO3', [-pi, pi, -pi, pi, -pi, pi, -pi, pi]) ps.setInitialConfig (q_init) ps.addGoalConfig (q_goal) from hpp.corbaserver import Benchmark benchmark = Benchmark (robot.client, robot, ps) ps.client.problem.setRandomSeed(1927402002) benchmark.seedRange = range (50) benchmark.iterPerCase = 1 results = benchmark.do() benchmark.writeDatabase("dbHPP.db","abstract","abstractLogs.log",True) #------------------------------------------------------------------ # name = cubicles # robot = cubicles_robot # world = cubicles_env from math import pi from hpp.corbaserver.hpp_ompl_benchmark.cubicles import Robot robot = Robot('ompl') from hpp.corbaserver import ProblemSolver
#!/usr/bin/env python from hpp.corbaserver import Benchmark import argparse parser = argparse.ArgumentParser\ (description='Print results obtained with class hpp.corbaserver.Benchmark') parser.add_argument ('input_file', type = str, nargs = 1, help = 'input file containing the saved results') parser.add_argument ('output_file', type = str, nargs = '?', default=None, help = 'output file (standard output is used if omitted)') args = parser.parse_args () b = Benchmark(None, None, None) b.resumeFrom(args.input_file[0]) if args.output_file: with open (args.output_file, 'w') as f: f.write(str(b)) else: print b
from hpp.corbaserver import ProblemSolver ps = ProblemSolver (robot) from hpp.gepetto import Viewer v = Viewer (ps) v.loadObstacleModel("hpp-ompl-benchmark", "pipedream_env", "env") q_init = [2.02,-0.0912,0.786,0.707,0.707,0,0] q_goal = [1.587,-0.345,0.634,1,0,0,0] robot.setJointBounds ('base_joint_xyz', [1.08, 2.43, -0.824, 0.28, 0.3, 1.7]) # robot.setJointBounds ('base_joint_SO3', [-pi, pi, -pi, pi, -pi, pi, -pi, pi]) ps.setInitialConfig (q_init) ps.addGoalConfig (q_goal) ps.client.problem.selectPathValidation("Progressive",0.03) ps.client.problem.clearPathOptimizers() v(q_init) from hpp.corbaserver import Benchmark benchmark = Benchmark (robot.client, robot, ps) #ps.client.problem.setRandomSeed(3530408688) benchmark.seedRange = range (50) benchmark.iterPerCase = 1 results = benchmark.do() benchmark.writeDatabase("dbHPPCont.db","pipedream","pipedreamLogsCont.log",True)
#!/usr/bin/env python from hpp.corbaserver import Benchmark import argparse parser = argparse.ArgumentParser\ (description='Print results obtained with class hpp.corbaserver.Benchmark') parser.add_argument('input_file', type=str, nargs=1, help='input file containing the saved results') parser.add_argument('output_file', type=str, nargs='?', default=None, help='output file (standard output is used if omitted)') args = parser.parse_args() b = Benchmark(None, None, None) b.resumeFrom(args.input_file[0]) if args.output_file: with open(args.output_file, 'w') as f: f.write(str(b)) else: print b