Skip to content

Commit 46a9087

Browse files
authored
Merge pull request #1531 from Hyun-Research-Lab/kalman_debug
Fixed quaternion estimate in kalmanCoreUpdateWithPose
2 parents 25db4da + c21368d commit 46a9087

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/modules/src/kalman_core/mm_pose.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void kalmanCoreUpdateWithPose(kalmanCoreData_t* this, poseMeasurement_t *pose)
4040
// compute orientation error
4141
struct quat const q_ekf = mkquat(this->q[1], this->q[2], this->q[3], this->q[0]);
4242
struct quat const q_measured = mkquat(pose->quat.x, pose->quat.y, pose->quat.z, pose->quat.w);
43-
struct quat const q_residual = qqmul(qinv(q_ekf), q_measured);
43+
struct quat const q_residual = qqmul(q_measured, qinv(q_ekf));
4444
// small angle approximation, see eq. 141 in http://mars.cs.umn.edu/tr/reports/Trawny05b.pdf
4545
struct vec const err_quat = vscl(2.0f / q_residual.w, quatimagpart(q_residual));
4646

0 commit comments

Comments
 (0)