17 #include <adore_if_ros_msg/CooperativePlanningSet.h>
31 template<
typename Tmsg>
36 for(
int i=0; i<msg->data.size(); i++)
38 cup.
setId(msg->data[i].id);
45 for(
int j=0; j<msg->data[i].prediction.size(); j++)
59 template<
typename Tmsg>
70 for(
int i=0; i<msg->prediction.size(); i++)
87 adore_if_ros_msg::CooperativePlanningSet msg;
88 adore_if_ros_msg::CooperativePlanning cp;
89 adore_if_ros_msg::CooperativeUser cu;
90 for(
int i=0; i<list.size(); i++)
93 cp.lane_position = list[i].lane_position;
94 cp.target_automation_level = list[i].target_automation_level;
95 cp.tolerated_distance_ahead = list[i].toletated_distance_ahead;
96 cp.tolerated_distance_behind = list[i].toletated_distance_behind;
97 cp.vehicle_length = list[i].vehicleLength;
98 cp.vehicle_width = list[i].vehicleWidth;
99 for(
int j=0; j<list[i].currentTrajectory.x.size(); j++)
101 cu.x = list[i].currentTrajectory.x[j];
102 cu.y = list[i].currentTrajectory.y[j];
103 cu.v = list[i].currentTrajectory.v[j];
104 cu.psi = list[i].currentTrajectory.psi[j];
105 cu.t0 = list[i].currentTrajectory.t0[j];
106 cu.t1 = list[i].currentTrajectory.t1[j];
107 cp.prediction.push_back(cu);
109 msg.data.push_back(cp);
110 cp.prediction.clear();
117 adore_if_ros_msg::CooperativePlanning msg;
126 adore_if_ros_msg::CooperativeUser cu;
135 msg.prediction.push_back(cu);
std::vector< CooperativeUserPrediction > CooperativeUsersList
Definition: cooperativeusersprediction.h:70
Definition: areaofeffectconverter.h:20
Definition: cooperativeusersprediction.h:24
std::vector< double > v
Definition: cooperativeusersprediction.h:39
struct adore::env::CooperativeUserPrediction::@0 currentTrajectory
void setTargetAutomationLevel(unsigned int target_automation_level)
Definition: cooperativeusersprediction.h:47
void setLanePosition(int lane_position)
Definition: cooperativeusersprediction.h:46
void setVehicleWidth(double vehicleWidth)
Definition: cooperativeusersprediction.h:51
int lane_position
Definition: cooperativeusersprediction.h:31
std::vector< double > psi
Definition: cooperativeusersprediction.h:42
double toletated_distance_behind
Definition: cooperativeusersprediction.h:28
double vehicleLength
Definition: cooperativeusersprediction.h:32
std::vector< double > t1
Definition: cooperativeusersprediction.h:41
unsigned int target_automation_level
Definition: cooperativeusersprediction.h:30
int id
Definition: cooperativeusersprediction.h:27
double toletated_distance_ahead
Definition: cooperativeusersprediction.h:29
double vehicleWidth
Definition: cooperativeusersprediction.h:33
void clear()
Definition: cooperativeusersprediction.h:52
void setId(int id)
Definition: cooperativeusersprediction.h:45
void setToletatedDistanceBehind(double toletated_distance_behind)
Definition: cooperativeusersprediction.h:48
void setToletatedDistanceAhead(double toletated_distance_ahead)
Definition: cooperativeusersprediction.h:49
std::vector< double > t0
Definition: cooperativeusersprediction.h:40
void setVehicleLength(double vehicleLength)
Definition: cooperativeusersprediction.h:50
std::vector< double > x
Definition: cooperativeusersprediction.h:37
std::vector< double > y
Definition: cooperativeusersprediction.h:38
Definition: cooperativeuserspredictionconverter.h:28
adore_if_ros_msg::CooperativePlanning operator()(const adore::env::CooperativeUserPrediction &user)
Definition: cooperativeuserspredictionconverter.h:115
void operator()(Tmsg msg, adore::env::CooperativeUserPrediction *user)
Definition: cooperativeuserspredictionconverter.h:60
adore_if_ros_msg::CooperativePlanningSet operator()(const adore::env::CooperativeUsersList &list)
Definition: cooperativeuserspredictionconverter.h:84
void operator()(Tmsg msg, adore::env::CooperativeUsersList *list)
Definition: cooperativeuserspredictionconverter.h:32