sim2.hpp
Go to the documentation of this file.
1 
4 #ifndef SOPHUS_SIM2_HPP
5 #define SOPHUS_SIM2_HPP
6 
7 #include "rxso2.hpp"
8 #include "sim_details.hpp"
9 
10 namespace Sophus {
11 template <class Scalar_, int Options = 0>
12 class Sim2;
15 } // namespace Sophus
16 
17 namespace Eigen {
18 namespace internal {
19 
20 template <class Scalar_, int Options>
21 struct traits<Sophus::Sim2<Scalar_, Options>> {
22  using Scalar = Scalar_;
25 };
26 
27 template <class Scalar_, int Options>
28 struct traits<Map<Sophus::Sim2<Scalar_>, Options>>
29  : traits<Sophus::Sim2<Scalar_, Options>> {
30  using Scalar = Scalar_;
31  using TranslationType = Map<Sophus::Vector2<Scalar>, Options>;
32  using RxSO2Type = Map<Sophus::RxSO2<Scalar>, Options>;
33 };
34 
35 template <class Scalar_, int Options>
36 struct traits<Map<Sophus::Sim2<Scalar_> const, Options>>
37  : traits<Sophus::Sim2<Scalar_, Options> const> {
38  using Scalar = Scalar_;
39  using TranslationType = Map<Sophus::Vector2<Scalar> const, Options>;
40  using RxSO2Type = Map<Sophus::RxSO2<Scalar> const, Options>;
41 };
42 } // namespace internal
43 } // namespace Eigen
44 
45 namespace Sophus {
46 
58 template <class Derived>
59 class Sim2Base {
60  public:
61  using Scalar = typename Eigen::internal::traits<Derived>::Scalar;
62  using TranslationType =
63  typename Eigen::internal::traits<Derived>::TranslationType;
64  using RxSO2Type = typename Eigen::internal::traits<Derived>::RxSO2Type;
65 
68  static int constexpr DoF = 4;
71  static int constexpr num_parameters = 4;
73  static int constexpr N = 3;
80 
85  template <typename OtherDerived>
86  using ReturnScalar = typename Eigen::ScalarBinaryOpTraits<
87  Scalar, typename OtherDerived::Scalar>::ReturnType;
88 
89  template <typename OtherDerived>
91 
92  template <typename PointDerived>
94 
95  template <typename HPointDerived>
97 
105  Adjoint res;
106  res.setZero();
107  res.template block<2, 2>(0, 0) = rxso2().matrix();
108  res(0, 2) = translation()[1];
109  res(1, 2) = -translation()[0];
110  res.template block<2, 1>(0, 3) = -translation();
111 
112  res(2, 2) = Scalar(1);
113 
114  res(3, 3) = Scalar(1);
115  return res;
116  }
117 
120  template <class NewScalarType>
122  return Sim2<NewScalarType>(rxso2().template cast<NewScalarType>(),
123  translation().template cast<NewScalarType>());
124  }
125 
129  RxSO2<Scalar> invR = rxso2().inverse();
130  return Sim2<Scalar>(invR, invR * (translation() * Scalar(-1)));
131  }
132 
150  Tangent res;
151  Vector2<Scalar> const theta_sigma = rxso2().log();
152  Scalar const theta = theta_sigma[0];
153  Scalar const sigma = theta_sigma[1];
154  Matrix2<Scalar> const Omega = SO2<Scalar>::hat(theta);
155  Matrix2<Scalar> const W_inv =
156  details::calcWInv<Scalar, 2>(Omega, theta, sigma, scale());
157 
158  res.segment(0, 2) = W_inv * translation();
159  res[2] = theta;
160  res[3] = sigma;
161  return res;
162  }
163 
175  Transformation homogenious_matrix;
176  homogenious_matrix.template topLeftCorner<2, 3>() = matrix2x3();
177  homogenious_matrix.row(2) =
179  return homogenious_matrix;
180  }
181 
186  matrix.template topLeftCorner<2, 2>() = rxso2().matrix();
187  matrix.col(2) = translation();
188  return matrix;
189  }
190 
193  SOPHUS_FUNC Sim2Base& operator=(Sim2Base const& other) = default;
194 
197  template <class OtherDerived>
199  Sim2Base<OtherDerived> const& other) {
200  rxso2() = other.rxso2();
201  translation() = other.translation();
202  return *this;
203  }
204 
210  template <typename OtherDerived>
212  Sim2Base<OtherDerived> const& other) const {
214  rxso2() * other.rxso2(), translation() + rxso2() * other.translation());
215  }
216 
225  template <typename PointDerived,
226  typename = typename std::enable_if<
229  Eigen::MatrixBase<PointDerived> const& p) const {
230  return rxso2() * p + translation();
231  }
232 
235  template <typename HPointDerived,
236  typename = typename std::enable_if<
239  Eigen::MatrixBase<HPointDerived> const& p) const {
240  const PointProduct<HPointDerived> tp =
241  rxso2() * p.template head<2>() + p(2) * translation();
242  return HomogeneousPointProduct<HPointDerived>(tp(0), tp(1), p(2));
243  }
244 
253  SOPHUS_FUNC Line operator*(Line const& l) const {
254  Line rotatedLine = rxso2() * l;
255  return Line(rotatedLine.origin() + translation(), rotatedLine.direction());
256  }
257 
265  p << rxso2().params(), translation();
266  return p;
267  }
268 
272  template <typename OtherDerived,
273  typename = typename std::enable_if<
274  std::is_same<Scalar, ReturnScalar<OtherDerived>>::value>::type>
276  Sim2Base<OtherDerived> const& other) {
277  *static_cast<Derived*>(this) = *this * other;
278  return *this;
279  }
280 
286  rxso2().setComplex(z);
287  }
288 
292  typename Eigen::internal::traits<Derived>::RxSO2Type::ComplexType const&
293  complex() const {
294  return rxso2().complex();
295  }
296 
300  return rxso2().rotationMatrix();
301  }
302 
306  return static_cast<Derived*>(this)->rxso2();
307  }
308 
311  SOPHUS_FUNC RxSO2Type const& rxso2() const {
312  return static_cast<Derived const*>(this)->rxso2();
313  }
314 
317  SOPHUS_FUNC Scalar scale() const { return rxso2().scale(); }
318 
322  rxso2().setRotationMatrix(R);
323  }
324 
330  SOPHUS_FUNC void setScale(Scalar const& scale) { rxso2().setScale(scale); }
331 
338  rxso2().setScaledRotationMatrix(sR);
339  }
340 
344  return static_cast<Derived*>(this)->translation();
345  }
346 
350  return static_cast<Derived const*>(this)->translation();
351  }
352 };
353 
355 template <class Scalar_, int Options>
356 class Sim2 : public Sim2Base<Sim2<Scalar_, Options>> {
357  public:
359  using Scalar = Scalar_;
361  using Point = typename Base::Point;
363  using Tangent = typename Base::Tangent;
364  using Adjoint = typename Base::Adjoint;
367 
368  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
369 
372  SOPHUS_FUNC Sim2();
373 
376  SOPHUS_FUNC Sim2(Sim2 const& other) = default;
377 
380  template <class OtherDerived>
382  : rxso2_(other.rxso2()), translation_(other.translation()) {
383  static_assert(std::is_same<typename OtherDerived::Scalar, Scalar>::value,
384  "must be same Scalar type");
385  }
386 
389  template <class OtherDerived, class D>
391  Eigen::MatrixBase<D> const& translation)
393  static_assert(std::is_same<typename OtherDerived::Scalar, Scalar>::value,
394  "must be same Scalar type");
395  static_assert(std::is_same<typename D::Scalar, Scalar>::value,
396  "must be same Scalar type");
397  }
398 
403  template <class D>
404  SOPHUS_FUNC Sim2(Vector2<Scalar> const& complex_number,
405  Eigen::MatrixBase<D> const& translation)
406  : rxso2_(complex_number), translation_(translation) {
407  static_assert(std::is_same<typename D::Scalar, Scalar>::value,
408  "must be same Scalar type");
409  }
410 
417  : rxso2_((T.template topLeftCorner<2, 2>()).eval()),
418  translation_(T.template block<2, 1>(0, 2)) {}
419 
426  // rxso2_ and translation_ are laid out sequentially with no padding
427  return rxso2_.data();
428  }
429 
432  SOPHUS_FUNC Scalar const* data() const {
433  // rxso2_ and translation_ are laid out sequentially with no padding
434  return rxso2_.data();
435  }
436 
440 
443  SOPHUS_FUNC RxSo2Member const& rxso2() const { return rxso2_; }
444 
448 
452  return translation_;
453  }
454 
458  return generator(i);
459  }
460 
468 
482  SOPHUS_FUNC static Sim2<Scalar> exp(Tangent const& a) {
483  // For the derivation of the exponential map of Sim(N) see
484  // H. Strasdat, "Local Accuracy and Global Consistency for Efficient Visual
485  // SLAM", PhD thesis, 2012.
486  // http:///hauke.strasdat.net/files/strasdat_thesis_2012.pdf (A.5, pp. 186)
487  Vector2<Scalar> const upsilon = a.segment(0, 2);
488  Scalar const theta = a[2];
489  Scalar const sigma = a[3];
490  RxSO2<Scalar> rxso2 = RxSO2<Scalar>::exp(a.template tail<2>());
491  Matrix2<Scalar> const Omega = SO2<Scalar>::hat(theta);
492  Matrix2<Scalar> const W = details::calcW<Scalar, 2>(Omega, theta, sigma);
493  return Sim2<Scalar>(rxso2, W * upsilon);
494  }
495 
521  SOPHUS_ENSURE(i >= 0 || i <= 3, "i should be in range [0,3].");
522  Tangent e;
523  e.setZero();
524  e[i] = Scalar(1);
525  return hat(e);
526  }
527 
542  Transformation Omega;
543  Omega.template topLeftCorner<2, 2>() =
544  RxSO2<Scalar>::hat(a.template tail<2>());
545  Omega.col(2).template head<2>() = a.template head<2>();
546  Omega.row(2).setZero();
547  return Omega;
548  }
549 
559  SOPHUS_FUNC static Tangent lieBracket(Tangent const& a, Tangent const& b) {
560  Vector2<Scalar> const upsilon1 = a.template head<2>();
561  Vector2<Scalar> const upsilon2 = b.template head<2>();
562  Scalar const theta1 = a[2];
563  Scalar const theta2 = b[2];
564  Scalar const sigma1 = a[3];
565  Scalar const sigma2 = b[3];
566 
567  Tangent res;
568  res[0] = -theta1 * upsilon2[1] + theta2 * upsilon1[1] +
569  sigma1 * upsilon2[0] - sigma2 * upsilon1[0];
570  res[1] = theta1 * upsilon2[0] - theta2 * upsilon1[0] +
571  sigma1 * upsilon2[1] - sigma2 * upsilon1[1];
572  res[2] = Scalar(0);
573  res[3] = Scalar(0);
574 
575  return res;
576  }
577 
584  template <class UniformRandomBitGenerator>
585  static Sim2 sampleUniform(UniformRandomBitGenerator& generator) {
586  std::uniform_real_distribution<Scalar> uniform(Scalar(-1), Scalar(1));
588  Vector2<Scalar>(uniform(generator), uniform(generator)));
589  }
590 
604  SOPHUS_FUNC static Tangent vee(Transformation const& Omega) {
605  Tangent upsilon_omega_sigma;
606  upsilon_omega_sigma.template head<2>() = Omega.col(2).template head<2>();
607  upsilon_omega_sigma.template tail<2>() =
608  RxSO2<Scalar>::vee(Omega.template topLeftCorner<2, 2>());
609  return upsilon_omega_sigma;
610  }
611 
612  protected:
615 };
616 
617 template <class Scalar, int Options>
619  static_assert(std::is_standard_layout<Sim2>::value,
620  "Assume standard layout for the use of offsetof check below.");
621  static_assert(
622  offsetof(Sim2, rxso2_) + sizeof(Scalar) * RxSO2<Scalar>::num_parameters ==
623  offsetof(Sim2, translation_),
624  "This class assumes packed storage and hence will only work "
625  "correctly depending on the compiler (options) - in "
626  "particular when using [this->data(), this-data() + "
627  "num_parameters] to access the raw data in a contiguous fashion.");
628 }
629 
630 } // namespace Sophus
631 
632 namespace Eigen {
633 
637 template <class Scalar_, int Options>
638 class Map<Sophus::Sim2<Scalar_>, Options>
639  : public Sophus::Sim2Base<Map<Sophus::Sim2<Scalar_>, Options>> {
640  public:
642  using Scalar = Scalar_;
644  using Point = typename Base::Point;
646  using Tangent = typename Base::Tangent;
647  using Adjoint = typename Base::Adjoint;
648 
649  // LCOV_EXCL_START
650  EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Map);
651  // LCOV_EXCL_STOP
652 
653  using Base::operator*=;
654  using Base::operator*;
655 
657  : rxso2_(coeffs),
658  translation_(coeffs + Sophus::RxSO2<Scalar>::num_parameters) {}
659 
662  SOPHUS_FUNC Map<Sophus::RxSO2<Scalar>, Options>& rxso2() { return rxso2_; }
663 
666  SOPHUS_FUNC Map<Sophus::RxSO2<Scalar>, Options> const& rxso2() const {
667  return rxso2_;
668  }
669 
672  SOPHUS_FUNC Map<Sophus::Vector2<Scalar>, Options>& translation() {
673  return translation_;
674  }
675 
677  SOPHUS_FUNC Map<Sophus::Vector2<Scalar>, Options> const& translation() const {
678  return translation_;
679  }
680 
681  protected:
682  Map<Sophus::RxSO2<Scalar>, Options> rxso2_;
683  Map<Sophus::Vector2<Scalar>, Options> translation_;
684 };
685 
689 template <class Scalar_, int Options>
690 class Map<Sophus::Sim2<Scalar_> const, Options>
691  : public Sophus::Sim2Base<Map<Sophus::Sim2<Scalar_> const, Options>> {
692  public:
694  using Scalar = Scalar_;
696  using Point = typename Base::Point;
698  using Tangent = typename Base::Tangent;
699  using Adjoint = typename Base::Adjoint;
700 
701  using Base::operator*=;
702  using Base::operator*;
703 
704  SOPHUS_FUNC Map(Scalar const* coeffs)
705  : rxso2_(coeffs),
706  translation_(coeffs + Sophus::RxSO2<Scalar>::num_parameters) {}
707 
710  SOPHUS_FUNC Map<Sophus::RxSO2<Scalar> const, Options> const& rxso2() const {
711  return rxso2_;
712  }
713 
716  SOPHUS_FUNC Map<Sophus::Vector2<Scalar> const, Options> const& translation()
717  const {
718  return translation_;
719  }
720 
721  protected:
722  Map<Sophus::RxSO2<Scalar> const, Options> const rxso2_;
723  Map<Sophus::Vector2<Scalar> const, Options> const translation_;
724 };
725 } // namespace Eigen
726 
727 #endif
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::RxSO2Type
typename Eigen::internal::traits< Map< Sophus::Sim2< Scalar_ > const, Options > >::RxSO2Type RxSO2Type
Definition: sim2.hpp:64
Sophus::Sim2Base::inverse
SOPHUS_FUNC Sim2< Scalar > inverse() const
Definition: sim2.hpp:128
Eigen::internal::traits< Map< Sophus::Sim2< Scalar_ > const, Options > >::TranslationType
Map< Sophus::Vector2< Scalar > const, Options > TranslationType
Definition: sim2.hpp:39
Sophus::Sim2Base::cast
SOPHUS_FUNC Sim2< NewScalarType > cast() const
Definition: sim2.hpp:121
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::Scalar
Scalar_ Scalar
Definition: sim2.hpp:642
Sophus::Sim2::Sim2
SOPHUS_FUNC Sim2(Sim2Base< OtherDerived > const &other)
Definition: sim2.hpp:381
Sophus::RxSO2Base
Definition: rxso2.hpp:76
Eigen
Definition: rxso2.hpp:16
Eigen::Map< Sophus::Sim2< Scalar_ > const, Options >::HomogeneousPoint
typename Base::HomogeneousPoint HomogeneousPoint
Definition: sim2.hpp:697
Sophus::Sim2Base::setRotationMatrix
SOPHUS_FUNC void setRotationMatrix(Matrix2< Scalar > &R)
Definition: sim2.hpp:321
Eigen::Map< Sophus::Sim2< Scalar_ > const, Options >::Scalar
Scalar_ Scalar
Definition: sim2.hpp:694
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::Transformation
typename Base::Transformation Transformation
Definition: sim2.hpp:643
Sophus::Sim2Base::translation
SOPHUS_FUNC TranslationType const & translation() const
Definition: sim2.hpp:349
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::HomogeneousPoint
typename Base::HomogeneousPoint HomogeneousPoint
Definition: sim2.hpp:645
Sophus::Sim2::translation_
TranslationMember translation_
Definition: sim2.hpp:614
Sophus::Sim2Base::rotationMatrix
SOPHUS_FUNC Matrix2< Scalar > rotationMatrix() const
Definition: sim2.hpp:299
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::translation_
Map< Sophus::Vector2< Scalar >, Options > translation_
Definition: sim2.hpp:683
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::ReturnScalar
typename Eigen::ScalarBinaryOpTraits< Scalar, typename OtherDerived::Scalar >::ReturnType ReturnScalar
Definition: sim2.hpp:87
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::TranslationType
typename Eigen::internal::traits< Map< Sophus::Sim2< Scalar_ > const, Options > >::TranslationType TranslationType
Definition: sim2.hpp:63
Sophus::Vector3
Vector< Scalar, 3, Options > Vector3
Definition: types.hpp:21
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::Transformation
Matrix< Scalar, N, N > Transformation
Definition: sim2.hpp:74
Eigen::Map< Sophus::Sim2< Scalar_ > const, Options >::Point
typename Base::Point Point
Definition: sim2.hpp:696
Sophus::Matrix2
Matrix< Scalar, 2, 2 > Matrix2
Definition: types.hpp:44
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::translation
SOPHUS_FUNC Map< Sophus::Vector2< Scalar >, Options > const & translation() const
Accessor of translation vector.
Definition: sim2.hpp:677
SOPHUS_ENSURE
#define SOPHUS_ENSURE(expr,...)
Definition: common.hpp:137
Sophus::Sim2Base::operator*
SOPHUS_FUNC HomogeneousPointProduct< HPointDerived > operator*(Eigen::MatrixBase< HPointDerived > const &p) const
Definition: sim2.hpp:238
Sophus::Sim2Base::operator*
SOPHUS_FUNC Line operator*(Line const &l) const
Definition: sim2.hpp:253
Sophus::Sim2::translation
SOPHUS_FUNC TranslationMember const & translation() const
Definition: sim2.hpp:451
Sophus::Sim2Base::setScale
SOPHUS_FUNC void setScale(Scalar const &scale)
Definition: sim2.hpp:330
Eigen::internal::traits< Map< Sophus::Sim2< Scalar_ > const, Options > >::RxSO2Type
Map< Sophus::RxSO2< Scalar > const, Options > RxSO2Type
Definition: sim2.hpp:40
Sophus::Vector2
Vector< Scalar, 2, Options > Vector2
Definition: types.hpp:16
Sophus::Sim2::rxso2
SOPHUS_FUNC RxSo2Member const & rxso2() const
Definition: sim2.hpp:443
Sophus::Sim2Base::Adj
SOPHUS_FUNC Adjoint Adj() const
Definition: sim2.hpp:104
Sophus::Sim2Base::num_parameters
static constexpr int num_parameters
Definition: sim2.hpp:71
Sophus::Sim2::vee
static SOPHUS_FUNC Tangent vee(Transformation const &Omega)
Definition: sim2.hpp:604
Sophus::Sim2Base::operator=
SOPHUS_FUNC Sim2Base & operator=(Sim2Base const &other)=default
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::translation
SOPHUS_FUNC Map< Sophus::Vector2< Scalar >, Options > & translation()
Definition: sim2.hpp:672
Sophus::Sim2Base::operator*=
SOPHUS_FUNC Sim2Base< Derived > & operator*=(Sim2Base< OtherDerived > const &other)
Definition: sim2.hpp:275
Sophus::Sim2::Sim2
SOPHUS_FUNC Sim2(Matrix< Scalar, 3, 3 > const &T)
Definition: sim2.hpp:416
Sophus::Sim2Base::matrix
SOPHUS_FUNC Transformation matrix() const
Definition: sim2.hpp:174
Sophus::Sim2Base::setScaledRotationMatrix
SOPHUS_FUNC void setScaledRotationMatrix(Matrix2< Scalar > const &sR)
Definition: sim2.hpp:337
Eigen::internal::traits< Map< Sophus::Sim2< Scalar_ > const, Options > >::Scalar
Scalar_ Scalar
Definition: sim2.hpp:38
Eigen::Map< Sophus::Sim2< Scalar_ > const, Options >::translation
SOPHUS_FUNC Map< Sophus::Vector2< Scalar > const, Options > const & translation() const
Definition: sim2.hpp:716
Sophus::Sim2::exp
static SOPHUS_FUNC Sim2< Scalar > exp(Tangent const &a)
Definition: sim2.hpp:482
Sophus::Sim2::Transformation
typename Base::Transformation Transformation
Definition: sim2.hpp:360
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::Scalar
typename Eigen::internal::traits< Map< Sophus::Sim2< Scalar_ > const, Options > >::Scalar Scalar
Definition: sim2.hpp:61
Sophus::Sim2Base::operator*
SOPHUS_FUNC Sim2Product< OtherDerived > operator*(Sim2Base< OtherDerived > const &other) const
Definition: sim2.hpp:211
Sophus::RxSO2::exp
static SOPHUS_FUNC RxSO2< Scalar > exp(Tangent const &a)
Definition: rxso2.hpp:467
Sophus::Sim2::Tangent
typename Base::Tangent Tangent
Definition: sim2.hpp:363
Eigen::internal::traits< Sophus::Sim2< Scalar_, Options > >::Scalar
Scalar_ Scalar
Definition: sim2.hpp:22
Sophus::Sim2::Sim2
SOPHUS_FUNC Sim2(Vector2< Scalar > const &complex_number, Eigen::MatrixBase< D > const &translation)
Definition: sim2.hpp:404
Sophus::Sim2Base::N
static constexpr int N
Group transformations are 3x3 matrices.
Definition: sim2.hpp:73
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::rxso2
SOPHUS_FUNC Map< Sophus::RxSO2< Scalar >, Options > & rxso2()
Definition: sim2.hpp:662
Eigen::internal::traits< Sophus::Sim2< Scalar_, Options > >::TranslationType
Sophus::Vector2< Scalar, Options > TranslationType
Definition: sim2.hpp:23
Eigen::Map< Sophus::Sim2< Scalar_ > const, Options >::rxso2
SOPHUS_FUNC Map< Sophus::RxSO2< Scalar > const, Options > const & rxso2() const
Definition: sim2.hpp:710
Sophus::Matrix
Eigen::Matrix< Scalar, M, N > Matrix
Definition: types.hpp:41
Sophus
Definition: average.hpp:17
Sophus::Sim2::Point
typename Base::Point Point
Definition: sim2.hpp:361
SOPHUS_FUNC
#define SOPHUS_FUNC
Definition: common.hpp:37
Sophus::Sim2::rxso2
SOPHUS_FUNC RxSo2Member & rxso2()
Definition: sim2.hpp:439
Sophus::Sim2Base::rxso2
SOPHUS_FUNC RxSO2Type & rxso2()
Definition: sim2.hpp:305
Sophus::Sim2::Scalar
Scalar_ Scalar
Definition: sim2.hpp:359
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::Adjoint
typename Base::Adjoint Adjoint
Definition: sim2.hpp:647
Eigen::Map< Sophus::Sim2< Scalar_ > const, Options >::translation_
const Map< Sophus::Vector2< Scalar > const, Options > translation_
Definition: sim2.hpp:723
Sophus::RxSO2::vee
static SOPHUS_FUNC Tangent vee(Transformation const &Omega)
Definition: rxso2.hpp:563
Sophus::Sim2Base::translation
SOPHUS_FUNC TranslationType & translation()
Definition: sim2.hpp:343
Eigen::Map< Sophus::Sim2< Scalar_ > const, Options >::Transformation
typename Base::Transformation Transformation
Definition: sim2.hpp:695
Eigen::Map< Sophus::Sim2< Scalar_ > const, Options >::Tangent
typename Base::Tangent Tangent
Definition: sim2.hpp:698
Sophus::Sim2Base::matrix2x3
SOPHUS_FUNC Matrix< Scalar, 2, 3 > matrix2x3() const
Definition: sim2.hpp:184
Sophus::Sim2::TranslationMember
Vector2< Scalar, Options > TranslationMember
Definition: sim2.hpp:366
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::rxso2
SOPHUS_FUNC Map< Sophus::RxSO2< Scalar >, Options > const & rxso2() const
Definition: sim2.hpp:666
Sophus::Sim2Base::rxso2
SOPHUS_FUNC RxSO2Type const & rxso2() const
Definition: sim2.hpp:311
rxso2.hpp
Sophus::Sim2Base::setComplex
SOPHUS_FUNC void setComplex(Vector2< Scalar > const &z)
Definition: sim2.hpp:285
Eigen::Map< Sophus::Sim2< Scalar_ > const, Options >::Adjoint
typename Base::Adjoint Adjoint
Definition: sim2.hpp:699
Sophus::Sim2::data
SOPHUS_FUNC Scalar * data()
Definition: sim2.hpp:425
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::HomogeneousPoint
Vector3< Scalar > HomogeneousPoint
Definition: sim2.hpp:76
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::Tangent
Vector< Scalar, DoF > Tangent
Definition: sim2.hpp:78
Sophus::Sim2Base::params
SOPHUS_FUNC Sophus::Vector< Scalar, num_parameters > params() const
Definition: sim2.hpp:263
Sophus::Sim2Base::DoF
static constexpr int DoF
Definition: sim2.hpp:68
Sophus::SO2::hat
static SOPHUS_FUNC Transformation hat(Tangent const &theta)
Definition: so2.hpp:471
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::Adjoint
Matrix< Scalar, DoF, DoF > Adjoint
Definition: sim2.hpp:79
Eigen::Map< Sophus::Sim2< Scalar_ > const, Options >::rxso2_
const Map< Sophus::RxSO2< Scalar > const, Options > rxso2_
Definition: sim2.hpp:722
Sophus::IsFixedSizeVector
Definition: types.hpp:225
Sophus::RxSO2< Scalar, Options >
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::HomogeneousPointProduct
Vector3< ReturnScalar< HPointDerived > > HomogeneousPointProduct
Definition: sim2.hpp:96
Sophus::Sim2::generator
static SOPHUS_FUNC Transformation generator(int i)
Definition: sim2.hpp:520
Sophus::Sim2Base::complex
SOPHUS_FUNC Eigen::internal::traits< Derived >::RxSO2Type::ComplexType const & complex() const
Definition: sim2.hpp:293
Sophus::Sim2::hat
static SOPHUS_FUNC Transformation hat(Tangent const &a)
Definition: sim2.hpp:541
Sophus::Sim2Base
Definition: sim2.hpp:59
Sophus::Sim2::rxso2_
RxSo2Member rxso2_
Definition: sim2.hpp:613
Sophus::Sim2Base::log
SOPHUS_FUNC Tangent log() const
Definition: sim2.hpp:143
Sophus::Sim2::translation
SOPHUS_FUNC TranslationMember & translation()
Definition: sim2.hpp:447
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::Point
typename Base::Point Point
Definition: sim2.hpp:644
Sophus::Sim2::lieBracket
static SOPHUS_FUNC Tangent lieBracket(Tangent const &a, Tangent const &b)
Definition: sim2.hpp:559
Sophus::Vector
Eigen::Matrix< Scalar, M, 1, Options > Vector
Definition: types.hpp:13
Sophus::Sim2::HomogeneousPoint
typename Base::HomogeneousPoint HomogeneousPoint
Definition: sim2.hpp:362
Eigen::Map< Sophus::Sim2< Scalar_ > const, Options >::Map
SOPHUS_FUNC Map(Scalar const *coeffs)
Definition: sim2.hpp:704
Sophus::Sim2::data
SOPHUS_FUNC Scalar const * data() const
Definition: sim2.hpp:432
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::Point
Vector2< Scalar > Point
Definition: sim2.hpp:75
Sophus::Sim2
Sim2 using default storage; derived from Sim2Base.
Definition: sim2.hpp:12
sim_details.hpp
Sophus::Sim2::Sim2
EIGEN_MAKE_ALIGNED_OPERATOR_NEW SOPHUS_FUNC Sim2()
Definition: sim2.hpp:618
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::rxso2_
Map< Sophus::RxSO2< Scalar >, Options > rxso2_
Definition: sim2.hpp:682
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::Map
SOPHUS_FUNC Map(Scalar *coeffs)
Definition: sim2.hpp:656
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::PointProduct
Vector2< ReturnScalar< PointDerived > > PointProduct
Definition: sim2.hpp:93
Sophus::RxSO2::hat
static SOPHUS_FUNC Transformation hat(Tangent const &a)
Definition: rxso2.hpp:514
Sophus::Sim2::Dxi_exp_x_matrix_at_0
static SOPHUS_FUNC Transformation Dxi_exp_x_matrix_at_0(int i)
Definition: sim2.hpp:457
Sophus::Sim2::sampleUniform
static Sim2 sampleUniform(UniformRandomBitGenerator &generator)
Definition: sim2.hpp:585
Sophus::ParametrizedLine2
ParametrizedLine< Scalar, 2, Options > ParametrizedLine2
Definition: types.hpp:77
Eigen::Map< Sophus::Sim2< Scalar_ >, Options >::Tangent
typename Base::Tangent Tangent
Definition: sim2.hpp:646
Sophus::Sim2::Adjoint
typename Base::Adjoint Adjoint
Definition: sim2.hpp:364
Sophus::Sim2Base< Map< Sophus::Sim2< Scalar_ > const, Options > >::Line
ParametrizedLine2< Scalar > Line
Definition: sim2.hpp:77
Sophus::Sim2Base::operator=
SOPHUS_FUNC Sim2Base< Derived > & operator=(Sim2Base< OtherDerived > const &other)
Definition: sim2.hpp:198
Sophus::Sim2Base::operator*
SOPHUS_FUNC PointProduct< PointDerived > operator*(Eigen::MatrixBase< PointDerived > const &p) const
Definition: sim2.hpp:228
Sophus::Sim2Base::scale
SOPHUS_FUNC Scalar scale() const
Definition: sim2.hpp:317
Sophus::Sim2::Sim2
SOPHUS_FUNC Sim2(RxSO2Base< OtherDerived > const &rxso2, Eigen::MatrixBase< D > const &translation)
Definition: sim2.hpp:390


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