Apollo 11.0
自动驾驶开放平台
st_graph_data.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
22#pragma once
23
24#include <tuple>
25#include <vector>
26
27#include "modules/common_msgs/basic_msgs/pnc_point.pb.h"
28#include "modules/planning/planning_base/proto/st_drivable_boundary.pb.h"
29
32
33namespace apollo {
34namespace planning {
35
36constexpr double kObsSpeedIgnoreThreshold = 100.0;
37
39 public:
40 StGraphData() = default;
41
42 void LoadData(const std::vector<const STBoundary*>& st_boundaries,
43 const double min_s_on_st_boundaries,
45 const SpeedLimit& speed_limit, const double cruise_speed,
46 const double path_data_length, const double total_time_by_conf,
47 planning_internal::STGraphDebug* st_graph_debug);
48
49 bool is_initialized() const { return init_; }
50
51 const std::vector<const STBoundary*>& st_boundaries() const;
52
53 double min_s_on_st_boundaries() const;
54
56
57 const SpeedLimit& speed_limit() const;
58
59 double cruise_speed() const;
60
61 double path_length() const;
62
63 double total_time_by_conf() const;
64
66
68 const std::vector<std::tuple<double, double, double>>& s_boundary,
69 const std::vector<std::tuple<double, double, double>>& v_obs_info);
70
72
73 private:
74 bool init_ = false;
75 std::vector<const STBoundary*> st_boundaries_;
76 double min_s_on_st_boundaries_ = 0.0;
78 SpeedLimit speed_limit_;
79 double cruise_speed_ = 0.0;
80 double path_data_length_ = 0.0;
81 double path_length_by_conf_ = 0.0;
82 double total_time_by_conf_ = 0.0;
83 planning_internal::STGraphDebug* st_graph_debug_ = nullptr;
84
85 STDrivableBoundary st_drivable_boundary_;
86};
87
88} // namespace planning
89} // namespace apollo
const STDrivableBoundary & st_drivable_boundary() const
bool SetSTDrivableBoundary(const std::vector< std::tuple< double, double, double > > &s_boundary, const std::vector< std::tuple< double, double, double > > &v_obs_info)
const SpeedLimit & speed_limit() const
const std::vector< const STBoundary * > & st_boundaries() const
double min_s_on_st_boundaries() const
void LoadData(const std::vector< const STBoundary * > &st_boundaries, const double min_s_on_st_boundaries, const apollo::common::TrajectoryPoint &init_point, const SpeedLimit &speed_limit, const double cruise_speed, const double path_data_length, const double total_time_by_conf, planning_internal::STGraphDebug *st_graph_debug)
planning_internal::STGraphDebug * mutable_st_graph_debug()
const apollo::common::TrajectoryPoint & init_point() const
Planning module main class.
constexpr double kObsSpeedIgnoreThreshold
class register implement
Definition arena_queue.h:37