16 from os.path
import abspath, dirname, join
18 ompl_app_root = dirname(dirname(dirname(abspath(__file__))))
21 from ompl
import base
as ob
22 from ompl
import app
as oa
24 sys.path.insert(0, join(ompl_app_root,
'ompl/py-bindings'))
25 from ompl
import base
as ob
26 from ompl
import app
as oa
29 setup = oa.SE3RigidBodyPlanning()
32 setup.setRobotMesh(
'3D/cubicles_robot.dae')
33 setup.setEnvironmentMesh(
'3D/cubicles_env.dae')
36 start =
ob.State(setup.getSpaceInformation())
40 start().rotation().setIdentity()
42 goal =
ob.State(setup.getSpaceInformation())
46 goal().rotation().setIdentity()
49 setup.setStartAndGoalStates(start, goal)
52 setup.getSpaceInformation().setStateValidityCheckingResolution(0.01)
61 setup.simplifySolution()
62 path = setup.getSolutionPath()
64 print(path.printAsMatrix())