8 #include <boost/property_tree/info_parser.hpp> 21 template <
size_t OUTPUT_DIM,
size_t STATE_DIM,
typename SCALAR =
double>
36 std::cout <<
"State Observer Settings: " << std::endl;
37 std::cout <<
"=====================" << std::endl;
38 std::cout <<
"C:\n" << C << std::endl;
39 std::cout <<
"Q:\n" << Q << std::endl;
40 std::cout <<
"R:\n" << R << std::endl;
41 std::cout <<
"dFdv:\n" << dFdv << std::endl;
42 std::cout <<
" =======" << std::endl;
43 std::cout << std::endl;
47 void load(
const std::string& filename,
bool verbose,
const std::string& ns)
50 std::cout <<
"Trying to load state observer settings from " << filename <<
": " << std::endl;
52 boost::property_tree::ptree pt;
53 boost::property_tree::read_info(filename, pt);
62 std::cout <<
"Loaded state observer settings from " << filename <<
": " << std::endl;
76 template <
size_t OUTPUT_DIM,
size_t STATE_DIM,
typename SCALAR =
double>
87 template <
size_t STATE_DIM,
typename SCALAR =
double>
98 std::cout <<
"State Observer Settings: " << std::endl;
99 std::cout <<
"=====================" << std::endl;
100 std::cout <<
"x0:\n" << x0 << std::endl;
101 std::cout <<
"maxDAREIterations:\t" << maxDAREIterations << std::endl;
102 std::cout <<
" =======" << std::endl;
103 std::cout << std::endl;
107 void load(
const std::string& filename,
bool verbose,
const std::string& ns)
110 std::cout <<
"Trying to load steady state KF settings from " << filename <<
": " << std::endl;
112 boost::property_tree::ptree pt;
113 boost::property_tree::read_info(filename, pt);
115 maxDAREIterations = pt.get<
size_t>(ns +
".maxDAREIterations", 1000);
120 std::cout <<
"Loaded steady state KF settings from " << filename <<
": " << std::endl;
134 template <
size_t STATE_DIM,
typename SCALAR =
double>
145 std::cout <<
"State Observer Settings: " << std::endl;
146 std::cout <<
"=====================" << std::endl;
147 std::cout <<
"x0:\n" << x0 << std::endl;
148 std::cout <<
"P0:\n" << P0 << std::endl;
149 std::cout <<
" =======" << std::endl;
150 std::cout << std::endl;
154 void load(
const std::string& filename,
bool verbose,
const std::string& ns)
157 std::cout <<
"Trying to load steady state KF settings from " << filename <<
": " << std::endl;
159 boost::property_tree::ptree pt;
160 boost::property_tree::read_info(filename, pt);
167 std::cout <<
"Loaded ExtendedKF settings from " << filename <<
": " << std::endl;
181 template <
size_t STATE_DIM,
typename SCALAR =
double>
195 std::cout <<
"State Observer Settings: " << std::endl;
196 std::cout <<
"=====================" << std::endl;
197 std::cout <<
"x0:\n" << x0 << std::endl;
198 std::cout <<
"alpha:\n" << alpha << std::endl;
199 std::cout <<
"beta:\n" << beta << std::endl;
200 std::cout <<
"kappa:\n" << kappa << std::endl;
201 std::cout <<
"P0:\n" << P0 << std::endl;
202 std::cout <<
" =======" << std::endl;
203 std::cout << std::endl;
207 void load(
const std::string& filename,
bool verbose,
const std::string& ns)
210 std::cout <<
"Trying to load steady state KF settings from " << filename <<
": " << std::endl;
212 boost::property_tree::ptree pt;
213 boost::property_tree::read_info(filename, pt);
216 alpha = pt.get<
bool>(ns +
".alpha");
217 beta = pt.get<
bool>(ns +
".beta");
218 kappa = pt.get<
bool>(ns +
".kappa");
223 std::cout <<
"Loaded UnscentedKF settings from " << filename <<
": " << std::endl;
void load(const std::string &filename, bool verbose, const std::string &ns)
load settings from file
Definition: FilterSettings.h:207
void loadMatrix(const std::string &filename, const std::string &matrixName, Eigen::Matrix< SCALAR, ROW, COL > &matrix, const std::string &ns="")
ct::core::ControlVector< control_dim > u
Definition: LoadFromFileTest.cpp:21
StateObserverSettings()
default constructor for the state Observer settings
Definition: FilterSettings.h:25
void print() const
print the current settings
Definition: FilterSettings.h:193
ct::core::StateMatrix< STATE_DIM, SCALAR > P0
Definition: FilterSettings.h:138
SCALAR kappa
Definition: FilterSettings.h:187
ct::core::StateMatrix< STATE_DIM, SCALAR > dFdv
Definition: FilterSettings.h:31
void load(const std::string &filename, bool verbose, const std::string &ns)
load settings from file
Definition: FilterSettings.h:154
ct::core::StateVector< STATE_DIM > x0
Definition: FilterSettings.h:184
bool parametersOk() const
check if the currently set parameters are meaningful
Definition: FilterSettings.h:27
CppAD::AD< CppAD::cg::CG< double > > SCALAR
SCALAR beta
Definition: FilterSettings.h:186
size_t maxDAREIterations
Definition: FilterSettings.h:91
void load(const std::string &filename, bool verbose, const std::string &ns)
load settings from file
Definition: FilterSettings.h:107
ct::core::StateMatrix< STATE_DIM, SCALAR > Q
Definition: FilterSettings.h:29
ct::core::OutputMatrix< OUTPUT_DIM, SCALAR > R
Definition: FilterSettings.h:30
void print() const
print the current settings
Definition: FilterSettings.h:34
void load(const std::string &filename, bool verbose, const std::string &ns)
load settings from file
Definition: FilterSettings.h:47
Settings for setting up an ExtendedKF.
Definition: ExtendedKalmanFilter.h:14
Settings for setting up a StateObserver.
Definition: FilterSettings.h:22
Settings for setting up an UnscentedKF.
Definition: FilterSettings.h:182
const bool verbose
Definition: ConstraintComparison.h:18
void print() const
print the current settings
Definition: FilterSettings.h:143
ct::core::StateVector< STATE_DIM > x0
Definition: FilterSettings.h:137
Settings for setting up a SteadyStateKF.
Definition: FilterSettings.h:88
ct::core::StateVector< STATE_DIM > x0
Definition: FilterSettings.h:90
ct::core::OutputStateMatrix< OUTPUT_DIM, STATE_DIM, SCALAR > C
Definition: FilterSettings.h:28
ct::core::StateMatrix< STATE_DIM, SCALAR > P0
Definition: FilterSettings.h:188
SCALAR alpha
Definition: FilterSettings.h:185
void print() const
print the current settings
Definition: FilterSettings.h:96