Apollo 10.0
自动驾驶开放平台
task_manager_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
17#pragma once
18
19#include <memory>
20#include <string>
21
22#include "modules/common_msgs/planning_msgs/planning.pb.h"
23#include "modules/common_msgs/routing_msgs/routing.pb.h"
24#include "modules/common_msgs/external_command_msgs/command_status.pb.h"
25#include "modules/common_msgs/external_command_msgs/lane_follow_command.pb.h"
26#include "modules/common_msgs/planning_msgs/planning_command.pb.h"
31
32namespace apollo {
33namespace task_manager {
34
36
37class TaskManagerComponent final : public cyber::Component<task_manager::Task> {
38 public:
41
42 public:
43 bool Init() override;
44 bool Proc(const std::shared_ptr<task_manager::Task>& task) override;
45
46 private:
47 std::shared_ptr<cyber::Reader<LocalizationEstimate>> localization_reader_;
48 std::shared_ptr<cyber::Reader<apollo::planning::PlanningCommand>>
49 planning_command_reader_;
50 std::shared_ptr<cyber::Reader<planning::ADCTrajectory>> trajectory_reader_;
53 lane_follow_command_client_;
54 std::shared_ptr<CycleRoutingManager> cycle_routing_manager_;
55 std::shared_ptr<ParkingRoutingManager> parking_routing_manager_;
56 external_command::LaneFollowCommand lane_follow_command_;
57 planning::PlanningCommand planning_command_;
58 LocalizationEstimate localization_;
60 std::mutex mutex_;
61 std::string task_name_;
62};
63
65
66} // namespace task_manager
67} // namespace apollo
Client get Response from a responding Service by sending a Request
Definition client.h:47
bool Proc(const std::shared_ptr< task_manager::Task > &task) override
#define CYBER_REGISTER_COMPONENT(name)
Definition component.h:656
class register implement
Definition arena_queue.h:37