ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
navigationcost.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 
16 #pragma once
17 namespace adore
18 {
19  namespace env
20  {
26  {
27  private:
28  double distanceToGoal_;
29  public:
30  static double maximum_cost()
31  {
32  return 1.0e99;
33  }
34  bool operator<(const NavigationCost& other) const
35  {
36  return this->distanceToGoal_<other.distanceToGoal_;
37  }
38  bool operator==(const NavigationCost& other) const
39  {
40  return this->distanceToGoal_==other.distanceToGoal_;
41  }
52  NavigationCost(double distanceToGoal):distanceToGoal_(distanceToGoal){}
59  {
60  return distanceToGoal_;
61  }
67  void setDistanceToGoal(double value)
68  {
69  distanceToGoal_ = value;
70  }
76  double getCombinedCost()
77  {
78  return distanceToGoal_;
79  }
80  };
81  }
82 }
Definition: areaofeffectconverter.h:20
Struct to organize navigation cost.
Definition: navigationcost.h:26
bool operator==(const NavigationCost &other) const
Definition: navigationcost.h:38
double distanceToGoal_
Definition: navigationcost.h:28
double getDistanceToGoal()
Get the distance to goal.
Definition: navigationcost.h:58
NavigationCost()
Construct a new NavigationCost object.
Definition: navigationcost.h:46
bool operator<(const NavigationCost &other) const
Definition: navigationcost.h:34
void setDistanceToGoal(double value)
Set the distance to goal.
Definition: navigationcost.h:67
static double maximum_cost()
Definition: navigationcost.h:30
double getCombinedCost()
Get combined cost.
Definition: navigationcost.h:76
NavigationCost(double distanceToGoal)
Construct a new NavigationCost object.
Definition: navigationcost.h:52