ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
decoupledconflictpointview.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 #pragma once
17 #include <adore/env/afactory.h>
18 #include <adore/view/alane.h>
19 
20 namespace adore
21 {
22  namespace env
23  {
25  {
26  private:
27  std::vector<adore::view::ConflictPoint> conflict_set_;
30  public:
32  {
33  lane_ = lane;
35  }
36  void update()
37  {
39  {
42  conflict_set_.clear();
43  for(const auto& prediction: set)
44  {
45  for(const auto cylinder: prediction.occupancy_.getLevel(0))
46  {
47  double x,y,s,n;
48  x = cylinder.second.x_;
49  y = cylinder.second.y_;
51  conflict_set_.push_back(adore::view::ConflictPoint(s,cylinder.second.t0_,cylinder.second.t1_));
52  }
53  }
54  }
55  }
56  int size() const override
57  {
58  return conflict_set_.size();
59  }
60  adore::view::ConflictPoint getPoint(int i)const override
61  {
62  return conflict_set_[i];
63  }
64  };
65 
66  }
67 }
virtual TOCPredictionSetReader * getConflictSetReader()=0
Definition: decoupledconflictpointview.h:25
DecoupledConflictPointView(adore::view::ALane *lane)
Definition: decoupledconflictpointview.h:31
adore::env::AFactory::TOCPredictionSetReader * conflict_set_reader_
Definition: decoupledconflictpointview.h:28
void update()
Definition: decoupledconflictpointview.h:36
std::vector< adore::view::ConflictPoint > conflict_set_
Definition: decoupledconflictpointview.h:27
int size() const override
Definition: decoupledconflictpointview.h:56
adore::view::ConflictPoint getPoint(int i) const override
Definition: decoupledconflictpointview.h:60
adore::view::ALane * lane_
Definition: decoupledconflictpointview.h:29
static adore::env::AFactory * get()
Definition: afactory.h:236
Definition: com_patterns.h:68
virtual void getData(T &value)=0
virtual bool hasUpdate() const =0
Definition: aconflictpoint.h:29
Definition: alane.h:28
virtual void toRelativeCoordinates(double xe, double ye, double &s, double &n)=0
std::vector< OccupancyCylinderPrediction > OccupancyCylinderPredictionSet
Definition: occupancycylinderprediction.h:40
void set(T *data, T value, int size)
Definition: adoremath.h:39
x
Definition: adore_set_goal.py:30
y
Definition: adore_set_goal.py:31
Definition: areaofeffectconverter.h:20
Definition: aconflictpoint.h:22