6 #include <Eigen/Geometry>
22 template <
typename TargetPo
intCloud,
typename SourcePo
intCloud,
typename TargetTree>
24 const TargetPointCloud& target,
25 const SourcePointCloud& source,
26 const TargetTree& target_tree,
27 const Eigen::Isometry3d& T,
28 Eigen::Matrix<double, 6, 6>* H,
29 Eigen::Matrix<double, 6, 1>* b,
37 template <
typename TargetPo
intCloud,
typename SourcePo
intCloud>
38 void update_error(
const TargetPointCloud& target,
const SourcePointCloud& source,
const Eigen::Isometry3d& T,
double* e)
const {}
57 template <
typename TargetPo
intCloud,
typename SourcePo
intCloud,
typename TargetTree>
59 const TargetPointCloud& target,
60 const SourcePointCloud& source,
61 const TargetTree& target_tree,
62 const Eigen::Isometry3d& T,
63 Eigen::Matrix<double, 6, 6>* H,
64 Eigen::Matrix<double, 6, 1>* b,
66 *H +=
lambda * (
mask - 1.0).abs().matrix().asDiagonal();
70 template <
typename TargetPo
intCloud,
typename SourcePo
intCloud>
71 void update_error(
const TargetPointCloud& target,
const SourcePointCloud& source,
const Eigen::Isometry3d& T,
double* e)
const {}
74 Eigen::Array<double, 6, 1>
mask;
Definition: flat_container.hpp:12
Null factor that gives no constraints.
Definition: general_factor.hpp:11
void update_error(const TargetPointCloud &target, const SourcePointCloud &source, const Eigen::Isometry3d &T, double *e) const
Update error consisting of per-point factors.
Definition: general_factor.hpp:38
void update_linearized_system(const TargetPointCloud &target, const SourcePointCloud &source, const TargetTree &target_tree, const Eigen::Isometry3d &T, Eigen::Matrix< double, 6, 6 > *H, Eigen::Matrix< double, 6, 1 > *b, double *e) const
Update linearized system consisting of linearized per-point factors.
Definition: general_factor.hpp:23
Factor to restrict the degrees of freedom of optimization (e.g., fixing roll, pitch rotation).
Definition: general_factor.hpp:43
RestrictDoFFactor()
Constructor.
Definition: general_factor.hpp:45
double lambda
Regularization parameter (Increasing this makes the constraint stronger)
Definition: general_factor.hpp:73
void set_rotation_mask(const Eigen::Array3d &rot_mask)
Set rotation mask. (1.0 = active, 0.0 = inactive)
Definition: general_factor.hpp:51
void update_linearized_system(const TargetPointCloud &target, const SourcePointCloud &source, const TargetTree &target_tree, const Eigen::Isometry3d &T, Eigen::Matrix< double, 6, 6 > *H, Eigen::Matrix< double, 6, 1 > *b, double *e) const
Update linearized system consisting of linearized per-point factors.
Definition: general_factor.hpp:58
void update_error(const TargetPointCloud &target, const SourcePointCloud &source, const Eigen::Isometry3d &T, double *e) const
Update error consisting of per-point factors.
Definition: general_factor.hpp:71
void set_translation_mask(const Eigen::Array3d &trans_mask)
Set translation mask. (1.0 = active, 0.0 = inactive)
Definition: general_factor.hpp:54
Eigen::Array< double, 6, 1 > mask
Mask for restricting DoF (rx, ry, rz, tx, ty, tz)
Definition: general_factor.hpp:74