From d8866f14974c223edb3caac585bf7055d8ffd9c4 Mon Sep 17 00:00:00 2001 From: Thomas Jespersen Date: Mon, 24 Feb 2020 10:41:04 +0800 Subject: [PATCH] Corrected Bias key index in IMUKittiExampleGPS.m Bias key index in ImuFactor refers to the bias at the previous timestep, `bias_i`, according to https://github.com/borglab/gtsam/blob/develop/gtsam/navigation/ImuFactor.h#L239-L244 and the C++ example https://github.com/borglab/gtsam/blob/develop/examples/ImuFactorsExample.cpp#L228 --- matlab/gtsam_examples/IMUKittiExampleGPS.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/gtsam_examples/IMUKittiExampleGPS.m b/matlab/gtsam_examples/IMUKittiExampleGPS.m index c80b6ec3e..530c3382c 100755 --- a/matlab/gtsam_examples/IMUKittiExampleGPS.m +++ b/matlab/gtsam_examples/IMUKittiExampleGPS.m @@ -99,7 +99,7 @@ for measurementIndex = firstGPSPose:length(GPS_data) newFactors.add(ImuFactor( ... currentPoseKey-1, currentVelKey-1, ... currentPoseKey, currentVelKey, ... - currentBiasKey, currentSummarizedMeasurement)); + currentBiasKey-1, currentSummarizedMeasurement)); % Bias evolution as given in the IMU metadata newFactors.add(BetweenFactorConstantBias(currentBiasKey-1, currentBiasKey, imuBias.ConstantBias(zeros(3,1), zeros(3,1)), ...