Apollo  6.0
Open source self driving car software
pbf_shape_fusion.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 
23 
24 namespace apollo {
25 namespace perception {
26 namespace fusion {
27 
29  public:
30  explicit PbfShapeFusion(TrackPtr track) : BaseShapeFusion(track) {}
31  virtual ~PbfShapeFusion() {}
32  PbfShapeFusion(const PbfShapeFusion&) = delete;
33  PbfShapeFusion& operator=(const PbfShapeFusion&) = delete;
34 
35  bool Init() override;
36 
37  void UpdateWithMeasurement(const SensorObjectPtr measurement,
38  double target_timestamp) override;
39 
40  void UpdateWithoutMeasurement(const std::string& sensor_id,
41  double measurement_timestamp,
42  double target_timestamp) override;
43 
44  std::string Name() const override;
45 
46  inline TrackPtr GetTrack() { return track_ref_; }
47 
48  private:
49  // Update state
50  void UpdateState(const SensorObjectConstPtr& measurement);
51  void UpdateShape(const SensorObjectConstPtr& measurement);
52  void UpdateCenter(const SensorObjectConstPtr& measurement);
53 
54  static bool s_use_camera_3d_;
55  static float s_camera_radar_time_diff_th_;
56 };
57 
58 } // namespace fusion
59 } // namespace perception
60 } // namespace apollo
Definition: pbf_shape_fusion.h:28
Definition: base_shape_fusion.h:29
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
std::string Name() const override
TrackPtr GetTrack()
Definition: pbf_shape_fusion.h:46
PbfShapeFusion & operator=(const PbfShapeFusion &)=delete
std::shared_ptr< SensorObject > SensorObjectPtr
Definition: sensor_object.h:68
virtual ~PbfShapeFusion()
Definition: pbf_shape_fusion.h:31
PbfShapeFusion(TrackPtr track)
Definition: pbf_shape_fusion.h:30
void UpdateWithoutMeasurement(const std::string &sensor_id, double measurement_timestamp, double target_timestamp) override
void UpdateWithMeasurement(const SensorObjectPtr measurement, double target_timestamp) override
std::shared_ptr< Track > TrackPtr
Definition: track.h:160
TrackPtr track_ref_
Definition: base_shape_fusion.h:51
std::shared_ptr< const SensorObject > SensorObjectConstPtr
Definition: sensor_object.h:69