Apollo  6.0
Open source self driving car software
vehicle_config_helper.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 
21 #pragma once
22 
23 #include <string>
24 
25 #include "modules/common/configs/proto/vehicle_config.pb.h"
26 #include "modules/common/proto/pnc_point.pb.h"
27 
28 #include "cyber/common/macros.h"
30 
35 namespace apollo {
36 namespace common {
37 
46  public:
53  static void Init();
54 
60  static void Init(const VehicleConfig &config);
61 
70  static void Init(const std::string &config_file);
71 
76  static const VehicleConfig &GetConfig();
77 
110  static double MinSafeTurnRadius();
111 
118  const common::PathPoint &path_point);
119 
120  private:
121  static VehicleConfig vehicle_config_;
122  static bool is_init_;
124 };
125 
126 } // namespace common
127 } // namespace apollo
Definition: vehicle_config_helper.h:45
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
static common::math::Box2d GetBoundingBox(const common::PathPoint &path_point)
Get the box (four corners: ABCD) of the vehicle.
Rectangular (undirected) bounding box in 2-D.
Definition: box2d.h:52
#define DECLARE_SINGLETON(classname)
Definition: macros.h:52
static const VehicleConfig & GetConfig()
Get the current vehicle configuration.
static void Init()
Initialize vehicle configurations with default configuration file pointed by gflags FLAGS_vehicle_con...
static double MinSafeTurnRadius()
Get the safe turning radius when the vehicle is turning with maximum steering angle.
The class of Box2d. Here, the x/y axes are respectively Forward/Left, as opposed to what happens in e...