45 namespace ompl
73 BiTRRT(const base::SpaceInformationPtr &si);
74 ~BiTRRT() override;
75 void clear() override;
76 void setup() override;
85 maxDistance_ = distance;
91 return maxDistance_;
101 tempChangeFactor_ = exp(factor);
131 initTemperature_ = initTemperature;
137 return initTemperature_;
144 frontierThreshold_ = frontierThreshold;
151 return frontierThreshold_;
159 frontierNodeRatio_ = frontierNodeRatio;
166 return frontierNodeRatio_;
174 OMPL_WARN("Calling setNearestNeighbors will clear all states.");
176 tStart_ = std::make_shared<NN<Motion *>>();
177 tGoal_ = std::make_shared<NN<Motion *>>();
194 ~Motion() = default;
211 void freeMemory();
229 bool minExpansionControl(double dist);
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
A shared pointer wrapper for ompl::base::OptimizationObjective.
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.
Representation of a motion in the search tree.
base::State * state
The state contained by the motion.
Motion(const base::SpaceInformationPtr &si)
Constructor that allocates memory for the state.
Motion * parent
The parent motion in the exploration tree.
const base::State * root
Pointer to the root of the tree this motion is contained in.
Bi-directional Transition-based Rapidly-exploring Random Trees.
Set a different nearest neighbors datastructure.
bool transitionTest(const base::Cost &motionCost)
Transition test that filters transitions based on the motion cost. If the motion cost is near or belo...
bool minExpansionControl(double dist)
Use frontier node ratio to filter nodes that do not add new information to the search tree.
void setFrontierNodeRatio(double frontierNodeRatio)
Set the ratio between adding non-frontier nodes to frontier nodes. For example: .1 is one non-frontie...
The distance between an existing state and a new state that qualifies it as a frontier state.
void setFrontierThreshold(double frontierThreshold)
Set the distance between a new state and the nearest neighbor that qualifies a state as being a front...
void clear() override
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
double getFrontierNodeRatio() const
Get the ratio between adding non-frontier nodes to frontier nodes.
The result of a call to extendTree.
The desired state was reached during extension.
Progress was made toward extension.
double getInitTemperature() const
Get the initial temperature at the start of planning.
The range at which the algorithm will attempt to connect the two trees.
BiTRRT(const base::SpaceInformationPtr &si)
The objective (cost function) being optimized.
The least desirable (e.g., maximum) cost value in the search tree.
All motion costs must be better than this cost (default is infinity)
std::shared_ptr< NearestNeighbors< Motion * > > TreeData
The nearest-neighbors data structure that contains the entire the tree of motions generated during pl...
double getCostThreshold() const
Get the cost threshold (default is infinity). Any motion cost that is not better than this cost (acco...
The factor by which the temperature is increased after a failed transition test.
double distanceFunction(const Motion *a, const Motion *b) const
Compute distance between motions (actually distance between contained states)
Motion * addMotion(const base::State *state, TreeData &tree, Motion *parent=nullptr)
Add a state to the given tree. The motion created is returned.
The temperature that planning begins at.
bool connectTrees(Motion *nmotion, TreeData &tree, Motion *xmotion)
Attempt to connect tree to nmotion, which is in the other tree. xmotion is scratch space and will be ...
void setTempChangeFactor(double factor)
Set the factor by which the temperature is increased after a failed transition test....
void setCostThreshold(double maxCost)
Set the cost threshold (default is infinity). Any motion cost that is not better than this cost (acco...
The maximum length of a motion to be added to a tree.
double getFrontierThreshold() const
Get the distance between a new state and the nearest neighbor that qualifies a state as being a front...
GrowResult extendTree(Motion *toMotion, TreeData &tree, Motion *&result)
Extend tree toward the state in rmotion. Store the result of the extension, if any,...
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...
The most desirable (e.g., minimum) cost value in the search tree.
Free all memory allocated during planning.
A count of the number of frontier nodes in the trees.
void setRange(double distance)
Set the maximum possible length of any one motion in the search tree. Very short/long motions may inh...
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...
The target ratio of non-frontier nodes to frontier nodes.
double getRange() const
Get the range the planner is using.
void setInitTemperature(double initTemperature)
Set the initial temperature at the start of planning. Should be high to allow for initial exploration...
A count of the number of non-frontier nodes in the trees.
double getTempChangeFactor() const
Get the factor by which the temperature is increased after a failed transition.
std::pair< Motion *, Motion * > connectionPoint_
The most recent connection point for the two trees. Used for PlannerData computation.
void log(const char *file, int line, LogLevel level, const char *m,...)
Root level logging function. This should not be invoked directly, but rather used via a logging macro...