Apollo 11.0
自动驾驶开放平台
debug_info_control_task.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2023 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
22#pragma once
23
24#include <algorithm>
25#include <memory>
26#include <string>
27
28#include "modules/common_msgs/config_msgs/vehicle_config.pb.h"
29#include "modules/control/control_component/proto/control_debug.pb.h"
30
31#include "cyber/cyber.h"
36
41namespace apollo {
42namespace control {
43
50public:
55
59 virtual ~DebugInfoControlTask() = default;
60
65 common::Status Init(std::shared_ptr<DependencyInjector> injector) override;
66
77 const localization::LocalizationEstimate *localization,
78 const canbus::Chassis *chassis,
79 const planning::ADCTrajectory *trajectory,
80 control::ControlCommand *cmd) override;
81
85 void Stop() override;
86
91 common::Status Reset() override;
92
97 std::string Name() const override;
98
99protected:
100 std::shared_ptr<DependencyInjector> injector_;
101
102private:
103 void PublishDebugInfoThreadFunc();
104
105private:
106 std::unique_ptr<::apollo::cyber::Node> node_ = nullptr;
107 std::shared_ptr<cyber::Writer<::apollo::control::ControlDebugInfo>> control_debug_info_writer_;
108 std::string name_;
109
110 ControlDebugInfo control_debug_info_msg_;
111};
112
114
115} // namespace control
116} // namespace apollo
A general class to denote the return status of an API call.
Definition status.h:43
common::Status Reset() override
reset demo control task
void Stop() override
stop DebugInfoControlTask
virtual ~DebugInfoControlTask()=default
destructor
std::shared_ptr< DependencyInjector > injector_
common::Status Init(std::shared_ptr< DependencyInjector > injector) override
initialize DebugInfoControlTask
std::string Name() const override
DebugInfoControlTask name
common::Status ComputeControlCommand(const localization::LocalizationEstimate *localization, const canbus::Chassis *chassis, const planning::ADCTrajectory *trajectory, control::ControlCommand *cmd) override
compute brake / throttle values based on current vehicle status and target trajectory
Defines the Controller base class.
#define CYBER_PLUGIN_MANAGER_REGISTER_PLUGIN(name, base)
Some string util functions.
class register implement
Definition arena_queue.h:37