ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
lanechangeviewproxy.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  * Thomas Lobig - initial API and implementation
13  ********************************************************************************/
14 
15 #pragma once
19 
20 // TODO dependency on traffic and conflictset should be removed once it is removed in alane.h
23 
24 namespace adore
25 {
26  namespace env
27  {
28  namespace BorderBased
29  {
35  {
36  private:
37  // std::shared_ptr<LaneGeometryDataProxy> lane_;
38  // std::shared_ptr<LaneGeometryDataProxy> targetLane_;
39  std::shared_ptr<LaneFollowingViewProxy> sourceLane_;
40  std::shared_ptr<LaneFollowingViewProxy> targetLane_;
41  std::shared_ptr<LaneChangeDataProxy> laneChangeData_;
42  // double limitS(double s)
43  // {
44  // // std::cout << "s_min " << lane_->s_min << " - s_max " << lane_->s_max << std::flush;
45  // return adore::mad::bound(lane_->s_min, s + lane_->s_min, lane_->s_max);
46  // }
47 
48  public:
54  LaneChangeViewProxy(std::shared_ptr<LaneGeometryDataProxy> sourceLaneGeometryData,
55  std::shared_ptr<LaneGeometryDataProxy> targetLaneGeometryData,
56  std::shared_ptr<LaneChangeDataProxy> laneChangeData)
57  : sourceLane_(std::make_shared<LaneFollowingViewProxy>(sourceLaneGeometryData))
58  , targetLane_(std::make_shared<LaneFollowingViewProxy>(targetLaneGeometryData))
59  , laneChangeData_(laneChangeData)
60  {
61  }
62 
63  virtual adore::view::ALane* getSourceLane() override
64  {
65  throw std::logic_error("Not implemented"); // seems to never be used
66  return sourceLane_.get();
67  }
71  virtual adore::view::ALane* getTargetLane() override
72  {
73  return targetLane_.get();
74  }
79  {
80  return laneChangeData_->direction;
81  }
86  virtual double getProgressOfGateOpen() const override
87  {
88  return laneChangeData_->gate_s0;
89  }
94  virtual double getProgressOfGateClosed() const override
95  {
96  return laneChangeData_->gate_s1;
97  }
101  virtual double getOffsetOfStartOuterBorder(double s) override
102  {
103  return laneChangeData_->sourceOuterBorderDistance_fct(s);
104  }
108  virtual double getOffsetOfSeparatingBorder(double s) override
109  {
110  return laneChangeData_->separatingBorderDistance_fct(s);
111  }
115  virtual double getOffsetOfDestinationOuterBorder(double s) override
116  {
117  return laneChangeData_->targetOuterBorderDistance_fct(s);
118  }
119  virtual double getNavigationCostDifference() override
120  {
121  return 0.0;
122  }
123 
124  };
125  } // namespace BorderBased
126  } // namespace env
127 } // namespace adore
Proxy class to access ALane interfaces from preprocessed lane geometry received as data object.
Definition: lanechangeviewproxy.h:35
virtual double getProgressOfGateClosed() const override
Definition: lanechangeviewproxy.h:94
virtual double getOffsetOfDestinationOuterBorder(double s) override
Definition: lanechangeviewproxy.h:115
std::shared_ptr< LaneChangeDataProxy > laneChangeData_
Definition: lanechangeviewproxy.h:41
virtual adore::view::ALane * getSourceLane() override
Definition: lanechangeviewproxy.h:63
virtual double getProgressOfGateOpen() const override
Definition: lanechangeviewproxy.h:86
std::shared_ptr< LaneFollowingViewProxy > sourceLane_
Definition: lanechangeviewproxy.h:39
std::shared_ptr< LaneFollowingViewProxy > targetLane_
Definition: lanechangeviewproxy.h:40
virtual double getNavigationCostDifference() override
Definition: lanechangeviewproxy.h:119
virtual double getOffsetOfSeparatingBorder(double s) override
Definition: lanechangeviewproxy.h:108
virtual adore::view::ALane * getTargetLane() override
Definition: lanechangeviewproxy.h:71
LaneChangeViewProxy(std::shared_ptr< LaneGeometryDataProxy > sourceLaneGeometryData, std::shared_ptr< LaneGeometryDataProxy > targetLaneGeometryData, std::shared_ptr< LaneChangeDataProxy > laneChangeData)
Construct a new Lane Following View Proxy object.
Definition: lanechangeviewproxy.h:54
virtual adore::view::ALaneChangeView::direction getLCDirection() const override
Definition: lanechangeviewproxy.h:78
virtual double getOffsetOfStartOuterBorder(double s) override
Definition: lanechangeviewproxy.h:101
Proxy class to access ALane interfaces from preprocessed lane geometry received as data object.
Definition: lanefollowingviewproxy.h:34
Definition: alanechangeview.h:27
direction
Definition: alanechangeview.h:42
Definition: alane.h:28
Definition: areaofeffectconverter.h:20