Loading...
Searching...
No Matches
LTLPlanner.cpp
52ompl::control::LTLPlanner::LTLPlanner(const LTLSpaceInformationPtr <lsi, ProductGraphPtr a, double exploreTime)
79ompl::base::PlannerStatus ompl::control::LTLPlanner::solve(const ompl::base::PlannerTerminationCondition &ptc)
155ompl::control::LTLPlanner::getHighLevelPath(const std::vector<base::State *> &path, ProductGraph::State *start) const
196 unsigned int autDist = std::max(abstraction_->getCosafeAutDistance(as), abstraction_->getSafeAutDistance(as));
223bool ompl::control::LTLPlanner::explore(const std::vector<ProductGraph::State *> &lead, Motion *&soln, double duration)
244 controlSampler_->sampleStepCount(ltlsi_->getMinControlDuration(), ltlsi_->getMaxControlDuration());
259 // Since the state was determined to be valid by SpaceInformation, we don't need to check automaton states
267 availDist_.update(abstractInfo_[m->abstractState].pdfElem, abstractInfo_[m->abstractState].weight);
289double ompl::control::LTLPlanner::abstractEdgeWeight(ProductGraph::State *a, ProductGraph::State *b) const
double getWeight(const Element *elem) const
Returns the current weight of the given Element.
Definition PDF.h:171
_T & sample(double r) const
Returns a piece of data from the PDF according to the input sampling value, which must be between 0 a...
Definition PDF.h:132
void update(Element *elem, const double w)
Updates the data in the given Element with a new weight value.
Definition PDF.h:155
bool update()
Set the space information and problem definition this class operates on, based on the available plann...
Definition Planner.cpp:186
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
Definition PlannerTerminationCondition.h:64
virtual void clear()
Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() wil...
Definition Planner.cpp:118
virtual void checkValidity()
Check to see if the planner is in a working state (setup has been called, a goal was set,...
Definition Planner.cpp:106
virtual void setup()
Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceIn...
Definition Planner.cpp:92
std::unordered_map< ProductGraph::State *, ProductGraphStateInfo > abstractInfo_
Map of abstraction states to their details.
Definition LTLPlanner.h:201
virtual void initAbstractInfo(ProductGraph::State *as)
Initializes the info object for a new high-level state.
Definition LTLPlanner.cpp:190
virtual double abstractEdgeWeight(ProductGraph::State *a, ProductGraph::State *b) const
Returns the weight of an edge between two given high-level states, which we compute as the product of...
Definition LTLPlanner.cpp:289
base::PlannerStatus solve(const base::PlannerTerminationCondition &ptc) override
Continues solving until a solution is found or a given planner termination condition is met....
Definition LTLPlanner.cpp:79
virtual bool explore(const std::vector< ProductGraph::State * > &lead, Motion *&soln, double duration)
Expand the tree of motions along a given lead for a given duration of time. Returns true if a solutio...
Definition LTLPlanner.cpp:223
virtual double updateWeight(ProductGraph::State *as)
Updates and returns the weight of an abstraction state.
Definition LTLPlanner.cpp:181
void clear() override
Clears all datastructures belonging to this LTLPlanner.
Definition LTLPlanner.cpp:71
LTLPlanner(const LTLSpaceInformationPtr &si, ProductGraphPtr a, double exploreTime=0.5)
Create an LTLPlanner with a given space and product graph. Accepts an optional third parameter to con...
Definition LTLPlanner.cpp:52
virtual void buildAvail(const std::vector< ProductGraph::State * > &lead)
Compute a set of high-level states along a lead to be considered for expansion.
Definition LTLPlanner.cpp:205
const LTLSpaceInformation * ltlsi_
Handle to the control::SpaceInformation object.
Definition LTLPlanner.h:180
ProductGraphPtr abstraction_
The high level abstaction used to grow the tree structure.
Definition LTLPlanner.h:183
void getTree(std::vector< base::State * > &tree) const
Helper debug method to access this planner's underlying tree of states.
Definition LTLPlanner.cpp:147
std::vector< ProductGraph::State * > getHighLevelPath(const std::vector< base::State * > &path, ProductGraph::State *start=nullptr) const
Helper debug method to return the sequence of high-level product graph states corresponding to a sequ...
Definition LTLPlanner.cpp:155
PDF< ProductGraph::State * > availDist_
Used to sample nonempty regions in which to promote expansion.
Definition LTLPlanner.h:186
A shared pointer wrapper for ompl::control::LTLSpaceInformation.
A shared pointer wrapper for ompl::control::ProductGraph.
A State of a ProductGraph represents a vertex in the graph-based Cartesian product represented by the...
Definition ProductGraph.h:84
Space information containing necessary information for planning with controls. setup() needs to be ca...
Definition SpaceInformation.h:71
void freeControl(Control *control) const
Free the memory of a control.
Definition SpaceInformation.h:94
This namespace contains sampling based planning routines shared by both planning under geometric cons...
Definition ConstrainedSpaceInformation.h:55
PlannerTerminationCondition timedPlannerTerminationCondition(double duration)
Return a termination condition that will become true duration seconds in the future (wall-time)
Definition PlannerTerminationCondition.cpp:216
This namespace contains sampling based planning routines used by planning under differential constrai...
Definition Control.h:45
Main namespace. Contains everything in this library.
Definition MultiLevelPlanarManipulatorDemo.cpp:66
STL namespace.
A class to store the exit status of Planner::solve()
Definition PlannerStatus.h:49
virtual ~Motion()
Motion destructor does not clear memory. Deletions should be performed by the LTLPlanner.
ProductGraph::State * abstractState
The high-level state to which this motion belongs.
Definition LTLPlanner.h:126
A structure to hold measurement information for a high-level state, as well as the set of tree motion...
Definition LTLPlanner.h:133
void addMotion(Motion *m)
Adds a tree motion to an info object. This method is called whenever a new tree motion is created in ...
Definition LTLPlanner.cpp:176