Main MRPT website > C++ reference for MRPT 1.5.3
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 "rxso3.hpp"
5 #include "se2.hpp"
6 #include "se3.hpp"
7 #include "sim3.hpp"
8 #include "so2.hpp"
9 #include "so3.hpp"
10 
11 namespace Sophus {
12 namespace interp_details {
13 
14 template <class Group>
15 struct Traits;
16 
17 template <class Scalar>
18 struct Traits<SO2<Scalar>> {
19  static bool constexpr supported = true;
20 
21  static bool hasShortestPathAmbiguity(SO2<Scalar> const& foo_T_bar) {
22  using std::abs;
23  Scalar angle = SO2<Scalar>::log(foo_T_bar);
24  return abs(abs(angle) - Constants<Scalar>::pi()) <
26  }
27 };
28 
29 template <class Scalar>
30 struct Traits<SO3<Scalar>> {
31  static bool constexpr supported = true;
32 
33  static bool hasShortestPathAmbiguity(SO3<Scalar> const& foo_T_bar) {
34  using std::abs;
35  Scalar angle;
36  SO3<Scalar>::logAndTheta(foo_T_bar, &angle);
37  return abs(abs(angle) - Constants<Scalar>::pi()) <
39  }
40 };
41 
42 template <class Scalar>
43 struct Traits<RxSO3<Scalar>> {
44  static bool constexpr supported = true;
45 
46  static bool hasShortestPathAmbiguity(RxSO3<Scalar> const& foo_T_bar) {
47  return Traits<SO3<Scalar>>::hasShortestPathAmbiguity(foo_T_bar.so3());
48  }
49 };
50 
51 template <class Scalar>
52 struct Traits<SE2<Scalar>> {
53  static bool constexpr supported = true;
54 
55  static bool hasShortestPathAmbiguity(SE2<Scalar> const& foo_T_bar) {
56  return Traits<SO2<Scalar>>::hasShortestPathAmbiguity(foo_T_bar.so2());
57  }
58 };
59 
60 template <class Scalar>
61 struct Traits<SE3<Scalar>> {
62  static bool constexpr supported = true;
63 
64  static bool hasShortestPathAmbiguity(SE3<Scalar> const& foo_T_bar) {
65  return Traits<SO3<Scalar>>::hasShortestPathAmbiguity(foo_T_bar.so3());
66  }
67 };
68 
69 template <class Scalar>
70 struct Traits<Sim3<Scalar>> {
71  static bool constexpr supported = true;
72 
73  static bool hasShortestPathAmbiguity(Sim3<Scalar> const& foo_T_bar) {
74  return Traits<SO3<Scalar>>::hasShortestPathAmbiguity(
75  foo_T_bar.rxso3().so3());
76  ;
77  }
78 };
79 
80 } // namespace details
81 } // namespace Sophus
82 
83 #endif // SOPHUS_INTERPOLATE_DETAILS_HPP
static bool hasShortestPathAmbiguity(SO2< Scalar > const &foo_T_bar)
static bool hasShortestPathAmbiguity(Sim3< Scalar > const &foo_T_bar)
SOPHUS_FUNC SO3< Scalar > so3() const
Definition: rxso3.hpp:309
static SOPHUS_FUNC Scalar epsilon()
Definition: common.hpp:139
SOPHUS_FUNC SO2Member & so2()
Definition: se2.hpp:529
SOPHUS_FUNC Scalar log() const
Definition: so2.hpp:127
static bool hasShortestPathAmbiguity(SE2< Scalar > const &foo_T_bar)
static SOPHUS_FUNC Tangent logAndTheta(SO3< Scalar > const &other, Scalar *theta)
Definition: so3.hpp:414
SOPHUS_FUNC SO3Member & so3()
Definition: se3.hpp:625
static bool hasShortestPathAmbiguity(SE3< Scalar > const &foo_T_bar)
SOPHUS_FUNC RxSo3Member & rxso3()
Definition: sim3.hpp:623
static bool hasShortestPathAmbiguity(RxSO3< Scalar > const &foo_T_bar)
static bool hasShortestPathAmbiguity(SO3< Scalar > const &foo_T_bar)



Page generated by Doxygen 1.8.13 for MRPT 1.5.3 at Sun Nov 26 00:44:48 UTC 2017