improve solvability of seperated rotation/translation
This commit is contained in:
parent
81ccdeb331
commit
61a47d7c22
|
@ -160,9 +160,7 @@ int Dogleg<Kernel>::solve(typename Kernel::MappedEquationSystem& sys, Functor& r
|
||||||
#ifdef USE_LOGGING
|
#ifdef USE_LOGGING
|
||||||
BOOST_LOG(log)<< "initial jacobi: "<<std::endl<<sys.Jacobi<<std::endl
|
BOOST_LOG(log)<< "initial jacobi: "<<std::endl<<sys.Jacobi<<std::endl
|
||||||
<< "residual: "<<sys.Residual.transpose()<<std::endl
|
<< "residual: "<<sys.Residual.transpose()<<std::endl
|
||||||
<< "maximal differential: "<<sys.Jacobi.template lpNorm<Eigen::Infinity>()
|
<< "maximal differential: "<<sys.Jacobi.template lpNorm<Eigen::Infinity>();
|
||||||
<< std::endl<<"Real Jacobi: "<<sys.m_jacobi<<std::endl
|
|
||||||
<< "Real residual: "<<sys.m_residual.transpose()<<std::endl;
|
|
||||||
#endif
|
#endif
|
||||||
sys.removeLocalGradientZeros();
|
sys.removeLocalGradientZeros();
|
||||||
|
|
||||||
|
@ -219,14 +217,12 @@ int Dogleg<Kernel>::solve(typename Kernel::MappedEquationSystem& sys, Functor& r
|
||||||
number_type rho;
|
number_type rho;
|
||||||
|
|
||||||
//get the update step
|
//get the update step
|
||||||
calculateStep(g, sys.Jacobi, sys.Residual, h_dl, delta);
|
calculateStep(g, sys.Jacobi, sys.Residual, h_dl, delta);
|
||||||
|
|
||||||
#ifdef USE_LOGGING
|
#ifdef USE_LOGGING
|
||||||
BOOST_LOG(log)<<"Step in iter "<<iter<<std::endl
|
BOOST_LOG(log)<< "Step in iter "<<iter<<std::endl
|
||||||
<< "Step: "<<h_dl.transpose()<<std::endl
|
<< "Step: "<<h_dl.transpose()<<std::endl
|
||||||
<< "Jacobi: "<<sys.Jacobi<<std::endl
|
<< "Jacobi: "<<sys.Jacobi<<std::endl;
|
||||||
<< "Real Jacobi: "<<sys.m_jacobi<<std::endl
|
|
||||||
<< "Residual: "<<F_old.transpose()<<std::endl;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// calculate the linear model
|
// calculate the linear model
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
#include <boost/graph/undirected_dfs.hpp>
|
#include <boost/graph/undirected_dfs.hpp>
|
||||||
|
|
||||||
|
#include <opendcm/core/kernel.hpp>
|
||||||
|
|
||||||
#ifdef DCM_EXTERNAL_CORE
|
#ifdef DCM_EXTERNAL_CORE
|
||||||
#include "opendcm/core/imp/kernel_imp.hpp"
|
#include "opendcm/core/imp/kernel_imp.hpp"
|
||||||
#include "opendcm/core/imp/clustergraph_imp.hpp"
|
#include "opendcm/core/imp/clustergraph_imp.hpp"
|
||||||
|
@ -359,9 +361,13 @@ void SystemSolver<Sys>::solveCluster(boost::shared_ptr<Cluster> cluster, Sys& sy
|
||||||
#endif
|
#endif
|
||||||
//cool, lets do uncylic. first all rotational constraints with rotational parameters
|
//cool, lets do uncylic. first all rotational constraints with rotational parameters
|
||||||
mes.setAccess(rotation);
|
mes.setAccess(rotation);
|
||||||
//solve can be done without catching exceptions, because this only fails if the system in
|
|
||||||
//unsolvable
|
//solve can be done without catching exceptions, because this only fails if the system is
|
||||||
DummyScaler re;
|
//unsolvable. We need the rescaler here two as unscaled rotations may be unprecise if the
|
||||||
|
//parts are big (as ne the normals are always 1) and then distances may not be possible
|
||||||
|
//to solve correctly with only translations
|
||||||
|
Rescaler re(cluster, mes);
|
||||||
|
re();
|
||||||
sys.kernel().solve(mes, re);
|
sys.kernel().solve(mes, re);
|
||||||
|
|
||||||
//now let's see if we have to go on with the translations
|
//now let's see if we have to go on with the translations
|
||||||
|
|
Loading…
Reference in New Issue
Block a user