path_decision.h 1.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/******************************************************************************
 * 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.
 *****************************************************************************/

/**
18
 * @file
19 20
 **/

21 22
#ifndef MODULES_PLANNING_COMMON_PATH_DECISION_H_
#define MODULES_PLANNING_COMMON_PATH_DECISION_H_
C
Calvin Miao 已提交
23

24
#include <list>
C
Calvin Miao 已提交
25
#include <vector>
26

27 28 29
#include "modules/planning/proto/decision.pb.h"

#include "modules/planning/common/indexed_list.h"
30
#include "modules/planning/common/obstacle.h"
31
#include "modules/planning/common/path_obstacle.h"
32 33 34 35

namespace apollo {
namespace planning {

36
class PathDecision {
C
Calvin Miao 已提交
37
 public:
38 39
  PathDecision(const std::vector<const Obstacle *> &obstacles,
               const ReferenceLine &reference_line);
C
Calvin Miao 已提交
40

41
  const IndexedPathObstacles &path_obstacles() const;
42

43 44 45
  bool AddDecision(const std::string &tag, const std::string &object_id,
                   const ObjectDecisionType &decision);

D
Dong Li 已提交
46 47
  PathObstacle *Find(const std::string &object_id);

48 49
 private:
  void Init(const std::vector<const Obstacle *> &obstacles);
C
Calvin Miao 已提交
50 51

 private:
52
  const ReferenceLine &reference_line_;
53
  IndexedPathObstacles path_obstacles_;
54 55
};

C
Calvin Miao 已提交
56 57
}  // namespace planning
}  // namespace apollo
58

59
#endif  // MODULES_PLANNING_COMMON_PATH_DECISION_H_