Apollo  6.0
Open source self driving car software
open_space_fallback_decider.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 
21 #pragma once
22 
23 #include <algorithm>
24 #include <memory>
25 #include <utility>
26 #include <vector>
27 
28 #include "Eigen/Dense"
29 #include "modules/common/configs/proto/vehicle_config.pb.h"
39 
40 namespace apollo {
41 namespace planning {
43  public:
44  OpenSpaceFallbackDecider(const TaskConfig& config,
45  const std::shared_ptr<DependencyInjector>& injector);
46 
47  private:
48  apollo::common::Status Process(Frame* frame) override;
49 
50  // bool IsCollisionFreeTrajectory(const ADCTrajectory& trajectory_pb);
51 
52  void BuildPredictedEnvironment(const std::vector<const Obstacle*>& obstacles,
53  std::vector<std::vector<common::math::Box2d>>&
54  predicted_bounding_rectangles);
55 
56  bool IsCollisionFreeTrajectory(
57  const TrajGearPair& trajectory_pb,
58  const std::vector<std::vector<common::math::Box2d>>&
59  predicted_bounding_rectangles,
60  size_t* current_idx, size_t* first_collision_idx);
61 
62  bool QuardraticFormulaLowerSolution(const double a, const double b,
63  const double c, double* sol);
64 };
65 
66 } // namespace planning
67 } // namespace apollo
Defines the Vec2d class.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Definition: open_space_fallback_decider.h:42
Planning module main class. It processes GPS and IMU as input, to generate planning info...
Frame holds all data for one planning cycle.
Definition: frame.h:61
std::pair< DiscretizedTrajectory, canbus::Chassis::GearPosition > TrajGearPair
Definition: open_space_info.h:48
Definition: decider.h:32
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
OpenSpaceFallbackDecider(const TaskConfig &config, const std::shared_ptr< DependencyInjector > &injector)