Apollo  6.0
Open source self driving car software
eight_route.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2019 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 #pragma once
17 
18 #include <memory>
19 #include <vector>
20 
21 #include "grpc++/grpc++.h"
22 
23 #include "cyber/cyber.h"
27 
28 namespace apollo {
29 namespace hdmap {
30 // TODO(yuanyijun): change EightRoute to FigureEight
31 class EightRoute : public Alignment {
32  public:
33  explicit EightRoute(std::shared_ptr<JsonConf> sp_conf);
34  ErrorCode Process(const std::vector<FramePose>& poses);
35  double GetProgress() const;
36 
37  private:
38  void Reset();
39  bool IsEightRoutePose(const std::vector<FramePose>& poses, int pose_index);
40  double GetGoodPoseDuring();
41  double GetEightRouteProgress(const std::vector<FramePose>& poses);
42 
43  private:
44  double progress_;
45  double last_yaw_;
46 };
47 
48 } // namespace hdmap
49 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
double GetProgress() const
EightRoute(std::shared_ptr< JsonConf > sp_conf)
ErrorCode Process(const std::vector< FramePose > &poses)