25 #ifndef EIGENFACTORPLANE_HPP_ 26 #define EIGENFACTORPLANE_HPP_ 29 #include "mrob/factor.hpp" 30 #include <unordered_map> 32 #include <Eigen/StdVector> 81 {assert(0 &&
"EigenFactorPlane:get_obs: method should not be called");
return Mat31::Zero();}
83 {assert(0 &&
"EigenFactorPlane::get_resigual: method should not be called");
return Mat31::Zero();}
84 MatRefConst get_information_matrix()
const 85 {assert(0 &&
"EigenFactorPlane::get_inform method should not be called");
return Mat4::Zero();}
91 MatRefConst
get_jacobian([[maybe_unused]] mrob::factor_id_t
id = 0)
const override;
96 MatRefConst
get_hessian(mrob::factor_id_t
id = 0)
const override;
105 {
return planeEstimation_;}
114 void add_point(
const Mat31& p, std::shared_ptr<Node> &node, matData_t &W)
override;
118 void add_points_array(
const MatX &P, std::shared_ptr<Node> &node, mrob::matData_t &W)
override;
123 void add_points_S_matrix(
const Mat4 &S, std::shared_ptr<Node> &node, mrob::matData_t &W)
override;
173 std::deque<Mat61, Eigen::aligned_allocator<Mat61>>
J_;
178 std::deque<Mat6, Eigen::aligned_allocator<Mat6>>
H_;
186 std::deque<Mat4, Eigen::aligned_allocator<Mat4>>
S_, Q_;
189 Mat41 planeEstimation_, planeEstimationCenter_;
194 std::deque<std::deque<Mat31, Eigen::aligned_allocator<Mat31>> > allPlanePoints_;
195 std::deque<std::deque<matData_t> > allPointsInformation_;
196 uint_t numberPoints_;
198 matData_t planeError_;
203 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
std::deque< Mat6, Eigen::aligned_allocator< Mat6 > > H_
Definition: EigenFactorPlane.hpp:178
void evaluate_jacobians() override
Definition: EigenFactorPlane.cpp:48
void evaluate_chi2() override
Definition: EigenFactorPlane.cpp:85
robustFactorType
Definition: factor.hpp:87
void add_points_S_matrix(const Mat4 &S, std::shared_ptr< Node > &node, mrob::matData_t &W) override
Definition: EigenFactorPlane.cpp:129
VectRefConst get_residual() const
Definition: EigenFactorPlane.hpp:82
std::deque< factor_id_t > nodeIds_
Definition: EigenFactorPlane.hpp:162
Definition: factor.hpp:221
std::deque< Mat4, Eigen::aligned_allocator< Mat4 > > S_
Definition: EigenFactorPlane.hpp:186
VectRefConst get_state(void) const override
Definition: EigenFactorPlane.hpp:104
void calculate_all_matrices_S()
Definition: EigenFactorPlane.cpp:159
std::unordered_map< factor_id_t, uint_t > reverseNodeIds_
Definition: EigenFactorPlane.hpp:168
MatRefConst get_obs() const
Definition: EigenFactorPlane.hpp:80
Mat31 get_mean_point(factor_id_t id)
Definition: EigenFactorPlane.cpp:198
std::deque< Mat61, Eigen::aligned_allocator< Mat61 > > J_
Definition: EigenFactorPlane.hpp:173
void evaluate_residuals() override
Definition: EigenFactorPlane.cpp:43
virtual void estimate_plane()
Definition: EigenFactorPlane.cpp:135
void add_point(const Mat31 &p, std::shared_ptr< Node > &node, matData_t &W) override
Definition: EigenFactorPlane.cpp:92
EigenFactorPlane(Factor::robustFactorType robust_type=Factor::robustFactorType::QUADRATIC)
Definition: EigenFactorPlane.cpp:33
void print() const
Definition: EigenFactorPlane.cpp:205
Definition: EigenFactorPlane.hpp:55
MatRefConst get_hessian(mrob::factor_id_t id=0) const override
Definition: EigenFactorPlane.cpp:234
Special Euclidean (group) in 3d Is the group representing rotations and translations, that is, rigid body transformations. SE3 = {T = [R t] | R SO3 , t Re^3 } [0 1] Associated to the groups of RBT, there is the Lie algebra se3 representing the same transformation in the tangent space around the identity. Particularly, xi =[w , v] Re^6, where w Re^3 represents the rotation and v the translation. We will preserve this order in this class.
Definition: matrix_base.hpp:36
MatRefConst get_jacobian([[maybe_unused]] mrob::factor_id_t id=0) const override
Definition: EigenFactorPlane.cpp:227
void calculate_all_matrices_Q()
Definition: EigenFactorPlane.cpp:181
void add_points_array(const MatX &P, std::shared_ptr< Node > &node, mrob::matData_t &W) override
Definition: EigenFactorPlane.cpp:121