46 namespace ompl
88 SBL(const base::SpaceInformationPtr &si);
90 ~SBL() override;
96 projectionEvaluator_ = projectionEvaluator;
109 return projectionEvaluator_;
119 maxDistance_ = distance;
125 return maxDistance_;
128 void setup() override;
132 void clear() override;
154 : state(si->allocState())
177 Motion *operator(unsigned int i)
189 void push_back(Motion *m)
209 TreeData() = default;
232 void addMotion(TreeData &tree, Motion *motion);
235 Motion *selectMotion(TreeData &tree);
238 void removeMotion(TreeData &tree, Motion *motion);
245 bool isPathValid(TreeData &tree, Motion *motion);
248 bool checkSolution(bool start, TreeData &tree, TreeData &otherTree, Motion *motion,
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique,...
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
The space information for which planning is done.
base::State * state
The state this motion leads to.
std::vector< Motion * > children
The set of motions descending from the current motion.
Motion(const base::SpaceInformationPtr &si)
Constructor that allocates storage for a state.
Motion * parent
The parent motion – it contains the state this motion originates at.
const base::State * root
The root of the tree this motion would get to, if we were to follow parent pointers.
Default constructor. Allocates no memory.
Flag indicating whether this motion has been checked for validity.
Single-Query Bi-Directional Probabilistic Roadmap Planner with Lazy Collision Checking.
void freeGridMotions(Grid< MotionInfo > &grid)
Free the memory used by the motions contained in a grid.
void setProjectionEvaluator(const base::ProjectionEvaluatorPtr &projectionEvaluator)
Set the projection evaluator. This class is able to compute the projection of a given state.
const base::ProjectionEvaluatorPtr & getProjectionEvaluator() const
Get the projection evaluator.
Free the memory allocated by the planner.
bool isPathValid(TreeData &tree, Motion *motion)
Since solutions are computed in a lazy fashion, once trees are connected, the solution found needs to...
void removeMotion(TreeData &tree, Motion *motion)
Remove a motion from a tree.
The employed projection evaluator.
The employed state sampler.
std::pair< base::State *, base::State * > connectionPoint_
The pair of states in each tree connected during planning. Used for PlannerData computation.
void clear() override
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
base::PlannerStatus solve(const base::PlannerTerminationCondition &ptc) override
Function that can solve the motion planning problem. This function can be called multiple times on th...
void setProjectionEvaluator(const std::string &name)
Set the projection evaluator (select one from the ones registered with the state space).
void addMotion(TreeData &tree, Motion *motion)
Add a motion to a tree.
void setup() override
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
void getPlannerData(base::PlannerData &data) const override
Get information about the current run of the motion planner. Repeated calls to this function will upd...
double getRange() const
Get the range the planner is using.
void setRange(double distance)
Set the range the planner is supposed to use.
bool checkSolution(bool start, TreeData &tree, TreeData &otherTree, Motion *motion, std::vector< Motion * > &solution)
Check if a solution can be obtained by connecting two trees using a specified motion.
Motion * selectMotion(TreeData &tree)
Select a motion from a tree.
SBL(const base::SpaceInformationPtr &si)
The constructor needs the instance of the space information.
The maximum length of a motion to be added in the tree.
A class to store the exit status of Planner::solve()
A struct containing an array of motions and a corresponding PDF element.
Representation of a search tree. Two instances will be used. One for start and one for goal.
The PDF used for selecting a cell from which to sample a motion.
unsigned int size
The number of motions (in total) from the tree.