Skip to content
Snippets Groups Projects
Commit 5ff49198 authored by Corvin-N's avatar Corvin-N
Browse files

Fix usage of static dimension

parent bc5ba2b7
Branches feature/human-tracking-ukfm
No related tags found
1 merge request!279Fix ukfm static dimension
...@@ -186,8 +186,8 @@ UnscentedKalmanFilter<SystemModelT>::calculateClosestPosSemidefMatrix( ...@@ -186,8 +186,8 @@ UnscentedKalmanFilter<SystemModelT>::calculateClosestPosSemidefMatrix(
{ {
const StateCovT new_P = ((cov + cov.transpose()) / 2.0f); const StateCovT new_P = ((cov + cov.transpose()) / 2.0f);
Eigen::EigenSolver<StateCovT> solver(new_P); Eigen::EigenSolver<StateCovT> solver(new_P);
Eigen::Matrix<FloatT, 6, 6> D = solver.eigenvalues().real().asDiagonal(); Eigen::Matrix<FloatT, dim::state, dim::state> D = solver.eigenvalues().real().asDiagonal();
const Eigen::Matrix<FloatT, 6, 6> V = solver.eigenvectors().real(); const Eigen::Matrix<FloatT, dim::state, dim::state> V = solver.eigenvectors().real();
D = D.cwiseMax(0); D = D.cwiseMax(0);
return (V * D * V.inverse()); return (V * D * V.inverse());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment