Apollo  6.0
Open source self driving car software
rss_decider.h
Go to the documentation of this file.
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 <algorithm>
24 #include <string>
25 
26 #include "ad_rss/core/RssResponseResolving.hpp"
27 #include "ad_rss/core/RssResponseTransformation.hpp"
28 #include "ad_rss/core/RssSituationChecking.hpp"
29 #include "ad_rss/core/RssSituationExtraction.hpp"
30 #include "ad_rss/situation/SituationVector.hpp"
31 #include "ad_rss/state/ResponseState.hpp"
32 #include "ad_rss/state/ResponseStateVector.hpp"
34 #include "situation/RSSFormulas.hpp"
35 
36 namespace apollo {
37 namespace planning {
38 
40  std::string err_code;
42  double obs_s_start;
43  double obs_s_end;
44  double obs_l_start;
45  double obs_l_end;
46  double obs_speed;
47  double ego_v_s_start;
48  double ego_v_s_end;
49  double ego_v_l_start;
50  double ego_v_l_end;
51  double lane_leftmost;
53  double lane_length;
54  double lane_width;
63  double adc_vel;
68 };
69 
70 class RssDecider : public Task {
71  public:
72  explicit RssDecider(const TaskConfig &config);
73 
74  apollo::common::Status Execute(
75  Frame *frame, ReferenceLineInfo *reference_line_info) override;
76 
77  private:
78  apollo::common::Status Process(Frame *frame,
79  ReferenceLineInfo *reference_line_info);
80  struct rss_world_model_struct rss_world_info;
81  void rss_config_default_dynamics(::ad_rss::world::Dynamics *dynamics);
82  void rss_create_ego_object(::ad_rss::world::Object *ego, double vel_lon,
83  double vel_lat);
84  void rss_create_other_object(::ad_rss::world::Object *other, double vel_lon,
85  double vel_lat);
86  void rss_dump_world_info(const struct rss_world_model_struct &rss_info);
87 };
88 
89 } // namespace planning
90 } // namespace apollo
double adc_vel
Definition: rss_decider.h:63
double obs_s_end
Definition: rss_decider.h:43
double obs_speed
Definition: rss_decider.h:46
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
double OR_rear_lon_max
Definition: rss_decider.h:60
Planning module main class. It processes GPS and IMU as input, to generate planning info...
std::string err_code
Definition: rss_decider.h:40
Frame holds all data for one planning cycle.
Definition: frame.h:61
ReferenceLineInfo holds all data for one reference line.
Definition: reference_line_info.h:54
double lane_width
Definition: rss_decider.h:54
double OR_rear_lat_max
Definition: rss_decider.h:62
Definition: rss_decider.h:70
double obs_l_start
Definition: rss_decider.h:44
double OR_front_lat_min
Definition: rss_decider.h:57
double laneSeg_width_max
Definition: rss_decider.h:67
double OR_front_lon_max
Definition: rss_decider.h:56
double ego_v_s_end
Definition: rss_decider.h:48
double ego_v_l_end
Definition: rss_decider.h:50
double lane_rightmost
Definition: rss_decider.h:52
double obs_l_end
Definition: rss_decider.h:45
double lane_leftmost
Definition: rss_decider.h:51
double OR_rear_lat_min
Definition: rss_decider.h:61
Definition: task.h:35
double obs_s_start
Definition: rss_decider.h:42
A general class to denote the return status of an API call. It can either be an OK status for success...
Definition: status.h:43
double OR_rear_lon_min
Definition: rss_decider.h:59
double OR_front_lat_max
Definition: rss_decider.h:58
double OR_front_lon_min
Definition: rss_decider.h:55
double ego_v_s_start
Definition: rss_decider.h:47
double lane_length
Definition: rss_decider.h:53
double laneSeg_width_min
Definition: rss_decider.h:66
Definition: rss_decider.h:39
double laneSeg_len_max
Definition: rss_decider.h:65
double front_obs_dist
Definition: rss_decider.h:41
double laneSeg_len_min
Definition: rss_decider.h:64
double ego_v_l_start
Definition: rss_decider.h:49