21#include <boost/shared_ptr.hpp>
22#include <cav_msgs/DriverStatus.h>
114 template <
typename T>
115 void addPassthroughPub(
const std::string& sub_topic,
const std::string& pub_topic,
bool latch,
size_t queue_size);
134 template <
typename T>
183#include "impl/MockDriver.tpp"
Node class which connects to the ROS network.
The template node for the mock drivers that will handle all of the default driver logic.
MockDriverNode getMockDriverNode() const
Returns the mock driver node for the mock driver (used for testing)
virtual int onRun()=0
Pure virtual method which must be implemented by child classes. This method will be run once at start...
virtual bool onSpin()
Virtual method which child classes can override to add functionality which will occur during each spi...
ros::Time last_discovery_pub_
const std::string driver_discovery_topic_
const std::string bag_prefix_
ROSCommsPtr< cav_msgs::DriverStatus > driver_discovery_pub_ptr_
MockDriverNode mock_driver_node_
boost::shared_ptr< ROSComms< T > > ROSCommsPtr
void driverDiscovery()
Helper function to publish the driver discovery message.
bool spinCallback()
Callback which will be triggered at the rate specified by getRate(). This callback will also trigger ...
int run()
A function to initialize the publishers and subsricers and start the node. In child classes,...
void addPassthroughPub(const std::string &sub_topic, const std::string &pub_topic, bool latch, size_t queue_size)
Function adds both a publisher and subscriber of the specified type. This means a passthrough subscri...
void addPassthroughPubNoHeader(const std::string &sub_topic, const std::string &pub_topic, bool latch, size_t queue_size)
Function adds both a publisher and subscriber of the specified type. This means a passthrough subscri...
ROSCommsPtr< ConstPtrRef< T > > ConstPtrRefROSCommsPtr
boost::shared_ptr< const T > ConstPtr
virtual unsigned int getRate()=0
Pure virtual method that returns the desired operational rate of a child class.
virtual std::vector< DriverType > getDriverTypes()=0
Pure Virtual method which child classes must override that returns the list of all driver types that ...
const ConstPtr< T > & ConstPtrRef
virtual uint8_t getDriverStatus()=0
Pure Virtual method. Returns an integer value which corresponds to the cav_msgs/DriverStatus enum fel...
This class is used to transfer all the information required to initialize ros topics/services.