local_parameterization_se3.hpp
Go to the documentation of this file.
1 #ifndef SOPHUS_TEST_LOCAL_PARAMETERIZATION_SE3_HPP
2 #define SOPHUS_TEST_LOCAL_PARAMETERIZATION_SE3_HPP
3 
4 #include <ceres/local_parameterization.h>
5 #include <sophus/se3.hpp>
6 
7 namespace Sophus {
8 namespace test {
9 
10 class LocalParameterizationSE3 : public ceres::LocalParameterization {
11  public:
13 
14  // SE3 plus operation for Ceres
15  //
16  // T * exp(x)
17  //
18  virtual bool Plus(double const* T_raw, double const* delta_raw,
19  double* T_plus_delta_raw) const {
20  Eigen::Map<SE3d const> const T(T_raw);
21  Eigen::Map<Vector6d const> const delta(delta_raw);
22  Eigen::Map<SE3d> T_plus_delta(T_plus_delta_raw);
23  T_plus_delta = T * SE3d::exp(delta);
24  return true;
25  }
26 
27  // Jacobian of SE3 plus operation for Ceres
28  //
29  // Dx T * exp(x) with x=0
30  //
31  virtual bool ComputeJacobian(double const* T_raw,
32  double* jacobian_raw) const {
33  Eigen::Map<SE3d const> T(T_raw);
34  Eigen::Map<Eigen::Matrix<double, 7, 6, Eigen::RowMajor>> jacobian(
35  jacobian_raw);
36  jacobian = T.Dx_this_mul_exp_x_at_0();
37  return true;
38  }
39 
40  virtual int GlobalSize() const { return SE3d::num_parameters; }
41 
42  virtual int LocalSize() const { return SE3d::DoF; }
43 };
44 } // namespace test
45 } // namespace Sophus
46 
47 #endif
test
bool test(Sophus::SE3d const &T_w_targ, Sophus::SE3d const &T_w_init, Sophus::SE3d::Point const &point_a_init, Sophus::SE3d::Point const &point_b)
Definition: test_ceres_se3.cpp:84
Sophus::SE3::DoF
static constexpr int DoF
Definition: se3.hpp:434
Sophus::test::LocalParameterizationSE3::~LocalParameterizationSE3
virtual ~LocalParameterizationSE3()
Definition: local_parameterization_se3.hpp:12
Sophus::SE3::exp
static SOPHUS_FUNC SE3< Scalar > exp(Tangent const &a)
Definition: se3.hpp:763
Sophus::test::LocalParameterizationSE3
Definition: local_parameterization_se3.hpp:10
Sophus::test::LocalParameterizationSE3::ComputeJacobian
virtual bool ComputeJacobian(double const *T_raw, double *jacobian_raw) const
Definition: local_parameterization_se3.hpp:31
Sophus
Definition: average.hpp:17
Sophus::test::LocalParameterizationSE3::LocalSize
virtual int LocalSize() const
Definition: local_parameterization_se3.hpp:42
se3.hpp
Sophus::test::LocalParameterizationSE3::GlobalSize
virtual int GlobalSize() const
Definition: local_parameterization_se3.hpp:40
Sophus::SE3::num_parameters
static constexpr int num_parameters
Definition: se3.hpp:435
Sophus::test::LocalParameterizationSE3::Plus
virtual bool Plus(double const *T_raw, double const *delta_raw, double *T_plus_delta_raw) const
Definition: local_parameterization_se3.hpp:18


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