Apollo  6.0
Open source self driving car software
pbf_gatekeeper.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 
21 
22 namespace apollo {
23 namespace perception {
24 namespace fusion {
25 
27  bool publish_if_has_lidar = true;
28  bool publish_if_has_radar = true;
29  bool publish_if_has_camera = true;
30  bool use_camera_3d = true;
31 
36  double toic_threshold = 0.8;
37  double existence_threshold = 0.7;
39 
42 };
43 
44 class PbfGatekeeper : public BaseGatekeeper {
45  public:
46  PbfGatekeeper();
47  ~PbfGatekeeper();
48 
49  PbfGatekeeper(const PbfGatekeeper&) = delete;
50  PbfGatekeeper& operator=(const PbfGatekeeper&) = delete;
51 
52  bool Init() override;
53 
54  bool AbleToPublish(const TrackPtr& track) override;
55 
56  std::string Name() const override;
57 
58  private:
59  bool LidarAbleToPublish(const TrackPtr& track);
60  bool RadarAbleToPublish(const TrackPtr& track, bool is_night);
61  bool CameraAbleToPublish(const TrackPtr& track, bool is_night);
62 
63  PbfGatekeeperParams params_;
64 };
65 
66 } // namespace fusion
67 } // namespace perception
68 } // namespace apollo
bool publish_if_has_lidar
Definition: pbf_gatekeeper.h:27
double invisible_period_threshold
Definition: pbf_gatekeeper.h:35
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: base_gatekeeper.h:29
bool use_camera_3d
Definition: pbf_gatekeeper.h:30
double radar_existence_threshold
Definition: pbf_gatekeeper.h:38
Definition: pbf_gatekeeper.h:44
std::shared_ptr< Track > TrackPtr
Definition: track.h:160
double existence_threshold
Definition: pbf_gatekeeper.h:37
double min_radar_confident_distance
Definition: pbf_gatekeeper.h:32
bool Init(const char *binary_name)
bool use_track_time_pub_strategy
Definition: pbf_gatekeeper.h:40
int pub_track_time_thresh
Definition: pbf_gatekeeper.h:41
bool publish_if_has_camera
Definition: pbf_gatekeeper.h:29
bool publish_if_has_radar
Definition: pbf_gatekeeper.h:28
double toic_threshold
Definition: pbf_gatekeeper.h:36
double max_radar_confident_angle
Definition: pbf_gatekeeper.h:33
double min_camera_publish_distance
Definition: pbf_gatekeeper.h:34