RRTXstatic.h
314 // we use a max heap, to do a min heap so the operator < returns > in order to make it a min heap
331 Motion(const base::SpaceInformationPtr &si) : state(si->allocState()), parent(nullptr), handle(nullptr)
This class provides an implementation of an updatable min-heap. Using it is a bit cumbersome,...
Definition: BinaryHeap.h:53
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
Definition: RandomNumbers.h:58
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition: Cost.h:48
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique,...
Definition: PlannerData.h:175
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
Definition: PlannerTerminationCondition.h:64
Representation of a motion (node of the tree)
Definition: RRTXstatic.h:327
Motion(const base::SpaceInformationPtr &si)
Constructor that allocates memory for the state. This constructor automatically allocates memory for ...
Definition: RRTXstatic.h:331
std::vector< Motion * > children
The set of motions descending from the current motion.
Definition: RRTXstatic.h:347
std::vector< std::pair< Motion *, bool > > nbh
The set of neighbors of this motion with a boolean indicating if the feasibility of edge as been test...
Definition: RRTXstatic.h:351
BinaryHeap< Motion *, MotionCompare >::Element * handle
Handle to identify the motion in the queue.
Definition: RRTXstatic.h:354
Optimal Rapidly-exploring Random Trees Maintaining A Pseudo Optimal Tree.
Definition: RRTXstatic.h:104
bool getKNearest() const
Get the state of using a k-nearest search for rewiring.
Definition: RRTXstatic.h:233
bool updateChildren_
Whether or not to propagate the cost to children if the update is less than epsilon.
Definition: RRTXstatic.h:446
void getPlannerData(base::PlannerData &data) const override
Get information about the current run of the motion planner. Repeated calls to this function will upd...
Definition: RRTXstatic.cpp:646
bool includeVertex(const Motion *x) const
Test if the vertex should be included according to the variant in use.
Definition: RRTXstatic.cpp:616
std::shared_ptr< NearestNeighbors< Motion * > > nn_
A nearest-neighbors datastructure containing the tree of motions.
Definition: RRTXstatic.h:397
Motion * lastGoalMotion_
The most recent goal motion. Used for PlannerData computation.
Definition: RRTXstatic.h:425
void setVariant(const int variant)
Set variant used for rejection sampling.
Definition: RRTXstatic.h:251
void setNearestNeighbors()
Set a different nearest neighbors datastructure.
Definition: RRTXstatic.h:217
void setKNearest(bool useKNearest)
Use a k-nearest search for rewiring instead of a r-disc search.
Definition: RRTXstatic.h:227
double maxDistance_
The maximum length of a motion to be added to a tree.
Definition: RRTXstatic.h:404
double getEpsilon() const
Get the threshold epsilon the planner is using.
Definition: RRTXstatic.h:179
void setUpdateChildren(bool val)
Set whether or not to always propagate cost updates to children.
Definition: RRTXstatic.h:239
bool getSampleRejection() const
Get the state of the sample rejection option.
Definition: RRTXstatic.h:152
unsigned int getNumSamplingAttempts() const
Get the number of attempts to make while performing rejection or informed sampling.
Definition: RRTXstatic.h:164
void setup() override
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
Definition: RRTXstatic.cpp:89
double getRewireFactor() const
Set the rewiring scale factor, s, such that r_rrg = s \times r_rrg* > r_rrg* (or k_rrg = s \times k_r...
Definition: RRTXstatic.h:210
void removeFromParent(Motion *m)
Removes the given motion from the parent's child list.
Definition: RRTXstatic.cpp:573
void setSampleRejection(bool reject)
Controls whether heuristic rejection is used on samples (e.g., x_rand)
Definition: RRTXstatic.cpp:702
unsigned int numSampleAttempts_
The number of attempts to make at informed sampling.
Definition: RRTXstatic.h:467
void getNeighbors(Motion *motion) const
Gets the neighbours of a given motion, using either k-nearest of radius as appropriate.
Definition: RRTXstatic.cpp:593
double goalBias_
The fraction of time the goal is picked as the state to expand towards (if such a state is available)
Definition: RRTXstatic.h:401
bool getInformedSampling() const
Get the state direct heuristic sampling.
Definition: RRTXstatic.h:143
BinaryHeap< Motion *, MotionCompare > q_
Queue to order the nodes to update.
Definition: RRTXstatic.h:440
void setRange(double distance)
Set the range the planner is supposed to use.
Definition: RRTXstatic.h:189
void setRewireFactor(double rewireFactor)
Set the rewiring scale factor, s, such that r_rrg = s \times r_rrg* (or k_rrg = s \times k_rrg*)
Definition: RRTXstatic.h:202
bool getUpdateChildren() const
True if the cost is always propagate to children.
Definition: RRTXstatic.h:245
void setAlpha(const double a)
Set the value alpha used for rejection sampling.
Definition: RRTXstatic.h:265
void clear() override
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
Definition: RRTXstatic.cpp:138
double rewireFactor_
The rewiring factor, s, so that r_rrg = s \times r_rrg* > r_rrg* (or k_rrg = s \times k_rrg* > k_rrg*...
Definition: RRTXstatic.h:414
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...
Definition: RRTXstatic.cpp:155
double distanceFunction(const Motion *a, const Motion *b) const
Compute distance between motions (actually distance between contained states)
Definition: RRTXstatic.h:367
void calculateRewiringLowerBounds()
Calculate the k_RRG* and r_RRG* terms.
Definition: RRTXstatic.cpp:781
void setNumSamplingAttempts(unsigned int numAttempts)
Set the number of attempts to make while performing rejection or informed sampling.
Definition: RRTXstatic.h:158
void setInformedSampling(bool informedSampling)
Use direct sampling of the heuristic for the generation of random samples (e.g., x_rand)....
Definition: RRTXstatic.cpp:666
std::vector< Motion * > goalMotions_
A list of states in the tree that satisfy the goal condition.
Definition: RRTXstatic.h:428
Main namespace. Contains everything in this library.
Definition: ConstrainedSpaceInformation.h:53
A class to store the exit status of Planner::solve()
Definition: PlannerStatus.h:49
Defines the operator to compare motions.
Definition: RRTXstatic.h:291
bool operator()(const Motion *m1, const Motion *m2) const
Ordering of motions.
Definition: RRTXstatic.h:312
base::OptimizationObjectivePtr opt_
Pointer to the Optimization Objective.
Definition: RRTXstatic.h:319
base::Cost costPlusHeuristic(const Motion *m) const
Combines the current cost of a motion and the heuritic to the goal.
Definition: RRTXstatic.h:299
base::Cost alphaCostPlusHeuristic(const Motion *m, double alpha) const
Combines the current cost of a motion, weighted by alpha, and the heuritic to the goal.
Definition: RRTXstatic.h:305
MotionCompare(base::OptimizationObjectivePtr opt, base::ProblemDefinitionPtr pdef)
Constructor.
Definition: RRTXstatic.h:293