diff --git a/demos/processor_imu.yaml b/demos/processor_imu.yaml index 405d69fca8af9b36462b8f9ec35ebb2a5b09c10a..b86d47713885d8dd68e37daac453be25ec8af19a 100644 --- a/demos/processor_imu.yaml +++ b/demos/processor_imu.yaml @@ -1,11 +1,12 @@ type: "IMU" # This must match the KEY used in the SensorFactory. Otherwise it is an error. -unmeasured perturbation std: 0.00001 -time tolerance: 0.0025 # Time tolerance for joining KFs -keyframe vote: - max time span: 2.0 # seconds - max buffer length: 20000 # motion deltas - dist traveled: 2.0 # meters - angle turned: 0.2 # radians (1 rad approx 57 deg, approx 60 deg) +time_tolerance: 0.0025 # Time tolerance for joining KFs +unmeasured_perturbation_std: 0.00001 + +keyframe_vote: voting_active: false - \ No newline at end of file + voting_aux_active: false + max_time_span: 2.0 # seconds + max_buff_length: 20000 # motion deltas + dist_traveled: 2.0 # meters + angle_turned: 0.2 # radians (1 rad approx 57 deg, approx 60 deg) diff --git a/demos/processor_imu_no_vote.yaml b/demos/processor_imu_no_vote.yaml deleted file mode 100644 index e01ed1cc4e6322ea606c5c98ddd2440cf7f5178d..0000000000000000000000000000000000000000 --- a/demos/processor_imu_no_vote.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: "IMU" # This must match the KEY used in the SensorFactory. Otherwise it is an error. - -time tolerance: 0.0025 # Time tolerance for joining KFs -unmeasured perturbation std: 0.00001 -keyframe vote: - max time span: 999999.0 # seconds - max buffer length: 999999 # motion deltas - dist traveled: 999999.0 # meters - angle turned: 999999 # radians (1 rad approx 57 deg, approx 60 deg) - voting_active: false - \ No newline at end of file diff --git a/src/yaml/processor_IMU_yaml.cpp b/src/yaml/processor_IMU_yaml.cpp index b6f3137eafff8d0d1cacbc3ac361cc9d1ad8a27d..a0ed780179c2e4d6bfc1f194be857dcbc9bc3b3e 100644 --- a/src/yaml/processor_IMU_yaml.cpp +++ b/src/yaml/processor_IMU_yaml.cpp @@ -26,18 +26,18 @@ static ProcessorParamsBasePtr createProcessorIMUParams(const std::string & _file if (config["type"].as<std::string>() == "IMU") { - YAML::Node kf_vote = config["keyframe vote"]; + YAML::Node kf_vote = config["keyframe_vote"]; ProcessorParamsIMUPtr params = std::make_shared<ProcessorParamsIMU>(); - params->time_tolerance = config["time tolerance"] .as<Scalar>(); - params->unmeasured_perturbation_std = config["unmeasured perturbation std"].as<Scalar>(); - - params->unmeasured_perturbation_std = config["unmeasured perturbation std"].as<Scalar>(); - params->max_time_span = kf_vote["max time span"] .as<Scalar>(); - params->max_buff_length = kf_vote["max buffer length"] .as<SizeEigen >(); - params->dist_traveled = kf_vote["dist traveled"] .as<Scalar>(); - params->angle_turned = kf_vote["angle turned"] .as<Scalar>(); + params->time_tolerance = config["time_tolerance"] .as<Scalar>(); + params->unmeasured_perturbation_std = config["unmeasured_perturbation_std"].as<Scalar>(); + + params->max_time_span = kf_vote["max_time_span"] .as<Scalar>(); + params->max_buff_length = kf_vote["max_buff_length"] .as<SizeEigen>(); + params->dist_traveled = kf_vote["dist_traveled"] .as<Scalar>(); + params->angle_turned = kf_vote["angle_turned"] .as<Scalar>(); params->voting_active = kf_vote["voting_active"] .as<bool>(); + params->voting_aux_active = kf_vote["voting_aux_active"] .as<bool>(); return params; } diff --git a/test/gtest_IMU.cpp b/test/gtest_IMU.cpp index 448437cab67a9b6300b186e38f3b94e2f02ab415..e82663afc529259fe35b480dd67e852a7786f1de 100644 --- a/test/gtest_IMU.cpp +++ b/test/gtest_IMU.cpp @@ -98,7 +98,7 @@ class Process_Factor_IMU : public testing::Test // SENSOR + PROCESSOR IMU SensorBasePtr sensor = problem->installSensor ("IMU", "Main IMU", (Vector7s()<<0,0,0,0,0,0,1).finished(), wolf_root + "/demos/sensor_imu.yaml"); - ProcessorBasePtr processor = problem->installProcessor("IMU", "IMU pre-integrator", "Main IMU", wolf_root + "/demos/processor_imu_no_vote.yaml"); + ProcessorBasePtr processor = problem->installProcessor("IMU", "IMU pre-integrator", "Main IMU", wolf_root + "/demos/processor_imu.yaml"); sensor_imu = static_pointer_cast<SensorIMU> (sensor); processor_imu = static_pointer_cast<ProcessorIMU>(processor);