Apollo 11.0
自动驾驶开放平台
standing_still_trajectory1d.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
23namespace apollo {
24namespace planning {
25
27 const double duration)
28 : fixed_position_(p), duration_(duration) {}
29
30double StandingStillTrajectory1d::ParamLength() const { return duration_; }
31
32std::string StandingStillTrajectory1d::ToString() const { return ""; }
33
34double StandingStillTrajectory1d::Evaluate(const std::uint32_t order,
35 const double param) const {
36 // ACHECK(param <= duration_);
37 switch (order) {
38 case 0:
39 return Evaluate_s(param);
40 case 1:
41 return Evaluate_v(param);
42 case 2:
43 return Evaluate_a(param);
44 case 3:
45 return Evaluate_j(param);
46 }
47 return 0.0;
48}
49
50double StandingStillTrajectory1d::Evaluate_s(const double t) const {
51 return fixed_position_;
52}
53
54double StandingStillTrajectory1d::Evaluate_v(const double t) const {
55 return 0.0;
56}
57
58double StandingStillTrajectory1d::Evaluate_a(const double t) const {
59 return 0.0;
60}
61
62double StandingStillTrajectory1d::Evaluate_j(const double t) const {
63 return 0.0;
64}
65
66} // namespace planning
67} // namespace apollo
StandingStillTrajectory1d(const double p, const double duration)
double Evaluate(const std::uint32_t order, const double param) const override
Planning module main class.
class register implement
Definition arena_queue.h:37