Apollo 11.0
自动驾驶开放平台
v2x_fusion_component.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2020 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
21#include <cmath>
22#include <condition_variable>
23#include <limits>
24#include <memory>
25#include <string>
26#include <thread>
27#include <vector>
28
35
36namespace apollo {
37namespace v2x {
38namespace ft {
39
41 : public apollo::cyber::Component<PerceptionObstacles> {
42 public:
44
45 std::string Name() const;
46
47 bool Init() override;
48
49 bool Proc(const std::shared_ptr<PerceptionObstacles>& perception_obstacles)
50 override;
51
52 private:
53 bool V2XMessageFusionProcess(
54 const std::shared_ptr<PerceptionObstacles>& perception_obstacles);
55 void SerializeMsg(const std::vector<base::Object>& objects,
56 std::shared_ptr<PerceptionObstacles> obstacles);
57 Fusion fusion_;
58
59 std::shared_ptr<apollo::cyber::Reader<LocalizationEstimate>>
60 localization_reader_;
61 std::shared_ptr<apollo::cyber::Reader<V2XObstacles>> v2x_obstacles_reader_;
62 std::shared_ptr<apollo::cyber::Writer<PerceptionObstacles>>
63 perception_fusion_obstacles_writer_;
65};
66
68
69} // namespace ft
70} // namespace v2x
71} // namespace apollo
bool Proc(const std::shared_ptr< PerceptionObstacles > &perception_obstacles) override
#define CYBER_REGISTER_COMPONENT(name)
Definition component.h:657
class register implement
Definition arena_queue.h:37