ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
limitline.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  * Daniel Heß - initial API and implementation
13  ********************************************************************************/
14 
15 
16 #pragma once
17 
18 namespace adore
19 {
20  namespace view
21  {
25  struct LimitLine
26  {
27  public:
31  enum EState
32  {
33  // UNKNOWN = 0, /**< default: state is unknown -> wait and/or transition of control*/
34  // WAIT = 1, /**< traffic light is red or train crossing is closed, car has to wait*/
35  // STOP = 2, /**< stop first, then yield, e.g. stop sign*/
36  // CONFLICT = 3, /**< yield and respect higher priority traffic, traffic light is green or flashing yellow or non existant*/
37  // GO = 4 , /**< safe to drive, no higher priority traffic*/
38  // CLEAR = 5 /**< allowed to clear junction, but do not enter*/
43  dark = 1,
52  };
53  private:
56  double t_next_;
57  double s_;
59  public:
61  void setCurrentState(EState value)
62  {
63  current_state_ = value;
64  }
65  void setNextState(EState value)
66  {
67  next_state_ = value;
68  }
69  void setTimeToNextState(double value)
70  {
71  t_next_ = value;
72  }
73  void setProgress(double value)
74  {
75  s_ = value;
76  }
77 
78  public:
80  {
81  return current_state_;
82  }
84  {
85  return next_state_;
86  }
87  double getTimeToNextState()const
88  {
89  return t_next_;
90  }
91  double getProgress()const
92  {
93  return s_;
94  }
95 
96  };
97  }
98 }
Definition: areaofeffectconverter.h:20
Definition: limitline.h:26
EState next_state_
Definition: limitline.h:55
void setProgress(double value)
Definition: limitline.h:73
void setTimeToNextState(double value)
Definition: limitline.h:69
double getTimeToNextState() const
Definition: limitline.h:87
EState getNextState() const
Definition: limitline.h:83
EState current_state_
Definition: limitline.h:54
EState
Definition: limitline.h:32
@ stop_And_Remain
Definition: limitline.h:45
@ permissive_clearance
Definition: limitline.h:49
@ permissive_Movement_Allowed
Definition: limitline.h:47
@ caution_Conflicting_Traffic
Definition: limitline.h:51
@ pre_Movement
Definition: limitline.h:46
@ dark
Definition: limitline.h:43
@ protected_clearance
Definition: limitline.h:50
@ protected_Movement_Allowed
Definition: limitline.h:48
@ unavailable
Definition: limitline.h:42
@ stop_Then_Proceed
Definition: limitline.h:44
void setNextState(EState value)
Definition: limitline.h:65
double getProgress() const
Definition: limitline.h:91
double s_
Definition: limitline.h:57
LimitLine()
Definition: limitline.h:60
void setCurrentState(EState value)
Definition: limitline.h:61
double t_next_
Definition: limitline.h:56
EState getCurrentState() const
Definition: limitline.h:79