Aikido
aikido::distance::NominalConfigurationRanker Class Reference

Ranks configurations by their distance from a nominal configuration. More...

#include <aikido/distance/NominalConfigurationRanker.hpp>

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

Public Member Functions

 NominalConfigurationRanker (statespace::dart::ConstMetaSkeletonStateSpacePtr metaSkeletonStateSpace, ::dart::dynamics::ConstMetaSkeletonPtr metaSkeleton, const statespace::CartesianProduct::State *nominalConfiguration, std::vector< double > weights=std::vector< double >())
 Constructor. More...
 
 NominalConfigurationRanker (statespace::dart::ConstMetaSkeletonStateSpacePtr metaSkeletonStateSpace, ::dart::dynamics::ConstMetaSkeletonPtr metaSkeleton, std::vector< double > weights=std::vector< double >())
 Constructor. More...
 
- Public Member Functions inherited from aikido::distance::ConfigurationRanker
 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

double evaluateConfiguration (const statespace::dart::MetaSkeletonStateSpace::State *solution) const override
 Returns cost as distance from the Nominal Configuration. More...
 

Protected Attributes

const statespace::dart::MetaSkeletonStateSpace::ScopedState mNominalConfiguration
 Nominal configuration used when evaluating a given configuration. More...
 
- Protected Attributes inherited from aikido::distance::ConfigurationRanker
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

Ranks configurations by their distance from a nominal configuration.

Configurations closer to the nominal configuration are ranked higher.

Constructor & Destructor Documentation

◆ NominalConfigurationRanker() [1/2]

aikido::distance::NominalConfigurationRanker::NominalConfigurationRanker ( statespace::dart::ConstMetaSkeletonStateSpacePtr  metaSkeletonStateSpace,
::dart::dynamics::ConstMetaSkeletonPtr  metaSkeleton,
const statespace::CartesianProduct::State nominalConfiguration,
std::vector< double >  weights = std::vector< double >() 
)

Constructor.

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

◆ NominalConfigurationRanker() [2/2]

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

Constructor.

The current configuration of metaSkeleton is considered as the nominal configuration.

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

Member Function Documentation

◆ evaluateConfiguration()

double aikido::distance::NominalConfigurationRanker::evaluateConfiguration ( const statespace::dart::MetaSkeletonStateSpace::State solution) const
overrideprotectedvirtual

Returns cost as distance from the Nominal Configuration.

Implements aikido::distance::ConfigurationRanker.

Member Data Documentation

◆ mNominalConfiguration

const statespace::dart::MetaSkeletonStateSpace::ScopedState aikido::distance::NominalConfigurationRanker::mNominalConfiguration
protected

Nominal configuration used when evaluating a given configuration.