ompl::base::PlannerSolution Struct Reference

Representation of a solution to a planning problem. More...

#include <ompl/base/ProblemDefinition.h>

Public Member Functions

PlannerSolution (const PathPtr &path)
Construct a solution that consists of a path and its attributes (whether it is approximate and the difference to the desired goal)

bool operator== (const PlannerSolution &p) const
Return true if two solutions are the same.

bool operator< (const PlannerSolution &b) const
Define a ranking for solutions.

void setApproximate (double difference)
Specify that the solution is approximate and set the difference to the goal.

void setOptimized (const OptimizationObjectivePtr &opt, Cost cost, bool meetsObjective)
Set the optimization objective used to optimize this solution, the cost of the solution and whether it was optimized or not.

void setPlannerName (const std::string &name)
Set the name of the planner used to compute this solution.

Public Attributes

int index_ {-1}
When multiple solutions are found, each is given a number starting at 0, so that the order in which the solutions was found can be retrieved.

PathPtr path_
Solution path.

double length_
For efficiency reasons, keep the length of the path as well.

bool approximate_ {false}
True if goal was not achieved, but an approximate solution was found.

double difference_ {0.}
The achieved difference between the found solution and the desired goal.

bool optimized_ {false}
True if the solution was optimized to meet the specified optimization criterion.

OptimizationObjectivePtr opt_
Optimization objective that was used to optimize this solution.

Cost cost_
The cost of this solution path, with respect to the optimization objective.

std::string plannerName_
Name of planner type that generated this solution, as received from Planner::getName()

Detailed Description

Representation of a solution to a planning problem.

Definition at line 69 of file ProblemDefinition.h.

The documentation for this struct was generated from the following files: