Loading...
Searching...
No Matches
HySST.h
36/* Adapted from: ompl/geometric/planners/src/SST.cpp by Zakary Littlefield of Rutgers the State University of New
86 Motion(const control::SpaceInformation *si) : state(si->allocState()), control(si->allocControl())
288 std::function<base::State *(base::State *curState, const control::Control *u, base::State *newState)>
298 void setContinuousSimulator(std::function<base::State *(const control::Control *u, base::State *curState,
306 std::function<ompl::base::State *(const control::Control *control, ompl::base::State *x_cur, double tFlow,
309 [this](const control::Control *control, base::State *x_cur, double tFlow, base::State *new_state)
320 void setCollisionChecker(std::function<bool(Motion *motion, std::function<bool(Motion *motion)> obstacleSet,
445 std::function<bool(Motion *motion, std::function<bool(Motion *motion)> obstacleSet, base::State *newState,
474 [this](base::State *state1, base::State *state2) -> double { return si_->distance(state1, state2); };
492 std::function<base::State *(base::State *curState, const control::Control *u, base::State *newState)>
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
Definition RandomNumbers.h:57
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition Cost.h:48
static double getStateTime(const ompl::base::State *state)
The time value of the given state.
Definition HybridStateSpace.cpp:98
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
std::vector< base::State * > * solutionPair
The integration steps defining the edge of the motion, between the parent and child vertices.
Definition HySST.h:121
Motion(const control::SpaceInformation *si)
Constructor that allocates memory for the state.
Definition HySST.h:86
Representation of a witness vertex in the search tree.
Definition HySST.h:372
Motion * getParent() const override
Get the state contained by the parent motion of the representative motion.
Definition HySST.h:395
Witness(const control::SpaceInformation *si)
Constructor that allocates memory for the state.
Definition HySST.h:378
base::State * getState() const override
Get the state contained by the representative motion.
Definition HySST.h:386
void setUnsafeSet(std::function< bool(Motion *)> unsafeSet)
Define the unsafe set.
Definition HySST.h:269
int batchSize_
The number of solutions allowed until the most optimal solution is returned.
Definition HySST.h:587
double flowStepDuration_
The flow time for a given integration step, within a flow propagation step. Must be set by user.
Definition HySST.h:483
std::shared_ptr< NearestNeighbors< Motion * > > nn_
A nearest-neighbors datastructure containing the tree of motions.
Definition HySST.h:426
void setFlowStepDuration(double duration)
Set the time allocated to a single continuous simulator call, within the full period of a continuous ...
Definition HySST.h:234
control::SpaceInformation * siC_
The base::SpaceInformation cast as control::SpaceInformation, for convenience.
Definition HySST.h:465
std::function< base::State *(base::State *curState, const control::Control *u, base::State *newState)> discreteSimulator_
Simulator for propagation under jump regime.
Definition HySST.h:493
std::function< ompl::base::State *(const control::Control *control, ompl::base::State *x_cur, double tFlow, ompl::base::State *new_state)> continuousSimulator
Simulates the dynamics of the system.
Definition HySST.h:308
std::function< bool(Motion *motion, std::function< bool(Motion *motion)> obstacleSet, base::State *newState, double *collisionTime)> collisionChecker_
Collision checker. Default is point-by-point collision checking using the jump set.
Definition HySST.h:447
Motion * selectNode(Motion *sample)
Finds the best node in the tree withing the selection radius around a random sample.
Definition HySST.cpp:144
double pruningRadius_
The radius for determining the size of the pruning region. Delta_bn.
Definition HySST.h:572
void checkMandatoryParametersSet(void) const
Check if all required parameters have been set.
Definition HySST.h:339
std::function< double(base::State *state1, base::State *state2)> distanceFunc_
Compute distance between states, default is Euclidean distance.
Definition HySST.h:473
double getSelectionRadius() const
Get the selection radius the planner is using.
Definition HySST.h:164
base::OptimizationObjectivePtr opt_
The optimization objective. Default is a shortest path objective.
Definition HySST.h:517
std::function< base::State *(const control::Control *u, base::State *curState, double tFlowMax, base::State *newState)> continuousSimulator_
Simulator for propagation under flow regime.
Definition HySST.h:532
void setTm(double tM)
Set the maximum time allocated to a full continuous simulator step.
Definition HySST.h:213
std::shared_ptr< NearestNeighbors< Motion * > > witnesses_
A nearest-neighbors datastructure containing the tree of witness motions.
Definition HySST.h:566
void setCollisionChecker(std::function< bool(Motion *motion, std::function< bool(Motion *motion)> obstacleSet, base::State *newState, double *collisionTime)> function)
Define the collision checker.
Definition HySST.h:320
double tM_
The maximum flow time for a given flow propagation step. Must be set by the user.
Definition HySST.h:477
void setContinuousSimulator(std::function< base::State *(const control::Control *u, base::State *curState, double tFlowMax, base::State *newState)> function)
Define the continuous dynamics simulator.
Definition HySST.h:298
void setSelectionRadius(double selectionRadius)
Set the radius for selecting nodes relative to random sample.
Definition HySST.h:153
std::function< bool(Motion *motion)> flowSet_
Function that returns true if a motion intersects with the flow set, and false if not.
Definition HySST.h:507
void getPlannerData(base::PlannerData &data) const override
Get the PlannerData object associated with this planner.
Definition HySST.cpp:562
std::function< base::Cost(Motion *motion)> costFunc_
Calculate the cost of a motion. Default is using optimization objective.
Definition HySST.h:520
Witness * findClosestWitness(Motion *node)
Find the closest witness node to a newly generated potential node.
Definition HySST.cpp:177
std::function< bool(Motion *motion)> unsafeSet_
Function that returns true if a motion intersects with the unsafe set, and false if not.
Definition HySST.h:514
std::function< bool(Motion *motion)> jumpSet_
Function that returns true if a motion intersects with the jump set, and false if not.
Definition HySST.h:500
double dist_
Minimum distance from goal to final vertex of generated trajectories.
Definition HySST.h:578
base::PlannerStatus solve(const base::PlannerTerminationCondition &ptc) override
Main solve function.
Definition HySST.cpp:323
std::vector< Motion * > prevSolution_
The best solution (with best cost) we have found so far.
Definition HySST.h:581
double minStepLength
The minimum step length for a given flow propagation step. Default value is 1e-6.
Definition HySST.h:480
void setDistanceFunction(std::function< double(base::State *, base::State *)> function)
Define the distance measurement function.
Definition HySST.h:278
double selectionRadius_
The radius for determining the node selected for extension. Delta_s.
Definition HySST.h:569
void setDiscreteSimulator(std::function< base::State *(base::State *curState, const control::Control *u, base::State *newState)> function)
Define the discrete dynamics simulator.
Definition HySST.h:287
Motion * lastGoalMotion_
The most recent goal motion. Used for PlannerData computation.
Definition HySST.h:414
base::PlannerStatus constructSolution(Motion *lastMotion)
Construct the path, starting at the last edge.
Definition HySST.cpp:495
Space information containing necessary information for planning with controls. setup() needs to be ca...
Definition SpaceInformation.h:71
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
A class to store the exit status of Planner::solve().
Definition PlannerStatus.h:49