ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
planningrequestconverter.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_if_ros_msg/PlanningRequest.h>
20 
21 namespace adore
22 {
23  namespace if_ROS
24  {
26  {
31  adore_if_ros_msg::PlanningRequest operator()(const adore::fun::PlanningRequest & data)
32  {
33  adore_if_ros_msg::PlanningRequest msg;
34  msg.iteration = data.iteration;
35  msg.t_planning_start = data.t_planning_start;
36  msg.t_planning_end = data.t_planning_end;
37  msg.t_emergency_start = data.t_emergency_start;
38  msg.initial_state = spr_converter_(&data.initial_state);
39  return msg;
40  }
44  template<typename Tmsg>
46  {
47  data.iteration = msg.iteration;
48  data.t_planning_start = msg.t_planning_start;
49  data.t_planning_end = msg.t_planning_end;
50  data.t_emergency_start = msg.t_emergency_start;
51  spr_converter_(&msg.initial_state,&data.initial_state);
52  }
53  };
54  }
55 }
Definition: areaofeffectconverter.h:20
Definition: planning_request.h:22
double t_planning_start
Definition: planning_request.h:24
double t_emergency_start
Definition: planning_request.h:26
double t_planning_end
Definition: planning_request.h:25
SetPoint initial_state
Definition: planning_request.h:27
long long int iteration
Definition: planning_request.h:23
Definition: planningrequestconverter.h:26
SetPointRequestConverter spr_converter_
Definition: planningrequestconverter.h:27
void operator()(Tmsg msg, adore::fun::PlanningRequest &data)
Definition: planningrequestconverter.h:45
adore_if_ros_msg::PlanningRequest operator()(const adore::fun::PlanningRequest &data)
Definition: planningrequestconverter.h:31
Definition: setpointrequestconverter.h:39