interpolators.hpp
Go to the documentation of this file.
1 
4 /*****************************************************************************
5 ** Ifdefs
6 *****************************************************************************/
7 
8 #ifndef yocs_math_toolkit_SOPHUS_INTERPOLATERS_HPP_
9 #define yocs_math_toolkit_SOPHUS_INTERPOLATERS_HPP_
10 
11 /*****************************************************************************
12 ** Includes
13 *****************************************************************************/
14 
16 #include <ecl/linear_algebra.hpp>
17 #include <iomanip>
18 #include <iostream>
19 #include <sophus/se3.hpp>
20 #include <sophus/se2.hpp>
21 #include <sophus/so2.hpp>
22 #include <sophus/so3.hpp>
23 #include <string>
24 
25 #include "formatters.hpp"
26 
27 /*****************************************************************************
28 ** Namespace
29 *****************************************************************************/
30 
31 namespace Sophus {
32 
33 /*****************************************************************************
34 ** Interfaces
35 *****************************************************************************/
36 
37 
52 template <typename Group>
53 class Interpolator {
54 public:
55  Interpolator(const Group& T_a, const Group& T_b)
56  : T_a(T_a)
57  {
58  Group T_b_rel_a = T_b*T_a.inverse();
59  tangent = T_b_rel_a.log();
60  }
61  Group operator()(const double& t) {
62  return Group::exp(t*tangent)*T_a;
63  }
64 private:
65  Group T_a;
66  typename Group::Tangent tangent;
67 };
68 
78 class PlanarInterpolator {
79 public:
81  Sophus::SE3f operator()(const double& t);
82 
83 private:
87 };
88 
97 class SlidingInterpolator {
98 public:
100  Sophus::SE3f operator()(const double& t);
101 
102 private:
106 };
107 
108 
109 } // namespace Sophus
110 
111 #endif /* yocs_math_toolkit_SOPHUS_INTERPOLATERS_HPP_ */
Sophus::PlanarInterpolator::T_a
Sophus::SE3f T_a
Definition: interpolators.hpp:90
so3.hpp
Sophus::SE3::Tangent
typename Base::Tangent Tangent
Sophus::Interpolator::T_a
Group T_a
Definition: interpolators.hpp:79
Sophus::SlidingInterpolator::operator()
Sophus::SE3f operator()(const double &t)
Sophus::PlanarInterpolator::PlanarInterpolator
PlanarInterpolator(const Sophus::SE3f &T_a, const Sophus::SE3f &T_b)
Sophus::Interpolator::tangent
Group::Tangent tangent
Definition: interpolators.hpp:80
se2.hpp
Sophus::SlidingInterpolator::SlidingInterpolator
SlidingInterpolator(const Sophus::SE3f &T_a, const Sophus::SE3f &T_b)
linear_algebra.hpp
Mathematical tools for linear algebra.
Sophus
Sophus::SlidingInterpolator::interpolator
Interpolator< Sophus::SE3f > interpolator
Definition: interpolators.hpp:109
Sophus::SE2< float >::Tangent
typename Base::Tangent Tangent
Sophus::SE2< float >
Sophus::Interpolator
Interpolate between two lie group objects.
Definition: interpolators.hpp:59
so2.hpp
Sophus::Interpolator::operator()
Group operator()(const double &t)
Definition: interpolators.hpp:75
Sophus::SE3< float >
Sophus::PlanarInterpolator::t_a
Sophus::SE2f t_a
Definition: interpolators.hpp:91
Sophus::PlanarInterpolator::tangent
Sophus::SE2f::Tangent tangent
Definition: interpolators.hpp:92
Sophus::SlidingInterpolator
Definition: interpolators.hpp:103
formatters.hpp
Sophus::SlidingInterpolator::T_a
Sophus::SE3f T_a
Definition: interpolators.hpp:110
Sophus::PlanarInterpolator::operator()
Sophus::SE3f operator()(const double &t)
standard_exception.hpp
Sophus::Interpolator::Interpolator
Interpolator(const Group &T_a, const Group &T_b)
Definition: interpolators.hpp:69
Sophus::SlidingInterpolator::T_b
Sophus::SE3f T_b
Definition: interpolators.hpp:110
Sophus::SlidingInterpolator::tangent
Sophus::SE3f::Tangent tangent
Definition: interpolators.hpp:111
se3.hpp


ecl_linear_algebra
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:29