Skip to content

ekf_sym: initialize rts_smooth from final posterior without mutating estimates - #67

Open
chenyangsu wants to merge 1 commit into
commaai:masterfrom
chenyangsu:fix/rts-smooth-init-posterior
Open

chenyangsu wants to merge 1 commit into
commaai:masterfrom
chenyangsu:fix/rts-smooth-init-posterior

Conversation

@chenyangsu

Copy link
Copy Markdown

EKF_sym.rts_smooth() starts the backward pass from estimates[-1][0] and estimates[-1][2] (the predicted prior xk_km1, Pk_km1), leaving the final measurement out of the smoothed trajectory. On a 3-step CompareFilter run with observations [1.0, 2.0, 5.0], the last smoothed position returns 2.0 while the posterior is 4.1429, and estimates gets mutated in place.

Could we initialize from copies of estimates[-1][1] and estimates[-1][3] (xk_k, Pk_k) and copy xk_k and Pk_k inside the loop? Happy to drop the copies if in-place updates are expected.

Testing: ./test.sh -> 4 passed, ruff and ty clean (new test fails on master).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant