ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
stopline.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  * Stephan Lapoehn - initial API and implementation
14  ********************************************************************************/
15 
16 #pragma once
19 
20 namespace adore
21 {
22  namespace env
23  {
24  namespace BorderBased
25  {
31  {
32  public:
37  enum State
38  {
39  UNKNOWN = 0,
40  STOP = 1,
41  CONFLICT = 2,
42  GO = 3
44 
45 
46  std::map<float,float> m_speedAdvisories;
48  double m_tswitch;
52  int m_signalGroupID; /*<< id of the signal group */
53 
59  {
61  m_state = UNKNOWN;
62  m_tswitch = 1.0e6;
63  }
69  StopLine(const StopLine& other)
70  {
71  this->m_position = other.m_position;
72  this->m_state = other.m_state;
73  this->m_tswitch = other.m_tswitch;
74  }
80  StopLine(const LanePosition& pos)
81  {
82  m_position = LanePosition(pos);
83  m_state = UNKNOWN;
84  m_tswitch = 1.0e6;
85  }
93  StopLine(const LanePosition& pos, State state,double tswitch = 1.0e6)
94  {
95  m_position = LanePosition(pos);
96  m_state = state;
97  m_tswitch = tswitch;
98  }
104  virtual const LanePosition& getLanePosition()
105  {
106  return m_position;
107  }
115  void translate(double dx,double dy,double dz)
116  {
117  m_position.translate(dx,dy,dz);
118  }
119  void rotate(double angle, double x0=0, double y0=0)
120  {
121  m_position.rotate(angle, x0, y0);
122  }
129  {
130  return m_tswitch;
131  }
137  void setSwitchingTime(double t)
138  {
139  m_tswitch = t;
140  }
141  };
142 
143  }
144  }
145 }
Abstract class for Objects that are positioned by a connection to a certain lane.
Definition: alanepositionedobject.h:28
This class provide information about stoplines.
Definition: stopline.h:31
double m_tswitch
Definition: stopline.h:48
StopLine(const StopLine &other)
Construct a new StopLine object.
Definition: stopline.h:69
int m_signalGroupID
Definition: stopline.h:52
StopLine(const LanePosition &pos)
Construct a new StopLine object.
Definition: stopline.h:80
StopLine()
Construct a new StopLine object.
Definition: stopline.h:58
LanePosition m_position
Definition: stopline.h:50
void rotate(double angle, double x0=0, double y0=0)
Definition: stopline.h:119
StopLine(const LanePosition &pos, State state, double tswitch=1.0e6)
Construct a new StopLine object.
Definition: stopline.h:93
void setSwitchingTime(double t)
Set the switching time.
Definition: stopline.h:137
double getSwitchingTime()
Get the switching time.
Definition: stopline.h:128
enum adore::env::BorderBased::StopLine::State m_state
State
the enum State holds the different possible states of a stopline
Definition: stopline.h:38
@ CONFLICT
Definition: stopline.h:41
@ UNKNOWN
Definition: stopline.h:39
@ STOP
Definition: stopline.h:40
@ GO
Definition: stopline.h:42
virtual const LanePosition & getLanePosition()
Get the LanePosition.
Definition: stopline.h:104
std::map< float, float > m_speedAdvisories
Definition: stopline.h:46
void translate(double dx, double dy, double dz)
Translate the stop line.
Definition: stopline.h:115
x0
Definition: adore_set_goal.py:25
y0
Definition: adore_set_goal.py:26
Definition: areaofeffectconverter.h:20
This is a struct that contains a position defined by a BorderID and a progress on that border.
Definition: laneposition.h:30
void translate(double dx, double dy, double dz)
Translate the LanePosition by translating the BorderID.
Definition: laneposition.h:66
void rotate(double angle, double x0=0, double y0=0)
Definition: laneposition.h:70