ridgeback_diagnostic_updater.h
Go to the documentation of this file.
00001 
00034 #ifndef RIDGEBACK_BASE_RIDGEBACK_DIAGNOSTIC_UPDATER_H
00035 #define RIDGEBACK_BASE_RIDGEBACK_DIAGNOSTIC_UPDATER_H
00036 
00037 #include <string>
00038 
00039 #include "ros/ros.h"
00040 #include "std_msgs/Bool.h"
00041 #include "sensor_msgs/Imu.h"
00042 #include "diagnostic_updater/diagnostic_updater.h"
00043 #include "diagnostic_updater/publisher.h"
00044 #include "ridgeback_msgs/Status.h"
00045 
00046 namespace ridgeback_base
00047 {
00048 
00049 class RidgebackDiagnosticUpdater : private diagnostic_updater::Updater
00050 {
00051 public:
00052   RidgebackDiagnosticUpdater();
00053 
00054   void generalDiagnostics(diagnostic_updater::DiagnosticStatusWrapper &stat);
00055   void batteryDiagnostics(diagnostic_updater::DiagnosticStatusWrapper &stat);
00056   void voltageDiagnostics(diagnostic_updater::DiagnosticStatusWrapper &stat);
00057   void currentDiagnostics(diagnostic_updater::DiagnosticStatusWrapper &stat);
00058   void powerDiagnostics(diagnostic_updater::DiagnosticStatusWrapper &stat);
00059   void temperatureDiagnostics(diagnostic_updater::DiagnosticStatusWrapper &stat);
00060 
00061   void statusCallback(const ridgeback_msgs::Status::ConstPtr& status);
00062   void imuCallback(const sensor_msgs::Imu::ConstPtr& msg);
00063   void wirelessMonitorCallback(const ros::TimerEvent& te);
00064 
00065 private:
00066   ros::NodeHandle nh_;
00067   ros::Timer timer_;
00068   ros::Subscriber status_sub_;
00069   ridgeback_msgs::Status::ConstPtr last_status_;
00070 
00071   double expected_imu_frequency_;
00072   diagnostic_updater::TopicDiagnostic* imu_diagnostic_;
00073   ros::Subscriber imu_sub_;
00074 
00075   char hostname_[1024];
00076 
00077   std::string wireless_interface_;
00078   ros::Timer wireless_monitor_timer_;
00079   ros::Publisher wifi_connected_pub_;
00080 };
00081 
00082 }  // namespace ridgeback_base
00083 
00084 #endif  // RIDGEBACK_BASE_RIDGEBACK_DIAGNOSTIC_UPDATER_H


ridgeback_base
Author(s): Mike Purvis , Tony Baltovski
autogenerated on Sun Mar 24 2019 03:01:13