Apollo  6.0
Open source self driving car software
routing.h
Go to the documentation of this file.
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 
17 #pragma once
18 
19 #include <memory>
20 #include <string>
21 #include <vector>
22 
27 #include "modules/routing/proto/routing_config.pb.h"
28 
29 namespace apollo {
30 namespace routing {
31 
32 class Routing {
33  // friend class RoutingTestBase;
34  public:
35  Routing();
36 
40  std::string Name() const;
41 
47 
53 
57  virtual ~Routing() = default;
58 
59  bool Process(const std::shared_ptr<RoutingRequest> &routing_request,
60  RoutingResponse *const routing_response);
61 
62  private:
63  std::vector<RoutingRequest> FillLaneInfoIfMissing(
64  const RoutingRequest &routing_request);
65 
66  bool GetParkingID(const apollo::common::PointENU &parking_point,
67  std::string *parking_space_id);
68 
69  bool FillParkingID(RoutingResponse *routing_response);
70 
71  private:
72  std::unique_ptr<Navigator> navigator_ptr_;
73  common::monitor::MonitorLogBuffer monitor_logger_buffer_;
74 
75  const hdmap::HDMap *hdmap_ = nullptr;
76 };
77 
78 } // namespace routing
79 } // namespace apollo
apollo::common::Status Init()
module initialization function
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: routing.h:32
virtual ~Routing()=default
destructor
std::string Name() const
module name
High-precision map loader interface.
Definition: hdmap.h:53
apollo::common::Status Start()
module start 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
This class help collect MonitorMessage pb to monitor topic. The messages can be published automatical...
Definition: monitor_log_buffer.h:60
bool Process(const std::shared_ptr< RoutingRequest > &routing_request, RoutingResponse *const routing_response)