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

Typically: "How do I... ", "How can I... " questions
Post Reply
Uli_v
Posts: 35
Joined: 14 Dec 2018, 18:07

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

Post 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.

Uli_v
Posts: 35
Joined: 14 Dec 2018, 18:07

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

Post 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)

coppelia
Site Admin
Posts: 10336
Joined: 14 Dec 2012, 00:25

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

Post 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

Uli_v
Posts: 35
Joined: 14 Dec 2018, 18:07

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

Post by Uli_v »

Thank you. That is an interesting alternative if you do not want to modify the OMPL plugin.

Post Reply