Apollo  6.0
Open source self driving car software
pbf_tracker.h
Go to the documentation of this file.
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 
27 #include "modules/perception/proto/pbf_tracker_config.pb.h"
28 
29 namespace apollo {
30 namespace perception {
31 namespace fusion {
32 
33 class PbfTracker : public BaseTracker {
34  public:
35  PbfTracker();
36  virtual ~PbfTracker();
37 
38  PbfTracker(const PbfTracker&) = delete;
39  PbfTracker& operator=(const PbfTracker&) = delete;
40 
41  static bool InitParams();
42 
43  bool Init(TrackPtr track, SensorObjectPtr measurement) override;
44 
45  void UpdateWithMeasurement(const TrackerOptions& options,
46  const SensorObjectPtr measurement,
47  double target_timestamp) override;
48 
49  void UpdateWithoutMeasurement(const TrackerOptions& options,
50  const std::string& sensor_id,
51  double measurement_timestamp,
52  double target_timestamp) override;
53 
54  std::string Name() const override;
55 
56  protected:
57  bool InitMethods();
58 
59  protected:
60  static std::string s_type_fusion_method_;
61  static std::string s_motion_fusion_method_;
62  static std::string s_shape_fusion_method_;
63  static std::string s_existence_fusion_method_;
64 
65  std::unique_ptr<BaseTypeFusion> type_fusion_ = nullptr;
66  std::unique_ptr<BaseMotionFusion> motion_fusion_ = nullptr;
67  std::unique_ptr<BaseExistenceFusion> existence_fusion_ = nullptr;
68  std::unique_ptr<BaseShapeFusion> shape_fusion_ = nullptr;
69 };
70 
71 } // namespace fusion
72 } // namespace perception
73 } // namespace apollo
std::unique_ptr< BaseExistenceFusion > existence_fusion_
Definition: pbf_tracker.h:67
static std::string s_motion_fusion_method_
Definition: pbf_tracker.h:61
bool Init(TrackPtr track, SensorObjectPtr measurement) override
std::unique_ptr< BaseShapeFusion > shape_fusion_
Definition: pbf_tracker.h:68
std::unique_ptr< BaseTypeFusion > type_fusion_
Definition: pbf_tracker.h:65
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
PbfTracker & operator=(const PbfTracker &)=delete
void UpdateWithMeasurement(const TrackerOptions &options, const SensorObjectPtr measurement, double target_timestamp) override
Definition: pbf_tracker.h:33
std::shared_ptr< SensorObject > SensorObjectPtr
Definition: sensor_object.h:68
Definition: base_tracker.h:32
static std::string s_shape_fusion_method_
Definition: pbf_tracker.h:62
std::shared_ptr< Track > TrackPtr
Definition: track.h:160
std::unique_ptr< BaseMotionFusion > motion_fusion_
Definition: pbf_tracker.h:66
static std::string s_type_fusion_method_
Definition: pbf_tracker.h:60
Definition: base_tracker.h:28
std::string Name() const override
static std::string s_existence_fusion_method_
Definition: pbf_tracker.h:63
void UpdateWithoutMeasurement(const TrackerOptions &options, const std::string &sensor_id, double measurement_timestamp, double target_timestamp) override