Apollo  v5.5.0
Open source self driving car software
mlf_shape_filter.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 
22 
23 namespace apollo {
24 namespace perception {
25 namespace lidar {
26 
27 class MlfShapeFilter : public MlfBaseFilter {
28  public:
29  MlfShapeFilter() = default;
30  virtual ~MlfShapeFilter() = default;
31 
32  bool Init(
33  const MlfFilterInitOptions& options = MlfFilterInitOptions()) override;
34 
35  // @brief: updating shape filter with object
36  // @params [in]: options for updating
37  // @params [in]: track data, not include new object
38  // @params [in/out]: new object for updating
39  void UpdateWithObject(const MlfFilterOptions& options,
40  const MlfTrackDataConstPtr& track_data,
41  TrackedObjectPtr new_object) override;
42 
43  // @brief: updating shape filter without object
44  // @params [in]: options for updating
45  // @params [in]: current timestamp
46  // @params [in/out]: track data to be updated
47  void UpdateWithoutObject(const MlfFilterOptions& options, double timestamp,
48  MlfTrackDataPtr track_data) override;
49 
50  std::string Name() const override { return "MlfShapeFilter"; }
51 
52  protected:
56 }; // class MlfShapeFilter
57 
58 } // namespace lidar
59 } // namespace perception
60 } // namespace apollo
Definition: mlf_base_filter.h:31
Definition: mlf_base_filter.h:29
Definition: blob.h:72
bool Init(const MlfFilterInitOptions &options=MlfFilterInitOptions()) override
void UpdateWithoutObject(const MlfFilterOptions &options, double timestamp, MlfTrackDataPtr track_data) override
Definition: mlf_base_filter.h:33
Definition: convex_hull_2d.h:29
std::shared_ptr< const MlfTrackData > MlfTrackDataConstPtr
Definition: mlf_track_data.h:111
std::shared_ptr< MlfTrackData > MlfTrackDataPtr
Definition: mlf_track_data.h:110
common::ConvexHull2D< base::PointDCloud, base::PolygonDType > hull_
Definition: mlf_shape_filter.h:53
std::string Name() const override
Definition: mlf_shape_filter.h:50
Definition: mlf_shape_filter.h:27
void UpdateWithObject(const MlfFilterOptions &options, const MlfTrackDataConstPtr &track_data, TrackedObjectPtr new_object) override
std::shared_ptr< TrackedObject > TrackedObjectPtr
Definition: tracked_object.h:152
double top_points_ignore_threshold_
Definition: mlf_shape_filter.h:55
double bottom_points_ignore_threshold_
Definition: mlf_shape_filter.h:54