Loading...
Searching...
No Matches
ompl::base::GenericParam Class Referenceabstract

Motion planning algorithms often employ parameters to guide their exploration process. (e.g., goal biasing). Motion planners (and some of their components) use this class to declare what the parameters are, in a generic way, so that they can be set externally. More...

#include <ompl/base/GenericParam.h>

Inheritance diagram for ompl::base::GenericParam:

Public Member Functions

 GenericParam (std::string name)
 The constructor of a parameter takes the name of the parameter (name)
const std::string & getName () const
 Get the name of the parameter.
void setName (const std::string &name)
 Set the name of the parameter.
virtual bool setValue (const std::string &value)=0
 Set the value of the parameter. The value is taken in as a string, but converted to the type of that parameter.
virtual std::string getValue () const =0
 Retrieve the value of the parameter, as a string.
template<typename T>
GenericParamoperator= (const T &value)
 Assignment operator by type. This is just for convenience, as it just calls setValue()
void setRangeSuggestion (const std::string &rangeSuggestion)
 Set a suggested range.
const std::string & getRangeSuggestion () const
 Get the suggested range of values.

Protected Attributes

std::string name_
 The name of the parameter.
std::string rangeSuggestion_
 Suggested range for the parameter.

Detailed Description

Motion planning algorithms often employ parameters to guide their exploration process. (e.g., goal biasing). Motion planners (and some of their components) use this class to declare what the parameters are, in a generic way, so that they can be set externally.

Definition at line 65 of file GenericParam.h.

Constructor & Destructor Documentation

◆ GenericParam()

ompl::base::GenericParam::GenericParam ( std::string name)
inline

The constructor of a parameter takes the name of the parameter (name)

Definition at line 69 of file GenericParam.h.

Member Function Documentation

◆ getName()

const std::string & ompl::base::GenericParam::getName ( ) const
inline

Get the name of the parameter.

Definition at line 76 of file GenericParam.h.

◆ getRangeSuggestion()

const std::string & ompl::base::GenericParam::getRangeSuggestion ( ) const
inline

Get the suggested range of values.

Definition at line 109 of file GenericParam.h.

◆ getValue()

virtual std::string ompl::base::GenericParam::getValue ( ) const
pure virtual

◆ operator=()

template<typename T>
GenericParam & ompl::base::GenericParam::operator= ( const T & value)
inline

Assignment operator by type. This is just for convenience, as it just calls setValue()

Definition at line 96 of file GenericParam.h.

◆ setName()

void ompl::base::GenericParam::setName ( const std::string & name)
inline

Set the name of the parameter.

Definition at line 82 of file GenericParam.h.

◆ setRangeSuggestion()

void ompl::base::GenericParam::setRangeSuggestion ( const std::string & rangeSuggestion)
inline

Set a suggested range.

Definition at line 103 of file GenericParam.h.

◆ setValue()

virtual bool ompl::base::GenericParam::setValue ( const std::string & value)
pure virtual

Set the value of the parameter. The value is taken in as a string, but converted to the type of that parameter.

Implemented in ompl::base::SpecificParam< T >.

Member Data Documentation

◆ name_

std::string ompl::base::GenericParam::name_
protected

The name of the parameter.

Definition at line 116 of file GenericParam.h.

◆ rangeSuggestion_

std::string ompl::base::GenericParam::rangeSuggestion_
protected

Suggested range for the parameter.

This can be used to provide a hint to, e.g., a GUI. The convention used in OMPL is to denote ranges for the following types as follows:

  • bool: "0,1"
  • enum: "<enum_val0>,<enum_val1>,<enum_val2>,..."
  • int, double: either "first:last" or "first:stepsize:last". In the first case, the stepsize is assumed to be 1. It is important to use floating point representations for double ranges (i.e., "1." instead of "1") to make sure the type is deduced correctly.

Definition at line 131 of file GenericParam.h.


The documentation for this class was generated from the following file: