Newer
Older
#ifndef MAINNODE_H
#define MAINNODE_H
#include <nodelet/nodelet.h>
#include <ros/ros.h>
#include <logging/MessageOStream.h>
#include "NetworkingLib/Networking.h"
#include "PlatoonController.h"
#include "EgoMotion.h"
networking::Networking c2cNet; // thread + event queue
platoonProtocol::VehicleFacade c2c;
networking::Networking pcNet; // thread + event queue
pc2car::CommandReceiver::Ptr pc;
PlatoonController platoonController;
NotifiableThread platoonControllerThread;
CruiseController cruiseController;
NotifiableThread cruiseControllerThread;
std::function<void()> platoonControllerNotify =
[this] { platoonControllerThread.notify(); };
std::function<void()> cruiseControllerNotify =
[this] { cruiseControllerThread.notify(); };
platoonProtocol::VehicleId readVehicleId();
platoonProtocol::Vehicle::VehicleEndpoints readVehicleEndpoints();