Skip to content
Snippets Groups Projects
Commit be4e8485 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Fixed installation related issues

parent 8c752af5
No related branches found
No related tags found
No related merge requests found
Pipeline #2790 failed
...@@ -270,21 +270,21 @@ SET(HDRS_CAPTURE ...@@ -270,21 +270,21 @@ SET(HDRS_CAPTURE
SET(HDRS_FACTOR SET(HDRS_FACTOR
include/base/factor/factor_analytic.h include/base/factor/factor_analytic.h
include/base/factor/factor_autodiff.h include/base/factor/factor_autodiff.h
include/base/factor/factor_autodiff_distance_3d.h include/base/factor/factor_autodiff_distance_3D.h
include/base/factor/factor_base.h include/base/factor/factor_base.h
include/base/factor/factor_block_absolute.h include/base/factor/factor_block_absolute.h
include/base/factor/factor_container.h include/base/factor/factor_container.h
include/base/factor/factor_corner_2d.h include/base/factor/factor_corner_2D.h
include/base/factor/factor_diff_drive.h include/base/factor/factor_diff_drive.h
include/base/factor/factor_epipolar.h include/base/factor/factor_epipolar.h
include/base/factor/factor_fix_bias.h include/base/factor/factor_fix_bias.h
include/base/factor/factor_odom_2d.h include/base/factor/factor_odom_2D.h
include/base/factor/factor_odom_2d_analytic.h include/base/factor/factor_odom_2D_analytic.h
include/base/factor/factor_odom_3d.h include/base/factor/factor_odom_3D.h
include/base/factor/factor_pose_2d.h include/base/factor/factor_pose_2D.h
include/base/factor/factor_pose_3d.h include/base/factor/factor_pose_3D.h
include/base/factor/factor_quaternion_absolute.h include/base/factor/factor_quaternion_absolute.h
include/base/factor/factor_relative_2d_analytic.h include/base/factor/factor_relative_2D_analytic.h
) )
SET(HDRS_FEATURE SET(HDRS_FEATURE
include/base/feature/feature_base.h include/base/feature/feature_base.h
...@@ -335,6 +335,7 @@ SET(HDRS_DTASSC ...@@ -335,6 +335,7 @@ SET(HDRS_DTASSC
include/base/association/association_node.h include/base/association/association_node.h
include/base/association/association_solver.h include/base/association/association_solver.h
include/base/association/association_tree.h include/base/association/association_tree.h
include/base/association/matrix.h
include/base/track_matrix.h include/base/track_matrix.h
) )
......
...@@ -50,12 +50,7 @@ class FactorAutodiffDistance3D : public FactorAutodiff<FactorAutodiffDistance3D, ...@@ -50,12 +50,7 @@ class FactorAutodiffDistance3D : public FactorAutodiff<FactorAutodiffDistance3D,
Map<const Matrix<T,3,1>> pos2(_pos2); Map<const Matrix<T,3,1>> pos2(_pos2);
Map<Matrix<T,1,1>> res(_residual); Map<Matrix<T,1,1>> res(_residual);
// If pos2 and pos1 are the same, undefined behavior when computing the jacobian Matrix<T,1,1> dist_exp ( sqrt( ( pos2 - pos1 ).squaredNorm() ) );
T norm_squared = ( pos2 - pos1 ).squaredNorm();
if (norm_squared < (T)1e-8){
norm_squared += (T)1e-8;
}
Matrix<T,1,1> dist_exp ( sqrt(norm_squared) );
Matrix<T,1,1> dist_meas (getMeasurement().cast<T>() ); Matrix<T,1,1> dist_meas (getMeasurement().cast<T>() );
Matrix<T,1,1> sqrt_info_upper = getMeasurementSquareRootInformationUpper().cast<T>(); Matrix<T,1,1> sqrt_info_upper = getMeasurementSquareRootInformationUpper().cast<T>();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment