Go to the documentation of this file.
18 using Ptr = std::unique_ptr<DistanceMetric>;
21 template <
class Space>
31 static Ptr create(std::shared_ptr<const statespace::R0> _sspace)
33 return ::aikido::common::make_unique<R0Euclidean>(std::move(_sspace));
41 static Ptr create(std::shared_ptr<const statespace::R1> _sspace)
43 return ::aikido::common::make_unique<R1Euclidean>(std::move(_sspace));
51 static Ptr create(std::shared_ptr<const statespace::R2> _sspace)
53 return ::aikido::common::make_unique<R2Euclidean>(std::move(_sspace));
61 static Ptr create(std::shared_ptr<const statespace::R3> _sspace)
63 return ::aikido::common::make_unique<R3Euclidean>(std::move(_sspace));
71 static Ptr create(std::shared_ptr<const statespace::R6> _sspace)
73 return ::aikido::common::make_unique<R6Euclidean>(std::move(_sspace));
81 static Ptr create(std::shared_ptr<const statespace::SO2> _sspace)
83 return ::aikido::common::make_unique<SO2Angular>(std::move(_sspace));
91 static Ptr create(std::shared_ptr<const statespace::SO3> _sspace)
93 return ::aikido::common::make_unique<SO3Angular>(std::move(_sspace));
101 static Ptr create(std::shared_ptr<const statespace::CartesianProduct> _sspace)
103 if (_sspace ==
nullptr)
104 throw std::invalid_argument(
105 "Cannot create distance metric for null statespace.");
107 std::vector<std::shared_ptr<DistanceMetric> > metrics;
108 metrics.reserve(_sspace->getNumSubspaces());
110 for (std::size_t i = 0; i < _sspace->getNumSubspaces(); ++i)
112 auto subspace = _sspace->getSubspace<>(i);
114 metrics.emplace_back(std::move(metric));
117 return ::aikido::common::make_unique<CartesianProductWeighted>(
118 std::move(_sspace), std::move(metrics));
126 static Ptr create(std::shared_ptr<const statespace::SE2> _sspace)
128 return ::aikido::common::make_unique<SE2Weighted>(std::move(_sspace));
147 template <
class Space>
149 std::shared_ptr<Space> _sspace)
151 if (_sspace ==
nullptr)
152 throw std::invalid_argument(
"_sspace is null.");
static Ptr create(std::shared_ptr< const statespace::SE2 > _sspace)
Definition: defaults-impl.hpp:126
std::unique_ptr< DistanceMetric > createDistanceMetric(statespace::ConstStateSpacePtr _sspace)
Creates a DistanceMetric that is appropriate for the statespace.
static Ptr create(std::shared_ptr< const statespace::SO3 > _sspace)
Definition: defaults-impl.hpp:91
R< 6 > R6
Definition: Rn.hpp:163
static Ptr create(std::shared_ptr< const statespace::SO2 > _sspace)
Definition: defaults-impl.hpp:81
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
static Ptr create(std::shared_ptr< const statespace::R2 > _sspace)
Definition: defaults-impl.hpp:51
The two-dimensional special orthogonal group SO(3), i.e.
Definition: SO3.hpp:17
common::type_list< const statespace::CartesianProduct, const statespace::R0, const statespace::R1, const statespace::R2, const statespace::R3, const statespace::R6, const statespace::SO2, const statespace::SO3, const statespace::SE2 > SupportedStateSpaces
Definition: defaults-impl.hpp:142
std::unique_ptr< DistanceMetric > createDistanceMetricFor(std::shared_ptr< Space > _sspace)
Creates a DistanceMetric that is appropriate for the statespace of type Space.
Definition: defaults-impl.hpp:148
static Ptr create(std::shared_ptr< const statespace::CartesianProduct > _sspace)
Definition: defaults-impl.hpp:101
The two-dimensional special Euclidean group SE(2), i.e.
Definition: SE2.hpp:19
R< 3 > R3
Definition: Rn.hpp:162
static Ptr create(std::shared_ptr< const statespace::R0 > _sspace)
Definition: defaults-impl.hpp:31
Wrapper for a variadic template parameter pack of types.
Definition: metaprogramming.hpp:13
Computes the shortest distance between two angles in SE2.
Definition: SE2.hpp:11
static Ptr create(std::shared_ptr< const statespace::R6 > _sspace)
Definition: defaults-impl.hpp:71
R< 2 > R2
Definition: Rn.hpp:161
R< 0 > R0
Definition: Rn.hpp:159
std::unique_ptr< DistanceMetric > Ptr
Definition: defaults-impl.hpp:18
static Ptr create(std::shared_ptr< const statespace::R1 > _sspace)
Definition: defaults-impl.hpp:41
R< 1 > R1
Definition: Rn.hpp:160
Represents the Cartesian product of other StateSpaces.
Definition: CartesianProduct.hpp:18
static Ptr create(std::shared_ptr< const statespace::R3 > _sspace)
Definition: defaults-impl.hpp:61
The two-dimensional special orthogonal group SO(2), i.e.
Definition: SO2.hpp:18
Definition: defaults-impl.hpp:22