Apollo  6.0
Open source self driving car software
mlf_track_object_distance.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 <map>
19 #include <string>
20 #include <vector>
21 
24 
25 namespace apollo {
26 namespace perception {
27 namespace lidar {
28 
30 
32  public:
33  MlfTrackObjectDistance() = default;
34  ~MlfTrackObjectDistance() = default;
35 
36  bool Init(const MlfTrackObjectDistanceInitOptions& options =
38 
39  // @brief: compute object track distance
40  // @params [in]: object
41  // @params [in]: track data
42  // @return: distance
43  float ComputeDistance(const TrackedObjectConstPtr& object,
44  const MlfTrackDataConstPtr& track) const;
45 
46  std::string Name() const { return "MlfTrackObjectDistance"; }
47 
48  protected:
49  std::map<std::string, std::vector<float>> foreground_weight_table_;
50  std::map<std::string, std::vector<float>> background_weight_table_;
51 
52  static const std::vector<float> kForegroundDefaultWeight;
53  static const std::vector<float> kBackgroundDefaultWeight;
54 
55  double background_object_match_threshold_ = 4.0;
56 }; // class MlfTrackObjectDistance
57 
58 } // namespace lidar
59 } // namespace perception
60 } // namespace apollo
Definition: mlf_track_object_distance.h:31
static const std::vector< float > kBackgroundDefaultWeight
Definition: mlf_track_object_distance.h:53
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
std::map< std::string, std::vector< float > > foreground_weight_table_
Definition: mlf_track_object_distance.h:49
std::map< std::string, std::vector< float > > background_weight_table_
Definition: mlf_track_object_distance.h:50
std::shared_ptr< const MlfTrackData > MlfTrackDataConstPtr
Definition: mlf_track_data.h:118
Definition: mlf_track_object_distance.h:29
bool Init(const char *binary_name)
std::string Name() const
Definition: mlf_track_object_distance.h:46
std::shared_ptr< const TrackedObject > TrackedObjectConstPtr
Definition: tracked_object.h:157
static const std::vector< float > kForegroundDefaultWeight
Definition: mlf_track_object_distance.h:52