Apollo 11.0
自动驾驶开放平台
pbf_tracker.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 <memory>
19#include <string>
20
21#include "modules/perception/multi_sensor_fusion/proto/pbf_tracker_config.pb.h"
22
23#include "cyber/common/macros.h"
29
30namespace apollo {
31namespace perception {
32namespace fusion {
33
34class PbfTracker : public BaseTracker {
35 public:
36 PbfTracker() = default;
37 virtual ~PbfTracker() = default;
38
46 static bool InitParams(const TrackerInitOptions &options);
47
56 bool Init(TrackPtr track, SensorObjectPtr measurement) override;
57
65 void UpdateWithMeasurement(const TrackerOptions& options,
66 const SensorObjectPtr measurement,
67 double target_timestamp) override;
68
77 void UpdateWithoutMeasurement(const TrackerOptions& options,
78 const std::string& sensor_id,
79 double measurement_timestamp,
80 double target_timestamp) override;
81
82 std::string Name() const override { return "PbfTracker"; }
83
84 protected:
91 bool InitMethods();
92
93 protected:
94 static std::string s_type_fusion_method_;
95 static std::string s_motion_fusion_method_;
96 static std::string s_shape_fusion_method_;
97 static std::string s_existence_fusion_method_;
98
99 std::unique_ptr<BaseTypeFusion> type_fusion_ = nullptr;
100 std::unique_ptr<BaseMotionFusion> motion_fusion_ = nullptr;
101 std::unique_ptr<BaseExistenceFusion> existence_fusion_ = nullptr;
102 std::unique_ptr<BaseShapeFusion> shape_fusion_ = nullptr;
103
105};
106
107} // namespace fusion
108} // namespace perception
109} // namespace apollo
std::unique_ptr< BaseTypeFusion > type_fusion_
Definition pbf_tracker.h:99
void UpdateWithMeasurement(const TrackerOptions &options, const SensorObjectPtr measurement, double target_timestamp) override
Update with measurement
static std::string s_existence_fusion_method_
Definition pbf_tracker.h:97
static std::string s_shape_fusion_method_
Definition pbf_tracker.h:96
std::unique_ptr< BaseExistenceFusion > existence_fusion_
bool Init(TrackPtr track, SensorObjectPtr measurement) override
Init
std::unique_ptr< BaseMotionFusion > motion_fusion_
std::string Name() const override
The name of BaseTracker
Definition pbf_tracker.h:82
static bool InitParams(const TrackerInitOptions &options)
Init params
bool InitMethods()
Init fusion methods
void UpdateWithoutMeasurement(const TrackerOptions &options, const std::string &sensor_id, double measurement_timestamp, double target_timestamp) override
Update without measurement
static std::string s_motion_fusion_method_
Definition pbf_tracker.h:95
std::unique_ptr< BaseShapeFusion > shape_fusion_
std::shared_ptr< SensorObject > SensorObjectPtr
std::shared_ptr< Track > TrackPtr
Definition track.h:397
class register implement
Definition arena_queue.h:37