My Project
1.0
Holistic Fusion: A Generic Framework for Multimodal Sensor Fusion
Loading...
Searching...
No Matches
OptimizerLM.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2024 by Julian Nubert, Robotic Systems Lab, ETH Zurich.
3
All rights reserved.
4
This file is released under the "BSD-3-Clause License".
5
Please see the LICENSE file that has been included as part of this package.
6
*/
7
8
#ifndef OPTIMIZER_LM_HPP
9
#define OPTIMIZER_LM_HPP
10
11
// GTSAM
12
#include <gtsam/nonlinear/LevenbergMarquardtOptimizer.h>
13
14
// Workspace
15
#include <
holistic_fusion/core/optimizer/OptimizerBase.h
>
16
17
namespace
holistic_fusion
{
18
19
class
OptimizerLM
:
public
OptimizerBase
{
20
public
:
21
explicit
OptimizerLM
(
const
std::shared_ptr<GraphConfig> graphConfigPtr) :
OptimizerBase
(graphConfigPtr) {
22
// Standard LM Parameters
23
lmParams_
.setVerbosity(
"ERROR"
);
24
gtsam::LevenbergMarquardtParams::SetCeresDefaults(&
lmParams_
);
25
26
// Set Custom LM Parameters
27
// lmParams_.setLinearSolverType(
28
// "CHOLMOD"); // "MULTIFRONTAL_CHOLESKY", "MULTIFRONTAL_QR", "SEQUENTIAL_CHOLESKY", "SEQUENTIAL_QR", "ITERATIVE", "CHOLMOD"
29
lmParams_
.setRelativeErrorTol(1e-6);
30
lmParams_
.setAbsoluteErrorTol(1e-6);
31
// lmParams_.minModelFidelity = 1e-1;
32
}
33
~OptimizerLM
() =
default
;
34
35
// Implementation
36
bool
updateExistingValues
(
const
gtsam::Values& newGraphValues)
override
{
37
// Update Values
38
throw
std::logic_error(
"HolisticFusion: OptimizerLM: updateExistingValues: Not implemented."
);
39
}
40
41
protected
:
42
// Parameters
43
gtsam::LevenbergMarquardtParams
lmParams_
;
44
};
45
46
}
// namespace holistic_fusion
47
48
#endif
// OPTIMIZER_LM_HPP
OptimizerBase.h
holistic_fusion::OptimizerBase::OptimizerBase
OptimizerBase(const std::shared_ptr< GraphConfig > graphConfigPtr)
Definition
OptimizerBase.h:25
holistic_fusion::OptimizerLM::lmParams_
gtsam::LevenbergMarquardtParams lmParams_
Definition
OptimizerLM.hpp:43
holistic_fusion::OptimizerLM::OptimizerLM
OptimizerLM(const std::shared_ptr< GraphConfig > graphConfigPtr)
Definition
OptimizerLM.hpp:21
holistic_fusion::OptimizerLM::updateExistingValues
bool updateExistingValues(const gtsam::Values &newGraphValues) override
Definition
OptimizerLM.hpp:36
holistic_fusion::OptimizerLM::~OptimizerLM
~OptimizerLM()=default
holistic_fusion
Absolute.
Definition
AdmissibleGtsamSymbols.h:11
holistic_fusion
include
holistic_fusion
core
optimizer
OptimizerLM.hpp
Generated by
1.15.0