Apollo 11.0
自动驾驶开放平台
adaptive_kalman_filter.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16#pragma once
17
18#include "Eigen/Core"
19
21
22namespace apollo {
23namespace perception {
24namespace radar {
25
27 public:
28 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
29
30 public:
33
39 void Init(const base::Object& object) override;
40
47 Eigen::VectorXd Predict(const double time_diff) override;
48
56 Eigen::VectorXd UpdateWithObject(const base::Object& new_object,
57 double time_diff) override;
58
65 void GetState(Eigen::Vector3d* anchor_point, Eigen::Vector3d* velocity);
66
72 Eigen::Matrix4d GetCovarianceMatrix() override { return p_matrix_; }
73
79 static void SetQMatrixRatio(double q_matrix_ratio) {
80 s_q_matrix_ratio_ = q_matrix_ratio;
81 }
82
83 private:
84 Eigen::Vector3d belief_anchor_point_;
85 Eigen::Vector3d belief_velocity_;
86 Eigen::Vector4d priori_state_;
87 Eigen::Vector4d posteriori_state_;
88 Eigen::Matrix4d p_matrix_;
89 // the state-transition matrix
90 Eigen::Matrix4d a_matrix_;
91 // the observation mode
92 Eigen::Matrix4d c_matrix_;
93 // the covariance of the process noise
94 Eigen::Matrix4d q_matrix_;
95 // the covariance of the observation noise
96 Eigen::Matrix4d r_matrix_;
97 // Optimal Kalman gain
98 Eigen::Matrix4d k_matrix_;
99 static double s_q_matrix_ratio_;
100};
101
102} // namespace radar
103} // namespace perception
104} // namespace apollo
void GetState(Eigen::Vector3d *anchor_point, Eigen::Vector3d *velocity)
Get the State object
Eigen::VectorXd Predict(const double time_diff) override
Predict the state of the object after time_diff
static void SetQMatrixRatio(double q_matrix_ratio)
Set the QMatrix Ratio
Eigen::Matrix4d GetCovarianceMatrix() override
Get the Covariance Matrix object
Eigen::VectorXd UpdateWithObject(const base::Object &new_object, double time_diff) override
Update the state of the target based on the observations
void Init(const base::Object &object) override
Init base filter config
class register implement
Definition arena_queue.h:37