Apollo  6.0
Open source self driving car software
base_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 <string>
19 
24 
25 namespace apollo {
26 namespace perception {
27 namespace fusion {
29  double match_distance = 0.0;
30 };
31 
32 class BaseTracker {
33  public:
35  virtual ~BaseTracker() {}
36  BaseTracker(const BaseTracker&) = delete;
37  BaseTracker& operator=(const BaseTracker&) = delete;
38 
39  virtual bool Init(TrackPtr track, SensorObjectPtr measurement) = 0;
40 
41  // @brief: update track state with measurement
42  // @param [in]: measurement
43  // @param [in]: target_timestamp
44  // @param [in/out]: track
45  virtual void UpdateWithMeasurement(const TrackerOptions& options,
46  const SensorObjectPtr measurement,
47  double target_timestamp) = 0;
48 
49  virtual void UpdateWithoutMeasurement(const TrackerOptions& options,
50  const std::string& sensor_id,
51  double measurement_timestamp,
52  double target_timestamp) = 0;
53 
54  virtual std::string Name() const = 0;
55 
56  protected:
57  TrackPtr track_ = nullptr;
58 };
59 
60 } // namespace fusion
61 } // namespace perception
62 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
double match_distance
Definition: base_tracker.h:29
std::shared_ptr< SensorObject > SensorObjectPtr
Definition: sensor_object.h:68
virtual ~BaseTracker()
Definition: base_tracker.h:35
Definition: base_tracker.h:32
std::shared_ptr< Track > TrackPtr
Definition: track.h:160
bool Init(const char *binary_name)
Definition: base_tracker.h:28
BaseTracker()
Definition: base_tracker.h:34