|
From: Florian F. <de...@fl...> - 2025-03-21 15:21:53
|
Hi everyone,
I'm trying to solve a path planning problem where there are obstacles
and the path must be a Dubins' path.
I came across the OMPL library which looks great, but I struggle to
get reliable results. I suspect that I'm not using the library well.
I come from the optimization community. I'm familiar with A* and its
variants, but I'm not familiar with the sampling based algorithms.
For now, what I've done looks like:
ob::StateSpacePtr
space(std::make_shared<ob::DubinsStateSpace>(turning_radius));
space->as<ob::SE2StateSpace>()->setBounds(bounds);
og::SimpleSetup ss(space);
const ob::SpaceInformation *si =
ss.getSpaceInformation().get();
ss.setStateValidityChecker([obstacles, si](const ob::State
*state)
{
return is_state_valid(obstacles, si,
state);
});
auto
planner(std::make_shared<og::RRTstar>(ss.getSpaceInformation()));
ss.setPlanner(planner);
ss.setStartAndGoalStates(ompl_start, ompl_goal);
ob::PlannerStatus solved = ss.solve(60);
With this, I often get valid paths, but they look far from optimal.
Is this the correct way to achieve what I'm looking for? Should I for
example use a control based planner? I struggle to understand the
difference with geometric planners
Thank you for your help,
Best,
Florian
|