Apollo 11.0
自动驾驶开放平台
st_graph_point.cc
浏览该文件的文档.
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
24
25namespace apollo {
26namespace planning {
27
28std::uint32_t StGraphPoint::index_s() const { return index_s_; }
29
30std::uint32_t StGraphPoint::index_t() const { return index_t_; }
31
32const STPoint& StGraphPoint::point() const { return point_; }
33
34const StGraphPoint* StGraphPoint::pre_point() const { return pre_point_; }
35
36double StGraphPoint::reference_cost() const { return reference_cost_; }
37
38double StGraphPoint::obstacle_cost() const { return obstacle_cost_; }
39
41 return spatial_potential_cost_;
42}
43
44double StGraphPoint::total_cost() const { return total_cost_; }
45
46void StGraphPoint::Init(const std::uint32_t index_t,
47 const std::uint32_t index_s, const STPoint& st_point) {
48 index_t_ = index_t;
49 index_s_ = index_s;
50 point_ = st_point;
51}
52
53void StGraphPoint::SetReferenceCost(const double reference_cost) {
54 reference_cost_ = reference_cost;
55}
56
57void StGraphPoint::SetObstacleCost(const double obs_cost) {
58 obstacle_cost_ = obs_cost;
59}
60
62 const double spatial_potential_cost) {
63 spatial_potential_cost_ = spatial_potential_cost;
64}
65
66void StGraphPoint::SetTotalCost(const double total_cost) {
67 total_cost_ = total_cost;
68}
69
71 pre_point_ = &pre_point;
72}
73
74double StGraphPoint::GetOptimalSpeed() const { return optimal_speed_; }
75
76void StGraphPoint::SetOptimalSpeed(const double optimal_speed) {
77 optimal_speed_ = optimal_speed;
78}
79
80} // namespace planning
81} // namespace apollo
std::uint32_t index_t() const
std::uint32_t index_s() const
void SetSpatialPotentialCost(const double spatial_potential_cost)
void SetPrePoint(const StGraphPoint &pre_point)
void SetReferenceCost(const double reference_cost)
void SetTotalCost(const double total_cost)
void SetOptimalSpeed(const double optimal_speed)
const STPoint & point() const
const StGraphPoint * pre_point() const
void SetObstacleCost(const double obs_cost)
void Init(const std::uint32_t index_t, const std::uint32_t index_s, const STPoint &st_point)
Planning module main class.
class register implement
Definition arena_queue.h:37