ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
test_straight_line_predictor.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ß - simple traffic predictor for testing of interfaces
13  ********************************************************************************/
14 #pragma once
15 #include <adore/env/afactory.h>
17 namespace adore
18 {
19 namespace apps
20 {
22  {
23  private:
29  public:
31  {
34  }
35  void run()
36  {
37  if(tpsetReader_->hasUpdate())
38  {
39  predictionSet_.clear();
41  for(const auto& participant:participantSet_)
42  {
43  predictor_.setTMaxUTC(participant.getObservationTime() + 5.0);
44  predictor_.predict(participant,predictionSet_);
45  }
47  }
48  }
49  };
50 }
51 }
Definition: test_straight_line_predictor.h:22
adore::env::AFactory::TOCPredictionSetWriter * prediction_writer_
Definition: test_straight_line_predictor.h:27
adore::env::traffic::TParticipantSet participantSet_
Definition: test_straight_line_predictor.h:25
adore::env::OccupancyCylinderPredictionSet predictionSet_
Definition: test_straight_line_predictor.h:26
adore::env::OCStraightLinePrediction predictor_
Definition: test_straight_line_predictor.h:28
void run()
Definition: test_straight_line_predictor.h:35
adore::env::AFactory::TParticipantSetReader * tpsetReader_
Definition: test_straight_line_predictor.h:24
TestStraightLinePredictor()
Definition: test_straight_line_predictor.h:30
virtual TParticipantSetReader * getTrafficParticipantSetReader()=0
virtual TOCPredictionSetWriter * getExpectedPredictionSetWriter()=0
static adore::env::AFactory * get()
Definition: afactory.h:236
Definition: occupancycylinderprediction.h:62
void setTMaxUTC(double value)
Definition: occupancycylinderprediction.h:77
virtual bool predict(const traffic::Participant &p, OccupancyCylinderPredictionSet &set) const override
Definition: occupancycylinderprediction.h:90
Definition: com_patterns.h:68
virtual void getData(T &value)=0
virtual bool hasUpdate() const =0
Definition: com_patterns.h:97
virtual void write(const T &value)=0
std::vector< Participant > TParticipantSet
Definition: participant.h:164
std::vector< OccupancyCylinderPrediction > OccupancyCylinderPredictionSet
Definition: occupancycylinderprediction.h:40
Definition: areaofeffectconverter.h:20