ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
platooningInformation.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  * Reza Dariani - initial API and implementation
13  ********************************************************************************/
14 
15 #pragma once
16 #include <vector>
17 #include <adore_if_ros_msg/CooperativePlanning.h>
18 //#include <adore/fun/logic/platoonLogic.h>
19 
20 namespace adore
21 {
22  namespace fun
23  {
28  {
29  private:
32  unsigned int TargetAutomationLevel;
34  int id;
35 
36  public:
37  void set(adore_if_ros_msg::CooperativePlanningConstPtr msg)
38  {
39  this->ToleratedDistanceAhead=msg->tolerated_distance_ahead;
40  this->ToleratedDistanceBehind=msg->tolerated_distance_behind;
41  this->TargetAutomationLevel=msg->target_automation_level;
42  this->LanePosition = msg->lane_position;
43  this->id = msg->id;
44  //std::cout<<"\n"<<this->LanePosition <<"\t"<<this->TargetAutomationLevel;
45  }
48  void setTargetAutomationLevel(unsigned int tal) {TargetAutomationLevel = tal;}
49  void setLanePosition(int lp) {LanePosition = lp;}
50  void setId(int id) {this->id = id;}
53  unsigned int getTargetAutomationLevel()const{return TargetAutomationLevel;}
54  int getLanePosition()const{return LanePosition;}
55  int getId()const{return id;}
56 
57  // maximum urban velocity (13.6) * (3) second time headway = 40.8
58  //platoonLogic::SAE_LEVEL2 --> 2
59  //platoonLogic::outermostDrivingLane -->
60  PlatooningInformation():ToleratedDistanceAhead(40.8),ToleratedDistanceBehind(40.8),TargetAutomationLevel(2),LanePosition(1), id(-1) {}
62  };
63  }
64 }
Definition: platooningInformation.h:28
double ToleratedDistanceBehind
Definition: platooningInformation.h:31
double ToleratedDistanceAhead
Definition: platooningInformation.h:30
double getToleratedDistanceAhead() const
Definition: platooningInformation.h:51
unsigned int getTargetAutomationLevel() const
Definition: platooningInformation.h:53
int getId() const
Definition: platooningInformation.h:55
void setId(int id)
Definition: platooningInformation.h:50
void setToleratedDistanceBehind(double tdb)
Definition: platooningInformation.h:47
void set(adore_if_ros_msg::CooperativePlanningConstPtr msg)
Definition: platooningInformation.h:37
int LanePosition
Definition: platooningInformation.h:33
unsigned int TargetAutomationLevel
Definition: platooningInformation.h:32
double getToleratedDistanceBehind() const
Definition: platooningInformation.h:52
void setLanePosition(int lp)
Definition: platooningInformation.h:49
int getLanePosition() const
Definition: platooningInformation.h:54
void setTargetAutomationLevel(unsigned int tal)
Definition: platooningInformation.h:48
void setToleratedDistanceAhead(double tda)
Definition: platooningInformation.h:46
PlatooningInformation(double ToleratedDistanceAhead, double ToleratedDistanceBehind, unsigned int TargetAutomationLevel, int LanePosition, int id)
Definition: platooningInformation.h:61
PlatooningInformation()
Definition: platooningInformation.h:60
int id
Definition: platooningInformation.h:34
Definition: areaofeffectconverter.h:20