ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
prediction_config.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2017-2020 German Aerospace Center (DLR).
3  * Eclipse ADORe, Automated Driving Open Research https://eclipse.org/adore
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License 2.0 which is available at
7  * http://www.eclipse.org/legal/epl-2.0.
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  * Thomas Lobig - initial implementation
13  ********************************************************************************/
14 
15 #pragma once
16 #include <string>
17 
18 namespace adore
19 {
20  namespace PLOT
21  {
22 
24  {
25  public:
27  {
28  struct color_range
29  {
30  double start_;
31  double end_;
33  {
34  start_ = 0;
35  end_ = 0;
36  }
37  double getShade(double x, double x_max, double x_min = 0)
38  {
39  // if (start_ < end_)
40  return start_+(x-x_min)/(x_max-x_min)*(end_-start_);
41  // else
42  // return end_+(x-x_min)/(x_max-x_min)*(end_-start_);
43  }
44  };
45  // ranges of RGB
47  bool active_;
49  {
50  active_ = true;
51  }
52  double getShade(int rgb_index, double x, double x_max, double x_min = 0)
53  {
54  switch(rgb_index)
55  {
56  case 0:
57  return r_.getShade(x,x_max,x_min);
58  case 1:
59  return g_.getShade(x,x_max,x_min);
60  case 2:
61  return b_.getShade(x,x_max,x_min);
62  default:
63  throw;
64  }
65  }
66 
67  };
68 
69  public:
75 
76  double t_prediction_max = 10.0;
77 
79  {
80  // followMode = false;
81  desired_.b_.start_ = 1;
82  desired_.b_.end_ = 1;
83 
84  expected_.g_.start_ = 1;
85  expected_.g_.end_ = 1;
86 
87  worst_case_.r_.start_ = 1;
88  worst_case_.r_.end_ = 1;
89 
90  ego_.r_.start_ = 1;
91  ego_.r_.end_ = 1;
92 
93  static_.r_.start_ = 1;
94  static_.r_.end_ = 1;
95  static_.b_.start_ = 1;
96  static_.b_.end_ = 1;
97  }
98  };
99  }
100 }
Definition: prediction_config.h:24
prediction_config static_
Definition: prediction_config.h:74
prediction_config expected_
Definition: prediction_config.h:71
PredictionConfig()
Definition: prediction_config.h:78
prediction_config desired_
Definition: prediction_config.h:70
prediction_config worst_case_
Definition: prediction_config.h:72
double t_prediction_max
Definition: prediction_config.h:76
prediction_config ego_
Definition: prediction_config.h:73
x
Definition: adore_set_goal.py:30
Definition: areaofeffectconverter.h:20
double start_
Definition: prediction_config.h:30
double getShade(double x, double x_max, double x_min=0)
Definition: prediction_config.h:37
double end_
Definition: prediction_config.h:31
Definition: prediction_config.h:27
bool active_
Definition: prediction_config.h:47
color_range b_
Definition: prediction_config.h:46
double getShade(int rgb_index, double x, double x_max, double x_min=0)
Definition: prediction_config.h:52
color_range g_
Definition: prediction_config.h:46
color_range r_
Definition: prediction_config.h:46
prediction_config()
Definition: prediction_config.h:48