Apollo  6.0
Open source self driving car software
cycle_routing_manager.h
Go to the documentation of this file.
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 #include <vector>
22 
23 #include "modules/localization/proto/localization.pb.h"
24 #include "modules/task_manager/proto/task_manager.pb.h"
25 
29 
30 namespace apollo {
31 namespace task_manager {
32 
34  public:
35  CycleRoutingManager() = default;
36 
41  common::Status Init(const task_manager::CycleRoutingTask& cycle_routing_task);
42 
47  bool GetNewRouting(const localization::Pose& pose,
48  routing::RoutingRequest* routing_request_);
49 
54  int GetCycle() const { return cycle_; }
55 
59  virtual ~CycleRoutingManager() = default;
60 
61  private:
62  int cycle_ = 0;
63  int waypoint_num_ = 0;
64  bool is_allowed_to_route_ = false;
65  routing::LaneWaypoint begin_point_;
66  routing::LaneWaypoint end_point_;
67  std::unique_ptr<apollo::dreamview::MapService> map_service_;
68  routing::RoutingRequest original_routing_request_;
69 };
70 
71 } // namespace task_manager
72 } // namespace apollo
bool GetNewRouting(const localization::Pose &pose, routing::RoutingRequest *routing_request_)
Get new routing if the vehicle reaches the begin/end point.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: cycle_routing_manager.h:33
virtual ~CycleRoutingManager()=default
destructor
common::Status Init(const task_manager::CycleRoutingTask &cycle_routing_task)
module initialization function
The class of MonitorLogBuffer.
A general class to denote the return status of an API call. It can either be an OK status for success...
Definition: status.h:43
int GetCycle() const
get remaining cycle number
Definition: cycle_routing_manager.h:54