43 namespace ompl
69 RRT(const base::SpaceInformationPtr &si, bool addIntermediateStates = false);
71 ~RRT() override;
77 void clear() override;
90 goalBias_ = goalBias;
96 return goalBias_;
103 return addIntermediateStates_;
110 addIntermediateStates_ = addIntermediateStates;
120 maxDistance_ = distance;
126 return maxDistance_;
134 OMPL_WARN("Calling setNearestNeighbors will clear all states.");
136 nn_ = std::make_shared<NN<Motion *>>();
140 void setup() override;
150 Motion() = default;
157 ~Motion() = default;
167 void freeMemory();
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
double getRange() const
Get the range the planner is using.
Free the memory allocated by this planner.
Motion * parent
The parent motion in the exploration tree.
base::State * state
The state contained by the motion.
void setup() override
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
void clear() override
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
void setIntermediateStates(bool addIntermediateStates)
Specify whether the intermediate states generated along motions are to be added to the tree itself.
RRT(const base::SpaceInformationPtr &si, bool addIntermediateStates=false)
double distanceFunction(const Motion *a, const Motion *b) const
Compute distance between motions (actually distance between contained states)
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...
Flag indicating whether intermediate states are added to the built tree of motions.
std::shared_ptr< NearestNeighbors< Motion * > > nn_
A nearest-neighbors datastructure containing the tree of motions.
A class to store the exit status of Planner::solve()
void getPlannerData(base::PlannerData &data) const override
Get information about the current run of the motion planner. Repeated calls to this function will upd...
bool getIntermediateStates() const
Return true if the intermediate states generated along motions are to be added to the tree itself.
Motion * lastGoalMotion_
The most recent goal motion. Used for PlannerData computation.
The space information for which planning is done.
Set a different nearest neighbors datastructure.
void setGoalBias(double goalBias)
Set the goal bias.
void setRange(double distance)
Set the range the planner is supposed to use.
The maximum length of a motion to be added to a tree.
double getGoalBias() const
Get the goal bias the planner is using.
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...
Motion(const base::SpaceInformationPtr &si)
Constructor that allocates memory for the state.
The fraction of time the goal is picked as the state to expand towards (if such a state is available)