Apollo 11.0
自动驾驶开放平台
lattice_trajectory1d.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 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
27
28namespace apollo {
29namespace planning {
30
32 public:
33 explicit LatticeTrajectory1d(std::shared_ptr<Curve1d> ptr_trajectory1d);
34
35 virtual ~LatticeTrajectory1d() = default;
36
37 virtual double Evaluate(const std::uint32_t order, const double param) const;
38
39 virtual double ParamLength() const;
40
41 virtual std::string ToString() const;
42
43 bool has_target_position() const;
44
45 bool has_target_velocity() const;
46
47 bool has_target_time() const;
48
49 double target_position() const;
50
51 double target_velocity() const;
52
53 double target_time() const;
54
56
58
59 void set_target_time(double target_time);
60
61 private:
62 std::shared_ptr<Curve1d> ptr_trajectory1d_;
63
64 double target_position_ = 0.0;
65
66 double target_velocity_ = 0.0;
67
68 double target_time_ = 0.0;
69
70 bool has_target_position_ = false;
71
72 bool has_target_velocity_ = false;
73
74 bool has_target_time_ = false;
75};
76
77} // namespace planning
78} // namespace apollo
void set_target_velocity(double target_velocity)
virtual double Evaluate(const std::uint32_t order, const double param) const
void set_target_position(double target_position)
Planning module main class.
class register implement
Definition arena_queue.h:37