interpolate_details.hpp
Go to the documentation of this file.
1 #ifndef SOPHUS_INTERPOLATE_DETAILS_HPP
2 #define SOPHUS_INTERPOLATE_DETAILS_HPP
3 
4 #include "rxso2.hpp"
5 #include "rxso3.hpp"
6 #include "se2.hpp"
7 #include "se3.hpp"
8 #include "sim2.hpp"
9 #include "sim3.hpp"
10 #include "so2.hpp"
11 #include "so3.hpp"
12 
13 namespace Sophus {
14 namespace interp_details {
15 
16 template <class Group>
17 struct Traits;
18 
19 template <class Scalar>
20 struct Traits<SO2<Scalar>> {
21  static bool constexpr supported = true;
22 
23  static bool hasShortestPathAmbiguity(SO2<Scalar> const& foo_T_bar) {
24  using std::abs;
25  Scalar angle = foo_T_bar.log();
26  return abs(abs(angle) - Constants<Scalar>::pi()) <
28  }
29 };
30 
31 template <class Scalar>
32 struct Traits<RxSO2<Scalar>> {
33  static bool constexpr supported = true;
34 
35  static bool hasShortestPathAmbiguity(RxSO2<Scalar> const& foo_T_bar) {
36  return Traits<SO2<Scalar>>::hasShortestPathAmbiguity(foo_T_bar.so2());
37  }
38 };
39 
40 template <class Scalar>
41 struct Traits<SO3<Scalar>> {
42  static bool constexpr supported = true;
43 
44  static bool hasShortestPathAmbiguity(SO3<Scalar> const& foo_T_bar) {
45  using std::abs;
46  Scalar angle = foo_T_bar.logAndTheta().theta;
47  return abs(abs(angle) - Constants<Scalar>::pi()) <
49  }
50 };
51 
52 template <class Scalar>
53 struct Traits<RxSO3<Scalar>> {
54  static bool constexpr supported = true;
55 
56  static bool hasShortestPathAmbiguity(RxSO3<Scalar> const& foo_T_bar) {
57  return Traits<SO3<Scalar>>::hasShortestPathAmbiguity(foo_T_bar.so3());
58  }
59 };
60 
61 template <class Scalar>
62 struct Traits<SE2<Scalar>> {
63  static bool constexpr supported = true;
64 
65  static bool hasShortestPathAmbiguity(SE2<Scalar> const& foo_T_bar) {
66  return Traits<SO2<Scalar>>::hasShortestPathAmbiguity(foo_T_bar.so2());
67  }
68 };
69 
70 template <class Scalar>
71 struct Traits<SE3<Scalar>> {
72  static bool constexpr supported = true;
73 
74  static bool hasShortestPathAmbiguity(SE3<Scalar> const& foo_T_bar) {
75  return Traits<SO3<Scalar>>::hasShortestPathAmbiguity(foo_T_bar.so3());
76  }
77 };
78 
79 template <class Scalar>
80 struct Traits<Sim2<Scalar>> {
81  static bool constexpr supported = true;
82 
83  static bool hasShortestPathAmbiguity(Sim2<Scalar> const& foo_T_bar) {
84  return Traits<SO2<Scalar>>::hasShortestPathAmbiguity(
85  foo_T_bar.rxso2().so2());
86  ;
87  }
88 };
89 
90 template <class Scalar>
91 struct Traits<Sim3<Scalar>> {
92  static bool constexpr supported = true;
93 
94  static bool hasShortestPathAmbiguity(Sim3<Scalar> const& foo_T_bar) {
95  return Traits<SO3<Scalar>>::hasShortestPathAmbiguity(
96  foo_T_bar.rxso3().so3());
97  ;
98  }
99 };
100 
101 } // namespace interp_details
102 } // namespace Sophus
103 
104 #endif // SOPHUS_INTERPOLATE_DETAILS_HPP
Sophus::SE3::so3
SOPHUS_FUNC SO3Member & so3()
Definition: se3.hpp:527
Sophus::SO2
SO2 using default storage; derived from SO2Base.
Definition: so2.hpp:19
Sophus::interp_details::Traits< RxSO2< Scalar > >::hasShortestPathAmbiguity
static bool hasShortestPathAmbiguity(RxSO2< Scalar > const &foo_T_bar)
Definition: interpolate_details.hpp:35
Sophus::SO3
SO3 using default storage; derived from SO3Base.
Definition: so3.hpp:19
se2.hpp
Sophus::interp_details::Traits< SO2< Scalar > >::hasShortestPathAmbiguity
static bool hasShortestPathAmbiguity(SO2< Scalar > const &foo_T_bar)
Definition: interpolate_details.hpp:23
Sophus::interp_details::Traits< SE3< Scalar > >::hasShortestPathAmbiguity
static bool hasShortestPathAmbiguity(SE3< Scalar > const &foo_T_bar)
Definition: interpolate_details.hpp:74
rxso3.hpp
Sophus::SE2::so2
SOPHUS_FUNC SO2Member & so2()
Definition: se2.hpp:460
so3.hpp
Sophus::interp_details::Traits< SE2< Scalar > >::hasShortestPathAmbiguity
static bool hasShortestPathAmbiguity(SE2< Scalar > const &foo_T_bar)
Definition: interpolate_details.hpp:65
Sophus::interp_details::Traits
Definition: interpolate_details.hpp:17
Sophus::Constants::epsilon
static SOPHUS_FUNC Scalar epsilon()
Definition: common.hpp:147
Sophus
Definition: average.hpp:17
Sophus::Sim2::rxso2
SOPHUS_FUNC RxSo2Member & rxso2()
Definition: sim2.hpp:439
sim2.hpp
Sophus::SE2
SE2 using default storage; derived from SE2Base.
Definition: se2.hpp:11
Sophus::interp_details::Traits< SO3< Scalar > >::hasShortestPathAmbiguity
static bool hasShortestPathAmbiguity(SO3< Scalar > const &foo_T_bar)
Definition: interpolate_details.hpp:44
Sophus::SE3
SE3 using default storage; derived from SE3Base.
Definition: se3.hpp:11
se3.hpp
rxso2.hpp
Sophus::RxSO2
RxSO2 using storage; derived from RxSO2Base.
Definition: rxso2.hpp:11
Sophus::interp_details::Traits< RxSO3< Scalar > >::hasShortestPathAmbiguity
static bool hasShortestPathAmbiguity(RxSO3< Scalar > const &foo_T_bar)
Definition: interpolate_details.hpp:56
Sophus::Constants
Definition: common.hpp:146
Sophus::Sim3
Sim3 using default storage; derived from Sim3Base.
Definition: sim3.hpp:12
Sophus::Sim2
Sim2 using default storage; derived from Sim2Base.
Definition: sim2.hpp:12
Sophus::interp_details::Traits< Sim3< Scalar > >::hasShortestPathAmbiguity
static bool hasShortestPathAmbiguity(Sim3< Scalar > const &foo_T_bar)
Definition: interpolate_details.hpp:94
Sophus::RxSO3
RxSO3 using storage; derived from RxSO3Base.
Definition: rxso3.hpp:11
so2.hpp
Sophus::interp_details::Traits< Sim2< Scalar > >::hasShortestPathAmbiguity
static bool hasShortestPathAmbiguity(Sim2< Scalar > const &foo_T_bar)
Definition: interpolate_details.hpp:83
sim3.hpp
Sophus::Sim3::rxso3
SOPHUS_FUNC RxSo3Member & rxso3()
Definition: sim3.hpp:441


sophus
Author(s): Hauke Strasdat
autogenerated on Wed Mar 2 2022 01:01:47