ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
platooninginformationconverter.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 <adore/fun/afactory.h>
19 #include <adore_if_ros_msg/CooperativePlanning.h>
20 
21 
22 namespace adore
23 {
24  namespace if_ROS
25  {
26 
28  {
32  template<typename Tmsg>
34  {
35  // std::cout<<"\nwrite msg to p_info";
36  ps->set(msg);
37  }
41  adore_if_ros_msg::CooperativePlanning operator()(const adore::fun::PlatooningInformation& ps)
42  {
43  // std::cout<<"\nwrite p_info to msg";
44  adore_if_ros_msg::CooperativePlanning msg;
45  msg.tolerated_distance_ahead = ps.getToleratedDistanceAhead();
46  msg.tolerated_distance_behind = ps.getToleratedDistanceBehind();
47  msg.target_automation_level = ps.getTargetAutomationLevel();
48  msg.lane_position = ps.getLanePosition();
49  msg.id = ps.getId();
50  return msg;
51  }
52  };
53  }
54 }
Definition: platooningInformation.h:28
double getToleratedDistanceAhead() const
Definition: platooningInformation.h:51
unsigned int getTargetAutomationLevel() const
Definition: platooningInformation.h:53
int getId() const
Definition: platooningInformation.h:55
void set(adore_if_ros_msg::CooperativePlanningConstPtr msg)
Definition: platooningInformation.h:37
double getToleratedDistanceBehind() const
Definition: platooningInformation.h:52
int getLanePosition() const
Definition: platooningInformation.h:54
Definition: areaofeffectconverter.h:20
Definition: platooninginformationconverter.h:28
void operator()(Tmsg msg, adore::fun::PlatooningInformation *ps)
Definition: platooninginformationconverter.h:33
adore_if_ros_msg::CooperativePlanning operator()(const adore::fun::PlatooningInformation &ps)
Definition: platooninginformationconverter.h:41