Apollo 11.0
自动驾驶开放平台
conti_radar_canbus_component.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2017 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#pragma once
22
23#include <memory>
24#include <string>
25#include <utility>
26#include <vector>
27
28#include "cyber/cyber.h"
29
35#include "modules/common_msgs/drivers_msgs/can_card_parameter.pb.h"
36#include "modules/common_msgs/sensor_msgs/conti_radar.pb.h"
41#include "modules/common_msgs/localization_msgs/localization.pb.h"
42
47namespace apollo {
48namespace drivers {
49namespace conti_radar {
50
58 public:
61 bool Init() override;
62
63 private:
64 bool OnError(const std::string& error_msg);
65 void RegisterCanClients();
66 apollo::common::ErrorCode ConfigureRadar();
67 bool Start();
68 void Stop();
69
70 ContiRadarConf conti_radar_conf_;
71 std::shared_ptr<apollo::drivers::canbus::CanClient> can_client_;
73 std::unique_ptr<ContiRadarMessageManager> sensor_message_manager_;
74 std::shared_ptr<apollo::cyber::Writer<ContiRadar>> conti_radar_writer_;
75 std::shared_ptr<
77 pose_reader_;
78 void PoseCallback(
79 const std::shared_ptr<apollo::localization::LocalizationEstimate>& pose);
80 uint64_t last_nsec_ = 0;
81
82 int64_t last_timestamp_ = 0;
83 bool start_success_ = false;
84 apollo::common::monitor::MonitorLogBuffer monitor_logger_buffer_;
85};
86
88
89} // namespace conti_radar
90} // namespace drivers
91} // namespace apollo
Defines the CanFrame struct and CanClient interface.
Defines CanReceiver class.
Reader subscribes a channel, it has two main functions:
Definition reader.h:69
#define CYBER_REGISTER_COMPONENT(name)
Definition component.h:657
The class of ContiRadarMessageManager
The class of MessageManager
Some util functions.
The class of MonitorLogBuffer
class register implement
Definition arena_queue.h:37