Apollo 11.0
自动驾驶开放平台
st_graph_point.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
17/*
18 * @file: st_graph_point.h
19 */
20
21#pragma once
22
23#include <limits>
24
26
27namespace apollo {
28namespace planning {
29
31 public:
32 std::uint32_t index_s() const;
33 std::uint32_t index_t() const;
34
35 const STPoint& point() const;
36 const StGraphPoint* pre_point() const;
37
38 double reference_cost() const;
39 double obstacle_cost() const;
40 double spatial_potential_cost() const;
41 double total_cost() const;
42
43 void Init(const std::uint32_t index_t, const std::uint32_t index_s,
44 const STPoint& st_point);
45
46 // given reference speed profile, reach the cost, including position
47 void SetReferenceCost(const double reference_cost);
48
49 // given obstacle info, get the cost;
50 void SetObstacleCost(const double obs_cost);
51
52 // given potential cost for minimal time traversal
54
55 // total cost
56 void SetTotalCost(const double total_cost);
57
59
60 double GetOptimalSpeed() const;
61
62 void SetOptimalSpeed(const double optimal_speed);
63
64 private:
65 STPoint point_;
66 const StGraphPoint* pre_point_ = nullptr;
67 std::uint32_t index_s_ = 0;
68 std::uint32_t index_t_ = 0;
69
70 double optimal_speed_ = 0.0;
71 double reference_cost_ = 0.0;
72 double obstacle_cost_ = 0.0;
73 double spatial_potential_cost_ = 0.0;
74 double total_cost_ = std::numeric_limits<double>::infinity();
75};
76
77} // namespace planning
78} // 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