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
>
17
#include <
adore/fun/platooningInformation.h
>
18
#include <
adore_if_ros/ros_com_patterns.h
>
19
#include <adore_if_ros_msg/CooperativePlanning.h>
20
21
22
namespace
adore
23
{
24
namespace
if_ROS
25
{
26
27
struct
PlatooningInformationConverter
28
{
32
template
<
typename
Tmsg>
33
void
operator()
(Tmsg msg,
adore::fun::PlatooningInformation
* ps)
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
}
adore::fun::PlatooningInformation
Definition:
platooningInformation.h:28
adore::fun::PlatooningInformation::getToleratedDistanceAhead
double getToleratedDistanceAhead() const
Definition:
platooningInformation.h:51
adore::fun::PlatooningInformation::getTargetAutomationLevel
unsigned int getTargetAutomationLevel() const
Definition:
platooningInformation.h:53
adore::fun::PlatooningInformation::getId
int getId() const
Definition:
platooningInformation.h:55
adore::fun::PlatooningInformation::set
void set(adore_if_ros_msg::CooperativePlanningConstPtr msg)
Definition:
platooningInformation.h:37
adore::fun::PlatooningInformation::getToleratedDistanceBehind
double getToleratedDistanceBehind() const
Definition:
platooningInformation.h:52
adore::fun::PlatooningInformation::getLanePosition
int getLanePosition() const
Definition:
platooningInformation.h:54
afactory.h
adore
Definition:
areaofeffectconverter.h:20
platooningInformation.h
ros_com_patterns.h
adore::if_ROS::PlatooningInformationConverter
Definition:
platooninginformationconverter.h:28
adore::if_ROS::PlatooningInformationConverter::operator()
void operator()(Tmsg msg, adore::fun::PlatooningInformation *ps)
Definition:
platooninginformationconverter.h:33
adore::if_ROS::PlatooningInformationConverter::operator()
adore_if_ros_msg::CooperativePlanning operator()(const adore::fun::PlatooningInformation &ps)
Definition:
platooninginformationconverter.h:41
adore_if_ros
adore_if_ros
include
adore_if_ros
conversions
platooninginformationconverter.h
Generated by
1.9.1