Genetic Algorithm for searching valid states. More...
#include <ompl/geometric/GeneticSearch.h>
Public Member Functions | |
GeneticSearch (const base::SpaceInformationPtr &si) | |
Construct an instance of a genetic algorithm for inverse kinematics given the space information to search within. | |
bool | solve (double solveTime, const base::GoalRegion &goal, base::State *result, const std::vector< base::State * > &hint=std::vector< base::State * >()) |
Find a state that fits the request. | |
void | setMaxImproveSteps (unsigned int maxSteps) |
Set the number of steps to perform when using hill climbing to improve an individual in the population. | |
unsigned int | getMaxImproveSteps () const |
Get the number of steps to perform when using hill climbing to improve an individual in the population. | |
void | setValidityCheck (bool valid) |
Set the state validity flag; if this is false, states are not checked for validity. | |
bool | getValidityCheck () const |
Get the state validity flag; if this is false, states are not checked for validity. | |
void | setTryImprove (bool flag) |
Set the flag that determines whether improvements using hill climbing should be attempted for solutions generated by the genetic algorithm. | |
bool | getTryImprove () const |
Returns true if improvements using hill climbing should be attempted for solutions generated by the genetic algorithm. Returns false otherwise. | |
void | setPoolSize (unsigned int size) |
Set the number of individuals in the population. | |
unsigned int | getPoolSize () const |
Get the number number of individuals in the population. | |
void | setPoolMutationSize (unsigned int size) |
Set the number of individuals to mutate at each generation. | |
unsigned int | getPoolMutationSize () const |
Get the number of individuals that are mutated at each generation. | |
void | setPoolRandomSize (unsigned int size) |
Set the number of individuals to randomly sample at each generation. | |
unsigned int | getPoolRandomSize () const |
Get the number of individuals to randomly sample at each generation. | |
void | setRange (double distance) |
Set the range (distance) to be used when sampling around a state. | |
double | getRange () const |
Get the range GeneticSearch is using. | |
void | clear () |
Clear the pool of samples. | |
Detailed Description
Genetic Algorithm for searching valid states.
- Short description
GeneticSearch does search for valid states using a genetic algorithm
- External documentation
Definition at line 60 of file GeneticSearch.h.
Constructor & Destructor Documentation
◆ GeneticSearch()
ompl::geometric::GeneticSearch::GeneticSearch | ( | const base::SpaceInformationPtr & | si | ) |
Construct an instance of a genetic algorithm for inverse kinematics given the space information to search within.
Definition at line 44 of file GeneticSearch.cpp.
◆ ~GeneticSearch()
ompl::geometric::GeneticSearch::~GeneticSearch | ( | ) |
Definition at line 58 of file GeneticSearch.cpp.
Member Function Documentation
◆ clear()
void ompl::geometric::GeneticSearch::clear | ( | ) |
Clear the pool of samples.
Definition at line 293 of file GeneticSearch.cpp.
◆ getMaxImproveSteps()
|
inline |
Get the number of steps to perform when using hill climbing to improve an individual in the population.
Definition at line 81 of file GeneticSearch.h.
◆ getPoolMutationSize()
|
inline |
Get the number of individuals that are mutated at each generation.
Definition at line 132 of file GeneticSearch.h.
◆ getPoolRandomSize()
|
inline |
Get the number of individuals to randomly sample at each generation.
Definition at line 144 of file GeneticSearch.h.
◆ getPoolSize()
|
inline |
Get the number number of individuals in the population.
Definition at line 120 of file GeneticSearch.h.
◆ getRange()
|
inline |
Get the range GeneticSearch is using.
Definition at line 156 of file GeneticSearch.h.
◆ getTryImprove()
|
inline |
Returns true if improvements using hill climbing should be attempted for solutions generated by the genetic algorithm. Returns false otherwise.
Definition at line 108 of file GeneticSearch.h.
◆ getValidityCheck()
|
inline |
Get the state validity flag; if this is false, states are not checked for validity.
Definition at line 94 of file GeneticSearch.h.
◆ setMaxImproveSteps()
|
inline |
Set the number of steps to perform when using hill climbing to improve an individual in the population.
Definition at line 74 of file GeneticSearch.h.
◆ setPoolMutationSize()
|
inline |
Set the number of individuals to mutate at each generation.
Definition at line 126 of file GeneticSearch.h.
◆ setPoolRandomSize()
|
inline |
Set the number of individuals to randomly sample at each generation.
Definition at line 138 of file GeneticSearch.h.
◆ setPoolSize()
|
inline |
Set the number of individuals in the population.
Definition at line 114 of file GeneticSearch.h.
◆ setRange()
|
inline |
Set the range (distance) to be used when sampling around a state.
Definition at line 150 of file GeneticSearch.h.
◆ setTryImprove()
|
inline |
Set the flag that determines whether improvements using hill climbing should be attempted for solutions generated by the genetic algorithm.
Definition at line 101 of file GeneticSearch.h.
◆ setValidityCheck()
|
inline |
Set the state validity flag; if this is false, states are not checked for validity.
Definition at line 87 of file GeneticSearch.h.
◆ solve()
bool ompl::geometric::GeneticSearch::solve | ( | double | solveTime, |
const base::GoalRegion & | goal, | ||
base::State * | result, | ||
const std::vector< base::State * > & | hint = std::vector<base::State *>() ) |
Find a state that fits the request.
Definition at line 64 of file GeneticSearch.cpp.
The documentation for this class was generated from the following files:
- ompl/geometric/GeneticSearch.h
- ompl/geometric/src/GeneticSearch.cpp