diff --git a/demos/processor_imu.yaml b/demos/processor_imu.yaml index 0e9c8d10e6ee5238e4cbcbe974f061ff426cb329..d8400410e703ad62a606c04c6f2da04eea2bb54a 100644 --- a/demos/processor_imu.yaml +++ b/demos/processor_imu.yaml @@ -13,4 +13,4 @@ keyframe_vote: bootstrap: enable: true method: "G" - averaging_length: 10 \ No newline at end of file + averaging_length: 0.25 # seconds \ No newline at end of file diff --git a/include/imu/processor/processor_imu.h b/include/imu/processor/processor_imu.h index 55d5a24d44c76e95b31a233d10fc2617094cce2f..e7b6b9549e9481269262ad7dd3122cc6a0e6a187 100644 --- a/include/imu/processor/processor_imu.h +++ b/include/imu/processor/processor_imu.h @@ -39,7 +39,7 @@ struct ParamsProcessorImu : public ParamsProcessorMotion BOOTSTRAP_G, BOOTSTRAP_V0_G } bootstrap_method; - int bootstrap_averaging_length; + double bootstrap_averaging_length; ParamsProcessorImu() = default; ParamsProcessorImu(std::string _unique_name, const ParamsServer& _server): @@ -54,13 +54,13 @@ struct ParamsProcessorImu : public ParamsProcessorMotion { bootstrap_method = BOOTSTRAP_STATIC; bootstrap_averaging_length = - _server.getParam<int>(prefix + _unique_name + "/bootstrap/averaging_length"); + _server.getParam<double>(prefix + _unique_name + "/bootstrap/averaging_length"); } if (str == "G" /* */) { bootstrap_method = BOOTSTRAP_G; 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" /* */) { diff --git a/src/yaml/processor_imu_yaml.cpp b/src/yaml/processor_imu_yaml.cpp index ff2b02eafd23efb19d332aac1b5c60d97580d6b5..53bc6918d5eb753f4c801dad35058dd7c0d6174a 100644 --- a/src/yaml/processor_imu_yaml.cpp +++ b/src/yaml/processor_imu_yaml.cpp @@ -74,7 +74,7 @@ static ParamsProcessorBasePtr createProcessorImuParams(const std::string & _file if (str == "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" /* */) {