ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
terminalrequestconverter.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 #pragma once
16 
17 #include <adore/fun/afactory.h>
19 #include <adore_if_ros_msg/NavigationGoal.h>
20 #include <adore_if_ros_msg/SetPointRequest.h>
21 #include <adore_if_ros_msg/TerminalRequest.h>
22 #include <adore_if_ros_msg/WheelSpeed.h>
23 #include <tf/tf.h>
24 #include <tf/LinearMath/Quaternion.h>
25 #include <std_msgs/Float64.h>
26 #include <std_msgs/Float32.h>
27 #include <std_msgs/Int8.h>
28 #include <std_msgs/Bool.h>
29 #include <nav_msgs/Odometry.h>
30 
31 namespace adore
32 {
33  namespace if_ROS
34  {
39  {
43  template<typename Tmsg>
45  {
46  tr->set(msg->X,msg->Y,msg->PSI,msg->t,msg->valid);
47  }
51  adore_if_ros_msg::TerminalRequest operator()(const adore::fun::TerminalRequest& tr)
52  {
53  adore_if_ros_msg::TerminalRequest msg;
54  msg.X = tr.getX();
55  msg.Y = tr.getY();
56  msg.PSI = tr.getPSI();
57  msg.t = tr.getT();
58  msg.valid = tr.isValid();
59  return msg;
60  }
61  };
62  }
63 }
Definition: terminalrequest.h:27
double getPSI() const
Definition: terminalrequest.h:42
double getY() const
Definition: terminalrequest.h:41
double getT() const
Definition: terminalrequest.h:43
void set(double X, double Y, double psi, double t, bool valid)
Definition: terminalrequest.h:32
double getX() const
Definition: terminalrequest.h:40
bool isValid() const
Definition: terminalrequest.h:44
Definition: areaofeffectconverter.h:20
Definition: terminalrequestconverter.h:39
adore_if_ros_msg::TerminalRequest operator()(const adore::fun::TerminalRequest &tr)
Definition: terminalrequestconverter.h:51
void operator()(Tmsg msg, adore::fun::TerminalRequest *tr)
Definition: terminalrequestconverter.h:44