Apollo 11.0
自动驾驶开放平台
open_space_fallback_decider_park.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
31#include "modules/common_msgs/config_msgs/vehicle_config.pb.h"
32#include "modules/planning/tasks/open_space_fallback_decider_park/proto/open_space_fallback_decider_park.pb.h"
33
46
47namespace apollo {
48namespace planning {
50 public:
51 bool Init(const std::string& config_dir, const std::string& name,
52 const std::shared_ptr<DependencyInjector>& injector) override;
53
54 private:
55 apollo::common::Status Process(Frame* frame) override;
56
57 // bool IsCollisionFreeTrajectory(const ADCTrajectory& trajectory_pb);
58
59 bool IsCollisionFreeTrajectory(
60 const TrajGearPair& trajectory_pb,
61 const std::vector<std::vector<common::math::Box2d>>&
62 predicted_bounding_rectangles,
63 const std::vector<Obstacle*>& static_obstacles, int* current_idx,
64 int* first_collision_idx, bool& is_collision_with_static_obstacle,
65 bool& is_collision_with_dynamic_obstacle);
66
67 bool QuardraticFormulaLowerSolution(const double a, const double b,
68 const double c, double* sol);
69
70 bool IsCollisionFreeEgoBox();
71
72 void CalculateFallbackTrajectory(
73 const TrajGearPair& ChosenPartitionedTrajectory,
74 const double& deceleration, const double& relative_time_interval,
75 TrajGearPair* traj_gear_pair);
76
77 void CalculateFallbackTrajectoryWithTrajectoryPose(
78 const TrajGearPair& ChosenPartitionedTrajectory, const apollo::common::TrajectoryPoint start_point, const apollo::common::TrajectoryPoint end_point, const double& stop_distance,
79 const double& relative_time_interval, TrajGearPair* traj_gear_pair);
80
81 private:
83 double open_space_fallback_collision_distance_ = 0;
84};
85
87 Task)
88
89} // namespace planning
90} // namespace apollo
A general class to denote the return status of an API call.
Definition status.h:43
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.