Path planning for multiple goal states(simOMPL.addGoalState)

Typically: "How do I... ", "How can I... " questions
Post Reply
ik-123
Posts: 10
Joined: 26 Jan 2020, 13:39

Path planning for multiple goal states(simOMPL.addGoalState)

Post by ik-123 »

Hello,

As I understood addGoalState will add a goal state, without clearing previously set goal states. That's understandable. What I need to understand is when computing the Path using simOMPL.compute How does it resolve the path for all of the goal states? And those are my questions:

1)does it solve for goal states one by one, or solve for all goal states at ones (which would be strange since how the " biased toward the goal" factor would be satisfied)?

2)when the path is found, How to check to which goal state this path is? and what if we have more than one goal state that we can plan a path for, then returned path is for which goal states and based on what?

3)is it granted when using simOMPL.compute to solve the task with many goals states that all goal states will be checked for a solution? Then can we check which goal states we were able to plane and which we were not( because not all goal states might be planned I guess )?

This is an example of using simOMPL.addGoalState from pathplanningdemo1

Code: Select all

    
    simOMPL.setGoalState(task,goalConfigs[1])
    for i=2,#goalConfigs,1 do
        simOMPL.addGoalState(task,goalConfigs[i])
    end
    local path=nil
    local l=999999999999
    for i=1,cnt,1 do --is this cnt to solve the whole task multiple times or it is multiple solve for single goal state?
        local res,_path=simOMPL.compute(task,4,-1,300) --here to which goal state this path is planned? and what if we have multiple goal states that could be planned as well, then how to get their path?
        if res and _path then
            local _l=getPathLength(_path)
            if _l<l then
                l=_l
                path=_path
            end
        end
    end
Thank you a lot for your constant support.
Cheers,

fferri
Posts: 1217
Joined: 09 Sep 2013, 19:28

Re: Path planning for multiple goal states(simOMPL.addGoalState)

Post by fferri »

Hi,

when using multiple goal states, the search will stop as soon as one goal is reached. Which one is not known, but you should be able to easily check.

I didn't find much documentation of ompl::base::GoalStates class, but as you can see from how distanceGoal is implemented, it will return the distance to closest goal.

I'm not sure what are you asking in point 3), maybe my answer already covers it.

Post Reply