Aikido
aikido::distance::ConfigurationRanker Class Referenceabstract

ConfigurationRanker is a base class for ranking configurations. More...

#include <aikido/distance/ConfigurationRanker.hpp>

Inheritance diagram for aikido::distance::ConfigurationRanker:
aikido::distance::JointAvoidanceConfigurationRanker aikido::distance::NominalConfigurationRanker

Public Member Functions

 ConfigurationRanker (statespace::dart::ConstMetaSkeletonStateSpacePtr metaSkeletonStateSpace, ::dart::dynamics::ConstMetaSkeletonPtr metaSkeleton, std::vector< double > weights=std::vector< double >())
 Constructor. More...
 
virtual ~ConfigurationRanker ()=default
 Destructor. More...
 
void rankConfigurations (std::vector< statespace::dart::MetaSkeletonStateSpace::ScopedState > &configurations) const
 Ranks the vector of configurations in increasing order of costs. More...
 

Protected Member Functions

virtual double evaluateConfiguration (const statespace::dart::MetaSkeletonStateSpace::State *solution) const =0
 Returns the cost of the configuration. More...
 

Protected Attributes

statespace::dart::ConstMetaSkeletonStateSpacePtr mMetaSkeletonStateSpace
 Statespace of the skeleton. More...
 
::dart::dynamics::ConstMetaSkeletonPtr mMetaSkeleton
 Metaskeleton of the robot. More...
 
distance::DistanceMetricPtr mDistanceMetric
 Distance Metric in this space. More...
 

Detailed Description

ConfigurationRanker is a base class for ranking configurations.

The rule for evaluating the costs of configurations to rank them is specified by the concrete classes.

Constructor & Destructor Documentation

◆ ConfigurationRanker()

aikido::distance::ConfigurationRanker::ConfigurationRanker ( statespace::dart::ConstMetaSkeletonStateSpacePtr  metaSkeletonStateSpace,
::dart::dynamics::ConstMetaSkeletonPtr  metaSkeleton,
std::vector< double >  weights = std::vector< double >() 
)

Constructor.

Parameters
[in]metaSkeletonStateSpaceStatespace of the skeleton.
[in]metaSkeletonMetaskeleton of the robot.
[in]weightsWeights over the joints to compute distance. Defaults to unit vector.

◆ ~ConfigurationRanker()

virtual aikido::distance::ConfigurationRanker::~ConfigurationRanker ( )
virtualdefault

Destructor.

Member Function Documentation

◆ evaluateConfiguration()

virtual double aikido::distance::ConfigurationRanker::evaluateConfiguration ( const statespace::dart::MetaSkeletonStateSpace::State solution) const
protectedpure virtual

Returns the cost of the configuration.

Parameters
[in]solutionConfiguration to evaluate.

Implemented in aikido::distance::NominalConfigurationRanker, and aikido::distance::JointAvoidanceConfigurationRanker.

◆ rankConfigurations()

void aikido::distance::ConfigurationRanker::rankConfigurations ( std::vector< statespace::dart::MetaSkeletonStateSpace::ScopedState > &  configurations) const

Ranks the vector of configurations in increasing order of costs.

Parameters
[in,out]configurationsVector of configurations to rank.

Member Data Documentation

◆ mDistanceMetric

distance::DistanceMetricPtr aikido::distance::ConfigurationRanker::mDistanceMetric
protected

Distance Metric in this space.

◆ mMetaSkeleton

::dart::dynamics::ConstMetaSkeletonPtr aikido::distance::ConfigurationRanker::mMetaSkeleton
protected

Metaskeleton of the robot.

◆ mMetaSkeletonStateSpace

statespace::dart::ConstMetaSkeletonStateSpacePtr aikido::distance::ConfigurationRanker::mMetaSkeletonStateSpace
protected

Statespace of the skeleton.