Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
helper.cpp File Reference
#include "ros/ros.h"
#include <cav_srvs/PlanTrajectory.h>
Include dependency graph for helper.cpp:

Go to the source code of this file.

Functions

bool callback (cav_srvs::PlanTrajectory::Request &req, cav_srvs::PlanTrajectory::Response &res)
 
int main (int argc, char **argv)
 

Function Documentation

◆ callback()

bool callback ( cav_srvs::PlanTrajectory::Request &  req,
cav_srvs::PlanTrajectory::Response &  res 
)

Definition at line 21 of file helper.cpp.

23{
24 if (req.initial_trajectory_plan.trajectory_id == "YieldReq"){
25 res.trajectory_plan.trajectory_id = "YieldResp";
26 }
27 ROS_ERROR("Yield callback");
28 return true;
29}

Referenced by main(), carma_wm::WMListener::setMapCallback(), carma_wm::WMListenerWorker::setMapCallback(), carma_wm::WMListener::setRouteCallback(), and carma_wm::WMListenerWorker::setRouteCallback().

Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 32 of file helper.cpp.

33{
34 ros::init(argc, argv, "helper");
35 ros::NodeHandle n;
36
37 ros::ServiceServer service = n.advertiseService("yield_plugin/plan_trajectory", callback);
38 ros::spin();
39 ros::Duration(5).sleep();
40
41 return 0;
42}
bool callback(cav_srvs::PlanTrajectory::Request &req, cav_srvs::PlanTrajectory::Response &res)
Definition: helper.cpp:21

References callback().

Here is the call graph for this function: