6 #include <drive_msgs/drive_param.h> 8 #include <std_msgs/Float64.h> 12 std::function<void(DriveParametersSource*, const drive_msgs::drive_param::ConstPtr&)>;
50 ros::Subscriber m_drive_parameters_subscriber;
54 ros::Duration m_timeout;
55 ros::Time m_last_update;
59 void driveParametersCallback(
const drive_msgs::drive_param::ConstPtr&
parameters);
constexpr float IDLE_RANGE
bool isOutdated()
Returns true if no update was received for a certain time, determined by the timeout variable...
DriveParametersSource(ros::NodeHandle *node_handle, const char *topic, DriveParameterCallbackFunction update_callback, DriveMode drive_mode, ros::Duration timeout)
Construct a new DriveParametersSource object, subscribes to the topic and stores the parameters into ...
bool isIdle()
Returns true if the last update contained values close to 0 for both steering and throttle...
std::function< void(DriveParametersSource *, const drive_msgs::drive_param::ConstPtr &)> DriveParameterCallbackFunction