43 namespace ompl
71 ~RRT() override;
77 void clear() override;
90 goalBias_ = goalBias;
96 return goalBias_;
106 maxDistance_ = distance;
112 return maxDistance_;
120 OMPL_WARN("Calling setNearestNeighbors will clear all states.");
122 nn_ = std::make_shared<NN<Motion *>>();
126 void setup() override;
136 Motion() = default;
143 ~Motion() = default;
153 void freeMemory();
The maximum length of a motion to be added to a tree.
Motion(const base::SpaceInformationPtr &si)
Constructor that allocates memory for the state.
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique...
std::shared_ptr< NearestNeighbors< Motion * > > nn_
A nearest-neighbors datastructure containing the tree of motions.
double getGoalBias() const
Get the goal bias the planner is using.
Motion * parent
The parent motion in the exploration tree.
A shared pointer wrapper for ompl::base::StateSampler.
void setRange(double distance)
Set the range the planner is supposed to use.
void setup() override
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
void clear() override
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
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...
A class to store the exit status of Planner::solve()
A shared pointer wrapper for ompl::base::SpaceInformation.
Free the memory allocated by this planner.
double distanceFunction(const Motion *a, const Motion *b) const
Compute distance between motions (actually distance between contained states)
Motion * lastGoalMotion_
The most recent goal motion. Used for PlannerData computation.
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.
RRT(const base::SpaceInformationPtr &si)
Set a different nearest neighbors datastructure.
The space information for which planning is done.
The fraction of time the goal is picked as the state to expand towards (if such a state is available)...
void setGoalBias(double goalBias)
Set the goal bias.