Loading...
Searching...
No Matches
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.

Constructor & Destructor Documentation

◆ PlannerSolution()

ompl::base::PlannerSolution::PlannerSolution ( const PathPtr path)
inline

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

Definition at line 73 of file ProblemDefinition.h.

Member Function Documentation

◆ operator<()

bool ompl::base::PlannerSolution::operator< ( const PlannerSolution b) const

Define a ranking for solutions.

Definition at line 148 of file ProblemDefinition.cpp.

◆ operator==()

bool ompl::base::PlannerSolution::operator== ( const PlannerSolution p) const
inline

Return true if two solutions are the same.

Definition at line 80 of file ProblemDefinition.h.

◆ setApproximate()

void ompl::base::PlannerSolution::setApproximate ( double  difference)
inline

Specify that the solution is approximate and set the difference to the goal.

Definition at line 89 of file ProblemDefinition.h.

◆ setOptimized()

void ompl::base::PlannerSolution::setOptimized ( const OptimizationObjectivePtr opt,
Cost  cost,
bool  meetsObjective 
)
inline

Set the optimization objective used to optimize this solution, the cost of the solution and whether it was optimized or not.

Definition at line 97 of file ProblemDefinition.h.

◆ setPlannerName()

void ompl::base::PlannerSolution::setPlannerName ( const std::string &  name)
inline

Set the name of the planner used to compute this solution.

Definition at line 105 of file ProblemDefinition.h.

Member Data Documentation

◆ approximate_

bool ompl::base::PlannerSolution::approximate_ {false}

True if goal was not achieved, but an approximate solution was found.

Definition at line 121 of file ProblemDefinition.h.

◆ cost_

Cost ompl::base::PlannerSolution::cost_

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

Definition at line 133 of file ProblemDefinition.h.

◆ difference_

double ompl::base::PlannerSolution::difference_ {0.}

The achieved difference between the found solution and the desired goal.

Definition at line 124 of file ProblemDefinition.h.

◆ index_

int ompl::base::PlannerSolution::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.

Definition at line 112 of file ProblemDefinition.h.

◆ length_

double ompl::base::PlannerSolution::length_

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

Definition at line 118 of file ProblemDefinition.h.

◆ opt_

OptimizationObjectivePtr ompl::base::PlannerSolution::opt_

Optimization objective that was used to optimize this solution.

Definition at line 130 of file ProblemDefinition.h.

◆ optimized_

bool ompl::base::PlannerSolution::optimized_ {false}

True if the solution was optimized to meet the specified optimization criterion.

Definition at line 127 of file ProblemDefinition.h.

◆ path_

PathPtr ompl::base::PlannerSolution::path_

Solution path.

Definition at line 115 of file ProblemDefinition.h.

◆ plannerName_

std::string ompl::base::PlannerSolution::plannerName_

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

Definition at line 136 of file ProblemDefinition.h.


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