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 geometric
as og
23 from ompl
import app
as oa
25 sys.path.insert(0, join(ompl_app_root,
'ompl/py-bindings'))
26 from ompl
import base
as ob
27 from ompl
import geometric
as og
28 from ompl
import app
as oa
31 setup = oa.SE3MultiRigidBodyPlanning(2)
34 setup.setRobotMesh(
'3D/cubicles_robot.dae')
35 setup.addRobotMesh(
'3D/cubicles_robot.dae')
36 setup.setEnvironmentMesh(
'3D/cubicles_env.dae')
39 start =
ob.State(setup.getSpaceInformation())
45 start1.rotation().setIdentity()
51 start2.rotation().setIdentity()
54 goal =
ob.State(setup.getSpaceInformation())
60 goal1.rotation().setIdentity()
66 goal2.rotation().setIdentity()
69 setup.setStartAndGoalStates(start, goal)
72 setup.getSpaceInformation().setStateValidityCheckingResolution(0.01)
84 setup.simplifySolution()
85 print(setup.getSolutionPath().printAsMatrix())