Apollo  6.0
Open source self driving car software
submodule_output.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2019 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 #pragma once
23 
24 #include <vector>
25 
26 #include "cyber/time/time.h"
27 
29 #include "modules/perception/proto/perception_obstacle.pb.h"
31 
32 namespace apollo {
33 namespace prediction {
34 
36  public:
40  SubmoduleOutput() = default;
41 
45  virtual ~SubmoduleOutput() = default;
46 
47  void InsertObstacle(const Obstacle&& obstacle);
48 
49  void InsertEgoVehicle(const Obstacle&& ego_vehicle);
50 
52  const std::vector<int>& curr_frame_movable_obstacle_ids);
53 
55  const std::vector<int>& curr_frame_unmovable_obstacle_ids);
56 
58  const std::vector<int>& curr_frame_considered_obstacle_ids);
59 
61 
62  void set_curr_scenario(const Scenario& scenario);
63 
64  const std::vector<Obstacle>& curr_frame_obstacles() const;
65 
66  const Obstacle& GetEgoVehicle() const;
67 
68  const std::vector<apollo::perception::PerceptionObstacle>&
70 
71  std::vector<int> curr_frame_movable_obstacle_ids() const;
72 
73  std::vector<int> curr_frame_unmovable_obstacle_ids() const;
74 
75  std::vector<int> curr_frame_considered_obstacle_ids() const;
76 
78 
79  const Scenario& curr_scenario() const { return curr_scenario_; }
80 
81  protected:
82  std::vector<Obstacle> curr_frame_obstacles_;
88  Scenario curr_scenario_;
89 };
90 
91 } // namespace prediction
92 } // namespace apollo
SubmoduleOutput()=default
Constructor.
Scenario curr_scenario_
Definition: submodule_output.h:88
std::vector< int > curr_frame_considered_obstacle_ids_
Definition: submodule_output.h:86
Prediction obstacle.
Definition: obstacle.h:52
std::vector< int > curr_frame_movable_obstacle_ids() const
std::vector< int > curr_frame_considered_obstacle_ids() const
std::vector< int > curr_frame_unmovable_obstacle_ids() const
void set_curr_frame_unmovable_obstacle_ids(const std::vector< int > &curr_frame_unmovable_obstacle_ids)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
const apollo::cyber::Time & frame_start_time() const
Obstacle.
const std::vector< apollo::perception::PerceptionObstacle > & curr_frame_perception_obstacles() const
Definition: submodule_output.h:35
void InsertObstacle(const Obstacle &&obstacle)
void set_curr_frame_movable_obstacle_ids(const std::vector< int > &curr_frame_movable_obstacle_ids)
std::vector< int > curr_frame_movable_obstacle_ids_
Definition: submodule_output.h:84
Obstacle ego_vehicle_
Definition: submodule_output.h:83
const std::vector< Obstacle > & curr_frame_obstacles() const
apollo::cyber::Time frame_start_time_
Definition: submodule_output.h:87
void set_curr_scenario(const Scenario &scenario)
std::vector< Obstacle > curr_frame_obstacles_
Definition: submodule_output.h:82
const Scenario & curr_scenario() const
Definition: submodule_output.h:79
std::vector< int > curr_frame_unmovable_obstacle_ids_
Definition: submodule_output.h:85
void set_frame_start_time(const apollo::cyber::Time &frame_start_time)
virtual ~SubmoduleOutput()=default
Destructor.
void set_curr_frame_considered_obstacle_ids(const std::vector< int > &curr_frame_considered_obstacle_ids)
void InsertEgoVehicle(const Obstacle &&ego_vehicle)
const Obstacle & GetEgoVehicle() const
Cyber has builtin time type Time.
Definition: time.h:31