speed_optimizer.h 2.1 KB
Newer Older
Z
Zhang Liangliang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/******************************************************************************
 * Copyright 2017 The Apollo Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *****************************************************************************/

/**
 * @file speed_optimizer.h
 **/

21 22
#ifndef MODULES_PLANNING_TASKS_SPEED_OPTIMIZER_H_
#define MODULES_PLANNING_TASKS_SPEED_OPTIMIZER_H_
Z
Zhang Liangliang 已提交
23

A
Aaron Xiao 已提交
24
#include <string>
25
#include <vector>
A
Aaron Xiao 已提交
26

27
#include "modules/common/status/status.h"
28
#include "modules/planning/common/speed/speed_data.h"
D
Dong Li 已提交
29
#include "modules/planning/common/speed_limit.h"
30
#include "modules/planning/common/speed/st_boundary.h"
31
#include "modules/planning/tasks/task.h"
Z
Zhang Liangliang 已提交
32 33 34 35

namespace apollo {
namespace planning {

D
Dong Li 已提交
36
class SpeedOptimizer : public Task {
Z
Zhang Liangliang 已提交
37 38 39
 public:
  explicit SpeedOptimizer(const std::string& name);
  virtual ~SpeedOptimizer() = default;
40
  apollo::common::Status Execute(
41
      Frame* frame, ReferenceLineInfo* reference_line_info) override;
42 43

 protected:
D
Dong Li 已提交
44
  virtual apollo::common::Status Process(
45 46
      const SLBoundary& adc_sl_boundary, const PathData& path_data,
      const common::TrajectoryPoint& init_point,
47
      const ReferenceLine& reference_line, PathDecision* const path_decision,
D
Dong Li 已提交
48
      SpeedData* const speed_data) = 0;
49

50
  void RecordSTGraphDebug(const std::vector<StBoundary>& boundaries,
D
Dong Li 已提交
51 52
                          const SpeedLimit& speed_limits,
                          const SpeedData& speed_data);
53

54
  void RecordDebugInfo(const SpeedData& speed_data);
Z
Zhang Liangliang 已提交
55 56 57 58 59
};

}  // namespace planning
}  // namespace apollo

60
#endif  // MODULES_PLANNING_TASKS_SPEED_OPTIMIZER_H_