Skip to content
Snippets Groups Projects
Commit e55c847d authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

bootstrap length in seconds

parent 9e45f283
No related branches found
No related tags found
2 merge requests!54devel->main,!50Resolve "Bootstrap sequence"
...@@ -13,4 +13,4 @@ keyframe_vote: ...@@ -13,4 +13,4 @@ keyframe_vote:
bootstrap: bootstrap:
enable: true enable: true
method: "G" method: "G"
averaging_length: 10 averaging_length: 0.25 # seconds
\ No newline at end of file \ No newline at end of file
...@@ -39,7 +39,7 @@ struct ParamsProcessorImu : public ParamsProcessorMotion ...@@ -39,7 +39,7 @@ struct ParamsProcessorImu : public ParamsProcessorMotion
BOOTSTRAP_G, BOOTSTRAP_G,
BOOTSTRAP_V0_G BOOTSTRAP_V0_G
} bootstrap_method; } bootstrap_method;
int bootstrap_averaging_length; double bootstrap_averaging_length;
ParamsProcessorImu() = default; ParamsProcessorImu() = default;
ParamsProcessorImu(std::string _unique_name, const ParamsServer& _server): ParamsProcessorImu(std::string _unique_name, const ParamsServer& _server):
...@@ -54,13 +54,13 @@ struct ParamsProcessorImu : public ParamsProcessorMotion ...@@ -54,13 +54,13 @@ struct ParamsProcessorImu : public ParamsProcessorMotion
{ {
bootstrap_method = BOOTSTRAP_STATIC; bootstrap_method = BOOTSTRAP_STATIC;
bootstrap_averaging_length = bootstrap_averaging_length =
_server.getParam<int>(prefix + _unique_name + "/bootstrap/averaging_length"); _server.getParam<double>(prefix + _unique_name + "/bootstrap/averaging_length");
} }
if (str == "G" /* */) if (str == "G" /* */)
{ {
bootstrap_method = BOOTSTRAP_G; bootstrap_method = BOOTSTRAP_G;
bootstrap_averaging_length = bootstrap_averaging_length =
_server.getParam<int>(prefix + _unique_name + "/bootstrap/averaging_length"); _server.getParam<double>(prefix + _unique_name + "/bootstrap/averaging_length");
} }
if (str == "V0_G" /* */) if (str == "V0_G" /* */)
{ {
......
...@@ -74,7 +74,7 @@ static ParamsProcessorBasePtr createProcessorImuParams(const std::string & _file ...@@ -74,7 +74,7 @@ static ParamsProcessorBasePtr createProcessorImuParams(const std::string & _file
if (str == "G" /* */) if (str == "G" /* */)
{ {
params->bootstrap_method = ParamsProcessorImu::BootstrapMethod::BOOTSTRAP_G; params->bootstrap_method = ParamsProcessorImu::BootstrapMethod::BOOTSTRAP_G;
params->bootstrap_averaging_length = bootstrap["averaging_length"].as<int>(); params->bootstrap_averaging_length = bootstrap["averaging_length"].as<double>();
} }
if (str == "V0_G" /* */) if (str == "V0_G" /* */)
{ {
......
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