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

strange bug initialization

parent b8724522
No related branches found
No related tags found
1 merge request!384Resolve "SolverCeres stop solving if can update"
Pipeline #5734 passed
......@@ -28,19 +28,13 @@ struct ParamsCeres : public ParamsSolver
ceres::Covariance::Options covariance_options;
ParamsCeres() :
ParamsSolver(),
solver_options(),
problem_options(),
covariance_options()
ParamsSolver()
{
loadHardcodedValues();
}
ParamsCeres(std::string _unique_name, const ParamsServer& _server) :
ParamsSolver(_unique_name, _server),
solver_options(),
problem_options(),
covariance_options()
ParamsSolver(_unique_name, _server)
{
loadHardcodedValues();
......@@ -53,6 +47,9 @@ struct ParamsCeres : public ParamsSolver
void loadHardcodedValues()
{
solver_options = ceres::Solver::Options();
problem_options = ceres::Problem::Options();
covariance_options = ceres::Covariance::Options();
problem_options.cost_function_ownership = ceres::DO_NOT_TAKE_OWNERSHIP;
problem_options.loss_function_ownership = ceres::TAKE_OWNERSHIP;
problem_options.local_parameterization_ownership = ceres::DO_NOT_TAKE_OWNERSHIP;
......
......@@ -14,7 +14,6 @@ namespace wolf
SolverCeres::SolverCeres(const ProblemPtr& _wolf_problem) :
SolverCeres(_wolf_problem, std::make_shared<ParamsCeres>())
{
WOLF_INFO("DEFAULT PARAMS constructor");
}
SolverCeres::SolverCeres(const ProblemPtr& _wolf_problem,
......@@ -22,7 +21,6 @@ SolverCeres::SolverCeres(const ProblemPtr& _wolf_problem,
: SolverManager(_wolf_problem, _params)
, params_ceres_(_params)
{
WOLF_INFO("GIVEN PARAMS constructor verbosity: ", (int)params_ceres_->verbose);
covariance_ = wolf::make_unique<ceres::Covariance>(params_ceres_->covariance_options);
ceres_problem_ = wolf::make_unique<ceres::Problem>(params_ceres_->problem_options);
......
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