Apollo 11.0
自动驾驶开放平台
base_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 <string>
19
20#include "Eigen/Core"
21
22#include "cyber/common/macros.h"
24
25namespace apollo {
26namespace perception {
27namespace radar {
28
30 public:
35 BaseFilter() : name_("BaseFilter") {}
36 virtual ~BaseFilter() {}
37
43 virtual void Init(const base::Object& object) = 0;
44
51 virtual Eigen::VectorXd Predict(double time_diff) = 0;
52
60 virtual Eigen::VectorXd UpdateWithObject(const base::Object& new_object,
61 double time_diff) = 0;
62
69 virtual void GetState(Eigen::Vector3d* anchor_point,
70 Eigen::Vector3d* velocity) = 0;
71
77 virtual Eigen::Matrix4d GetCovarianceMatrix() = 0;
78
84 std::string Name() { return name_; }
85
86 protected:
87 std::string name_;
88
89 private:
91};
92
93} // namespace radar
94} // namespace perception
95} // namespace apollo
virtual void Init(const base::Object &object)=0
Init base filter config
virtual Eigen::Matrix4d GetCovarianceMatrix()=0
Get the Covariance Matrix object
virtual void GetState(Eigen::Vector3d *anchor_point, Eigen::Vector3d *velocity)=0
Get the State object
BaseFilter()
Construct a new Base Filter object
Definition base_filter.h:35
virtual Eigen::VectorXd UpdateWithObject(const base::Object &new_object, double time_diff)=0
Update the state of the target based on the observations
std::string Name()
The name of the radar base Filter
Definition base_filter.h:84
virtual Eigen::VectorXd Predict(double time_diff)=0
Predict the state of the object after time_diff
#define DISALLOW_COPY_AND_ASSIGN(classname)
Definition macros.h:48
class register implement
Definition arena_queue.h:37