Apollo 11.0
自动驾驶开放平台
end_condition_sampler.h
浏览该文件的文档.
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 <memory>
24#include <string>
25#include <utility>
26#include <vector>
27
33
34namespace apollo {
35namespace planning {
36
41
42// Input: planning objective, vehicle kinematic/dynamic constraints,
43// Output: sampled ending 1 dimensional states with corresponding time duration.
45 public:
47 const std::array<double, 3>& init_s, const std::array<double, 3>& init_d,
48 std::shared_ptr<PathTimeGraph> ptr_path_time_graph,
49 std::shared_ptr<PredictionQuerier> ptr_prediction_querier);
50
51 virtual ~EndConditionSampler() = default;
52
53 std::vector<std::pair<std::array<double, 3>, double>> SampleLatEndConditions()
54 const;
55
56 std::vector<std::pair<std::array<double, 3>, double>>
57 SampleLonEndConditionsForCruising(const double ref_cruise_speed) const;
58
59 std::vector<std::pair<std::array<double, 3>, double>>
60 SampleLonEndConditionsForStopping(const double ref_stop_point) const;
61
62 std::vector<std::pair<std::array<double, 3>, double>>
64
65 private:
66 std::vector<SamplePoint> QueryPathTimeObstacleSamplePoints() const;
67
68 void QueryFollowPathTimePoints(
69 const apollo::common::VehicleConfig& vehicle_config,
70 const std::string& obstacle_id,
71 std::vector<SamplePoint>* sample_points) const;
72
73 void QueryOvertakePathTimePoints(
74 const apollo::common::VehicleConfig& vehicle_config,
75 const std::string& obstacle_id,
76 std::vector<SamplePoint>* sample_points) const;
77
78 private:
79 std::array<double, 3> init_s_;
80 std::array<double, 3> init_d_;
81 FeasibleRegion feasible_region_;
82 std::shared_ptr<PathTimeGraph> ptr_path_time_graph_;
83 std::shared_ptr<PredictionQuerier> ptr_prediction_querier_;
84};
85
86} // namespace planning
87} // namespace apollo
std::vector< std::pair< std::array< double, 3 >, double > > SampleLatEndConditions() const
std::vector< std::pair< std::array< double, 3 >, double > > SampleLonEndConditionsForPathTimePoints() const
std::vector< std::pair< std::array< double, 3 >, double > > SampleLonEndConditionsForStopping(const double ref_stop_point) const
std::vector< std::pair< std::array< double, 3 >, double > > SampleLonEndConditionsForCruising(const double ref_cruise_speed) const
Planning module main class.
class register implement
Definition arena_queue.h:37