From cf0e6520973c8d9ebf91443ff6e40f400db21bf6 Mon Sep 17 00:00:00 2001 From: kechxu Date: Mon, 17 Jul 2017 10:26:56 -0700 Subject: [PATCH] add some getters to kalmanFilter.h for future use. --- modules/common/math/kalman_filter.h | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/modules/common/math/kalman_filter.h b/modules/common/math/kalman_filter.h index ac96acdae3..78ac3437df 100644 --- a/modules/common/math/kalman_filter.h +++ b/modules/common/math/kalman_filter.h @@ -134,6 +134,48 @@ class KalmanFilter { */ void SetControlMatrix(const Eigen::Matrix& B) { B_ = B; } + /** + * @brief Get the system transition function under zero control. + * + * @return Transition matrix. + */ + const Eigen::Matrix& GetTransitionMatrix() { return F_; } + + /** + * @brief Get the covariance matrix of the transition noise. + * + * @return Covariance matrix + */ + const Eigen::Matrix& GetTransitionNoise() { return Q_; } + + /** + * @brief Get the observation matrix, which maps states to observations. + * + * @return Observation matrix + */ + const Eigen::Matrix& GetObservationMatrix() { return H_; } + + /** + * @brief Get the covariance matrix of the observation noise. + * + * @return Covariance matrix + */ + const Eigen::Matrix& GetObservationNoise() { return R_; } + + /** + * @brief Get the covariance matrix of current state belief distribution. + * + * @return State covariance matrix + */ + const Eigen::Matrix& GetStateCovariance() { return P_; } + + /** + * @brief Get the control matrix in the state transition rule. + * + * @return Control matrix + */ + const Eigen::Matrix& GetControlMatrix() { return B_; } + /** * @brief Updates the state belief distribution given the control input u. * -- GitLab