20#include <ros/node_handle.h>
22#include <ros/service_client.h>
23#include <ros/service_server.h>
25#include <cav_srvs/GetLights.h>
26#include <cav_srvs/GetLightsRequest.h>
27#include <cav_srvs/GetLightsResponse.h>
28#include <cav_srvs/SetLights.h>
29#include <cav_srvs/SetLightsRequest.h>
30#include <cav_srvs/SetLightsResponse.h>
31#include <cav_msgs/LightBarStatus.h>
51 discoveryPub = node.advertise<cav_msgs::DriverStatus>(
"driver_discovery",100);
59 driverStatus.status = cav_msgs::DriverStatus::OPERATIONAL;
71 ROS_INFO_STREAM(
"bind received");
83 cav_msgs::LightBarStatus lightstatus = req.set_state;
90 yellowDim = lightstatus.yellow_solid == 1;
91 takedown = lightstatus.takedown == 1;
106 cav_msgs::LightBarStatus status;
120 cav_msgs::DriverStatus status;
124 status.radar =
false;
127 status.lidar =
false;
128 status.roadway_sensor =
false;
129 status.comms =
false;
130 status.controller =
false;
131 status.camera =
false;
132 status.lightbar =
true;
148 lbPub.publish(status);
156 return "MockLightBarDriver";
161 list.push_back(
"lightbar");
bool getApiService_cb(cav_srvs::GetDriverApiRequest &req, cav_srvs::GetDriverApiResponse &resp)
ros::Publisher discoveryPub
cav_msgs::LightBarStatus getLightBarStatus()
vector< string > getDriverTypesList()
MockLightBarDriver(ros::CARMANodeHandle node)
ros::ServiceServer getDriverStatusService
cav_msgs::DriverStatus driverStatus
vector< string > getDriverApi()
ros::ServiceServer getApiService
bool setLightService_cb(cav_srvs::SetLightsRequest &req, cav_srvs::SetLightsResponse &resp)
cav_msgs::DriverStatus getDriverStatus()
bool getLightService_cb(cav_srvs::GetLightsRequest &req, cav_srvs::GetLightsResponse &resp)
bool getDriverStatus_cb(cav_srvs::GetDriverStatusRequest &req, cav_srvs::GetDriverStatusResponse &resp)
ros::ServiceServer setLightsService
ros::ServiceServer getLightsService
ros::ServiceServer bindService
void publishDriverStatus()
bool bind_cb(cav_srvs::BindRequest &req, cav_srvs::BindResponse &resp)