Skip to content
Snippets Groups Projects
Commit e798de7a authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

hotfix

parent 60fd7d8b
No related branches found
No related tags found
1 merge request!419Resolve "Processor motion model"
Pipeline #6734 passed
This commit is part of merge request !419. Comments created here will be created in the context of that merge request.
...@@ -36,7 +36,7 @@ class FactorVelocityDirection3d: public FactorAutodiff<FactorVelocityDirection3d ...@@ -36,7 +36,7 @@ class FactorVelocityDirection3d: public FactorAutodiff<FactorVelocityDirection3d
_ftr_ptr->getFrame()->getO()), _ftr_ptr->getFrame()->getO()),
min_vel_sq_norm_(_min_vel_norm*_min_vel_norm) min_vel_sq_norm_(_min_vel_norm*_min_vel_norm)
{ {
assert(abs(_ftr_ptr->getMeasurement().norm() - 1.0) < wolf::EPS && "velocity direction measurement must be normalized"); assert(abs(_ftr_ptr->getMeasurement().norm() - 1.0) < wolf::Constants::EPS && "velocity direction measurement must be normalized");
// std::cout << "created FactorVelocityDirection3d " << std::endl; // std::cout << "created FactorVelocityDirection3d " << std::endl;
} }
...@@ -74,7 +74,7 @@ inline bool FactorVelocityDirection3d::operator ()(const T* const _v, const T* c ...@@ -74,7 +74,7 @@ inline bool FactorVelocityDirection3d::operator ()(const T* const _v, const T* c
// << v_local(2) << "\n"; // << v_local(2) << "\n";
// error (angle between measurement and velocity in local coordinates) // error (angle between measurement and velocity in local coordinates)
T error = acos( v_local.dot(getMeasurement().cast<T>()) / (v_local.norm())); T error = acos( v_local.dot(getMeasurement()) / (v_local.norm()));
// residual // residual
_residuals[0] = getMeasurementSquareRootInformationUpper()(0,0) * error; _residuals[0] = getMeasurementSquareRootInformationUpper()(0,0) * error;
......
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