improve solvability of seperated rotation/translation

This commit is contained in:
Stefan Tröger 2013-12-21 20:01:55 +01:00
parent 81ccdeb331
commit 61a47d7c22
2 changed files with 13 additions and 11 deletions

View File

@ -160,9 +160,7 @@ int Dogleg<Kernel>::solve(typename Kernel::MappedEquationSystem& sys, Functor& r
#ifdef USE_LOGGING
BOOST_LOG(log)<< "initial jacobi: "<<std::endl<<sys.Jacobi<<std::endl
<< "residual: "<<sys.Residual.transpose()<<std::endl
<< "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;
<< "maximal differential: "<<sys.Jacobi.template lpNorm<Eigen::Infinity>();
#endif
sys.removeLocalGradientZeros();
@ -222,11 +220,9 @@ int Dogleg<Kernel>::solve(typename Kernel::MappedEquationSystem& sys, Functor& r
calculateStep(g, sys.Jacobi, sys.Residual, h_dl, delta);
#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
<< "Jacobi: "<<sys.Jacobi<<std::endl
<< "Real Jacobi: "<<sys.m_jacobi<<std::endl
<< "Residual: "<<F_old.transpose()<<std::endl;
<< "Jacobi: "<<sys.Jacobi<<std::endl;
#endif
// calculate the linear model

View File

@ -25,6 +25,8 @@
#include <boost/graph/undirected_dfs.hpp>
#include <opendcm/core/kernel.hpp>
#ifdef DCM_EXTERNAL_CORE
#include "opendcm/core/imp/kernel_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
//cool, lets do uncylic. first all rotational constraints with rotational parameters
mes.setAccess(rotation);
//solve can be done without catching exceptions, because this only fails if the system in
//unsolvable
DummyScaler re;
//solve can be done without catching exceptions, because this only fails if the system is
//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);
//now let's see if we have to go on with the translations