Apollo 11.0
自动驾驶开放平台
open_space_fallback_decider.h
浏览该文件的文档.
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 <string>
26#include <utility>
27#include <vector>
28
29#include "Eigen/Dense"
30#include "modules/common_msgs/config_msgs/vehicle_config.pb.h"
31#include "modules/planning/tasks/open_space_fallback_decider/proto/open_space_fallback_decider.pb.h"
42
43namespace apollo {
44namespace planning {
46 public:
47 bool Init(const std::string& config_dir, const std::string& name,
48 const std::shared_ptr<DependencyInjector>& injector) override;
49
50 private:
51 apollo::common::Status Process(Frame* frame) override;
52
53 // bool IsCollisionFreeTrajectory(const ADCTrajectory& trajectory_pb);
54
55 void BuildPredictedEnvironment(const std::vector<const Obstacle*>& obstacles,
56 std::vector<std::vector<common::math::Box2d>>&
57 predicted_bounding_rectangles);
58
59 bool IsCollisionFreeTrajectory(
60 const TrajGearPair& trajectory_pb,
61 const std::vector<std::vector<common::math::Box2d>>&
62 predicted_bounding_rectangles,
63 size_t* current_idx, size_t* first_collision_idx);
64
65 bool QuardraticFormulaLowerSolution(const double a, const double b,
66 const double c, double* sol);
67
68 bool IsCollisionFreeEgoBox();
69
70 void PathPointNormalizing(double rotate_angle,
71 const common::math::Vec2d& translate_origin,
72 double* x, double* y, double* phi);
73
74 private:
76};
77
79 Task)
80
81} // namespace planning
82} // namespace apollo
A general class to denote the return status of an API call.
Definition status.h:43
Implements a class of 2-dimensional vectors.
Definition vec2d.h:42
Frame holds all data for one planning cycle.
Definition frame.h:62
bool Init(const std::string &config_dir, const std::string &name, const std::shared_ptr< DependencyInjector > &injector) override
Planning module main class.
#define CYBER_PLUGIN_MANAGER_REGISTER_PLUGIN(name, base)
std::pair< DiscretizedTrajectory, canbus::Chassis::GearPosition > TrajGearPair
class register implement
Definition arena_queue.h:37
Defines the Vec2d class.