Page 1 of 1

How to I create a state space for OMPL planning in 3D pos + 1D rotation?

Posted: 18 Jan 2019, 23:00
by Uli_v
What is the best way to create a state space with 3D position plus 1 rotation about one of the principal axis of the 3D position space? Can I add a 1D position to the 2D pose state space? if yes, could you give me an example how? Thank you.

Re: How to I create a state space for OMPL planning in 3D pos + 1D rotation?

Posted: 23 Jan 2019, 19:08
by Uli_v
I solved my problem the following way. I modified the OMPL plugin and added the SO2 state space type (similar to SE2 for pose2d). Now I can build my state space by combining position3d and SO2 like below:

Code: Select all

        local sub_state_3d = simOMPL.createStateSpace('3d',simOMPL.StateSpaceType.position3d,robotHandle,{0.0,0.0,0.0},{0.5,0.5,0.5},1)
        local sub_state_SO2 = simOMPL.createStateSpace('SO2',simOMPL.StateSpaceType.SO2,robotHandle,{},{},0)
        local ss={sub_state_3d,sub_state_SO2}
        simOMPL.setStateSpace(t,ss)

Re: How to I create a state space for OMPL planning in 3D pos + 1D rotation?

Posted: 25 Jan 2019, 11:20
by coppelia
Hello,

I think you could also have done it by using a shape built on a revolute joint, itself built on a dummy. Then:

Code: Select all

    t=simOMPL.createTask('t')
    stateSpace1=simOMPL.createStateSpace('3d',simOMPL.StateSpaceType.pose3d,dummyHandle,{-0.5,-0.5,-0.5},{0.5,0.5,0.5},1)
    stateSpace2=simOMPL.createStateSpace('j',simOMPL.StateSpaceType.joint_position,jointHandle,{-180*math.pi/180},{180*math.pi/180},1)
    local ss={stateSpace1,stateSpace2}
    simOMPL.setStateSpace(t,ss)
Cheers

Re: How to I create a state space for OMPL planning in 3D pos + 1D rotation?

Posted: 25 Jan 2019, 22:19
by Uli_v
Thank you. That is an interesting alternative if you do not want to modify the OMPL plugin.