ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
indicatorhintconverter.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 #pragma once
15 
16 #include <adore/env/afactory.h>
17 #include <adore_if_ros_msg/IndicatorHint.h>
18 
19 namespace adore
20 {
21  namespace if_ROS
22  {
24  {
28  adore_if_ros_msg::IndicatorHint operator()(const adore::env::IndicatorHint& data)
29  {
30  adore_if_ros_msg::IndicatorHint msg;
32  msg.validFromTo.first.x = data.startX;
33  msg.validFromTo.first.y = data.startY;
34  msg.validFromTo.first.z = 0.0;
35  msg.validFromTo.last.x = data.stopX;
36  msg.validFromTo.last.y = data.stopY;
37  msg.validFromTo.last.z = 0.0;
38  msg.id = data.id;
39  return msg;
40  }
44  void operator()(adore_if_ros_msg::IndicatorHintConstPtr msg,adore::env::IndicatorHint& data)
45  {
47  data.startX = msg->validFromTo.first.x;
48  data.startY = msg->validFromTo.first.y;
49  data.stopX = msg->validFromTo.last.x;
50  data.stopY = msg->validFromTo.last.y;
51  data.id = msg->id;
52  }
53 
54  };
55  }
56 }
57 
58 
59 
Definition: areaofeffectconverter.h:20
Definition: indicator_hint.h:41
double stopX
Definition: indicator_hint.h:96
double stopY
Definition: indicator_hint.h:97
constexpr static adore::env::IndicatorSide indicatorSideFromString(std::string_view key)
Definition: indicator_hint.h:52
double startY
Definition: indicator_hint.h:95
TIndicatorHintID id
Definition: indicator_hint.h:98
IndicatorSide value
Definition: indicator_hint.h:93
double startX
Definition: indicator_hint.h:94
constexpr static std::string_view stringFromIndicatorSide(adore::env::IndicatorSide side)
Definition: indicator_hint.h:72
Definition: indicatorhintconverter.h:24
void operator()(adore_if_ros_msg::IndicatorHintConstPtr msg, adore::env::IndicatorHint &data)
Definition: indicatorhintconverter.h:44
adore_if_ros_msg::IndicatorHint operator()(const adore::env::IndicatorHint &data)
Definition: indicatorhintconverter.h:28