ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
participant.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 implementation and API
13  ********************************************************************************/
14 
15 #pragma once
16 #include <vector>
17 #include "movingbox.h"
18 
19 namespace adore
20 {
21  namespace env
22  {
23  namespace traffic
24  {
29  struct Participant
30  {
31  public:
32  typedef int TTrackingID;
33  typedef long long int TV2XStationID;
34  typedef adoreMatrix<double,7,7> TCovariance;
35  enum EClassification: int
36  {
43  BIKE=6,
45  MOPED=8,
47  CAR=10,
48  VAN=11,
49  BUS=12,
50  TRUCK=13,
53  TRAM=16,
54  TRAILER=17,
57  TRAIN=20,
60  ANIMAL_BIG=23
61  };
62  static const unsigned int UNDEFINED = 1;
63  static const unsigned int RADAR = 2;
64  static const unsigned int LIDAR = 4;
65  static const unsigned int MONO_VIDEO = 8;
66  static const unsigned int STEREO_VISION = 16;
67  static const unsigned int SPERICAL_CAMERA = 32;
68  static const unsigned int NIGHT_VISION = 64;
69  static const unsigned int ULTRASONIC = 128;
70  static const unsigned int INDUCTIONLOOP = 256;
71  static const unsigned int PMD = 512;
72  static const unsigned int V2X_CAM = 1024;
73  static const unsigned int V2X_CPM = 2048;
74  static const unsigned int V2X_MCM = 4096;
75  static const unsigned int SPECULATIVE = 2147483648;
77  public:
86  double rightIndicator_certainty_; // confidence of detection of right indicator state 0..100 */
89  bool lowBeamOn_;
91  bool highBeamOn_;
94  unsigned int detection_by_sensor_;
98  adoreMatrix<double,3,1> center_;
99  double yaw_;
100  double length_;
101  double width_;
102  double height_;
103  double vx_;
104  double vy_;
105  double yawrate_;
112  double getObservationTime()const{return observation_time_;}
117  bool getLowBeamOn()const{return lowBeamOn_;}
118  double getLowBeamCertainty()const{return lowBeamCertainty_;}
119  bool getHighBeamOn()const{return highBeamOn_;}
121  unsigned int getDetectionBySensor()const{return detection_by_sensor_;}
124  const adoreMatrix<double,3,1>& getCenter()const{return center_;}
125  adoreMatrix<double,3,1> getFrontLeftCorner()const
126  {
127  adoreMatrix<double,3,1> vector = center_;
128  vector(0) = vector(0) + std::cos(yaw_) * length_*0.5 - std::sin(yaw_) * width_*0.5;
129  vector(1) = vector(1) + std::sin(yaw_) * length_*0.5 + std::cos(yaw_) * width_*0.5;
130  return vector;
131  }
132  adoreMatrix<double,3,1> getFrontRightCorner()const
133  {
134  adoreMatrix<double,3,1> vector = center_;
135  vector(0) = vector(0) + std::cos(yaw_) * length_*0.5 + std::sin(yaw_) * width_*0.5;
136  vector(1) = vector(1) + std::sin(yaw_) * length_*0.5 - std::cos(yaw_) * width_*0.5;
137  return vector;
138  }
139  adoreMatrix<double,3,1> getRearLeftCorner()const
140  {
141  adoreMatrix<double,3,1> vector = center_;
142  vector(0) = vector(0) - std::cos(yaw_) * length_*0.5 - std::sin(yaw_) * width_*0.5;
143  vector(1) = vector(1) - std::sin(yaw_) * length_*0.5 + std::cos(yaw_) * width_*0.5;
144  return vector;
145  }
146  adoreMatrix<double,3,1> getRearRightCorner()const
147  {
148  adoreMatrix<double,3,1> vector = center_;
149  vector(0) = vector(0) - std::cos(yaw_) * length_*0.5 + std::sin(yaw_) * width_*0.5;
150  vector(1) = vector(1) - std::sin(yaw_) * length_*0.5 - std::cos(yaw_) * width_*0.5;
151  return vector;
152  }
153 
154  double getYaw()const {return yaw_;}
155  double getLength()const{return length_;}
156  double getWidth()const{return width_;}
157  double getVx()const{return vx_;}
158  double getVy()const{return vy_;}
159  double getYawRate()const{return yawrate_;}
160  double getAx()const{return acceleration_x_;}
161  const TCovariance& getCovariance()const{return covariance_;}
162  };
163 
164  typedef std::vector<Participant> TParticipantSet;
165 
166 
167  }
168  }
169 }
std::vector< Participant > TParticipantSet
Definition: participant.h:164
interval< T > cos(interval< T > x)
Definition: intervalarithmetic.h:225
interval< T > sin(interval< T > x)
Definition: intervalarithmetic.h:204
Definition: areaofeffectconverter.h:20
Struct for representing a participant in traffic.
Definition: participant.h:30
double getLength() const
Definition: participant.h:155
double acceleration_x_
Definition: participant.h:106
TTrackingID getTrackingID() const
Definition: participant.h:109
double width_
Definition: participant.h:101
double vy_
Definition: participant.h:104
double getRightIndicatorCertainty() const
Definition: participant.h:116
double yaw_
Definition: participant.h:99
double getExistanceCertainty() const
Definition: participant.h:111
double getHighBeamCertainty() const
Definition: participant.h:120
double vx_
Definition: participant.h:103
adoreMatrix< double, 3, 1 > center_
Definition: participant.h:98
long long int TV2XStationID
Definition: participant.h:33
bool getHighBeamOn() const
Definition: participant.h:119
EClassification classification_
Definition: participant.h:95
static const unsigned int LIDAR
Definition: participant.h:64
double getObservationTime() const
Definition: participant.h:112
bool getLowBeamOn() const
Definition: participant.h:117
double getClassificationCertainty() const
Definition: participant.h:123
static const unsigned int ULTRASONIC
Definition: participant.h:69
unsigned int getDetectionBySensor() const
Definition: participant.h:121
TTrackingID trackingID_
Definition: participant.h:78
EClassification
Definition: participant.h:36
@ BUS
Definition: participant.h:49
@ ANIMAL_BIG
Definition: participant.h:60
@ TRAIN
Definition: participant.h:57
@ PEDESTRIAN_GROUP
Definition: participant.h:56
@ OVER_DRIVABLE
Definition: participant.h:41
@ HORSE_RIDER
Definition: participant.h:58
@ TRUCK
Definition: participant.h:50
@ MOPED
Definition: participant.h:45
@ ANIMAL_SMALL
Definition: participant.h:59
@ SPECIAL_VEHICLE
Definition: participant.h:55
@ CAR
Definition: participant.h:47
@ HEAVY_TRUCK
Definition: participant.h:52
@ TRAM
Definition: participant.h:53
@ BICYCLE
Definition: participant.h:44
@ UNDER_DRIVABLE
Definition: participant.h:40
@ MOTORCYCLE
Definition: participant.h:46
@ PEDESTRIAN
Definition: participant.h:42
@ UNCLASSIFIED
Definition: participant.h:37
@ LIGHT_TRUCK
Definition: participant.h:51
@ UNKNOWN_BIG
Definition: participant.h:39
@ UNKNOWN_SMALL
Definition: participant.h:38
@ VAN
Definition: participant.h:48
@ TRAILER
Definition: participant.h:54
@ BIKE
Definition: participant.h:43
double getAx() const
Definition: participant.h:160
double lowBeamCertainty_
Definition: participant.h:90
double leftIndicator_certainty_
Definition: participant.h:84
bool leftIndicatorOn_
Definition: participant.h:83
static const unsigned int SPECULATIVE
Definition: participant.h:75
adoreMatrix< double, 3, 1 > getFrontRightCorner() const
Definition: participant.h:132
unsigned int detection_by_sensor_
Definition: participant.h:94
const adoreMatrix< double, 3, 1 > & getCenter() const
Definition: participant.h:124
bool getRightIndicatorOn() const
Definition: participant.h:115
static const unsigned int NIGHT_VISION
Definition: participant.h:68
double getYaw() const
Definition: participant.h:154
double classification_certainty_
Definition: participant.h:96
bool highBeamOn_
Definition: participant.h:91
double height_
Definition: participant.h:102
int TTrackingID
Definition: participant.h:32
TV2XStationID getStationID() const
Definition: participant.h:110
double existance_certainty_
Definition: participant.h:80
adoreMatrix< double, 7, 7 > TCovariance
Definition: participant.h:34
bool lowBeamOn_
Definition: participant.h:89
TCovariance covariance_
Definition: participant.h:107
const TCovariance & getCovariance() const
Definition: participant.h:161
adoreMatrix< double, 3, 1 > getRearRightCorner() const
Definition: participant.h:146
bool rightIndicatorOn_
Definition: participant.h:85
static const unsigned int SPERICAL_CAMERA
Definition: participant.h:67
double getYawRate() const
Definition: participant.h:159
TV2XStationID v2xStationID_
Definition: participant.h:79
static const unsigned int MONO_VIDEO
Definition: participant.h:65
static const unsigned int PMD
Definition: participant.h:71
double length_
Definition: participant.h:100
double getWidth() const
Definition: participant.h:156
adoreMatrix< double, 3, 1 > getFrontLeftCorner() const
Definition: participant.h:125
double yawrate_
Definition: participant.h:105
double getLeftIndicatorCertainty() const
Definition: participant.h:114
static const unsigned int UNDEFINED
Definition: participant.h:62
double highBeamCertainty_
Definition: participant.h:92
double getVy() const
Definition: participant.h:158
double brakeLight_certainty_
Definition: participant.h:88
double observation_time_
Definition: participant.h:81
EClassification getClassification() const
Definition: participant.h:122
static const unsigned int V2X_MCM
Definition: participant.h:74
bool getLeftIndicatorOn() const
Definition: participant.h:113
static const unsigned int V2X_CAM
Definition: participant.h:72
static const unsigned int RADAR
Definition: participant.h:63
double getVx() const
Definition: participant.h:157
bool brakeLightsOn_
Definition: participant.h:87
adoreMatrix< double, 3, 1 > getRearLeftCorner() const
Definition: participant.h:139
static const unsigned int STEREO_VISION
Definition: participant.h:66
double rightIndicator_certainty_
Definition: participant.h:86
double getLowBeamCertainty() const
Definition: participant.h:118
static const unsigned int INDUCTIONLOOP
Definition: participant.h:70
static const unsigned int V2X_CPM
Definition: participant.h:73