43 namespace ompl
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();
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.
bool getIntermediateStates() const
Return true if the intermediate states generated along motions are to be added to the tree itself...
double getGoalBias() const
Get the goal bias the planner is using.
void setIntermediateStates(bool addIntermediateStates)
Specify whether the intermediate states generated along motions are to be added to the tree itself...
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...
RRT(const base::SpaceInformationPtr &si, bool addIntermediateStates=false)
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.
Flag indicating whether intermediate states are added to the built tree of motions.
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.
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.