13 #include "../../include/kobuki_node/diagnostics.hpp" 28 stat.
summary(diagnostic_msgs::DiagnosticStatus::OK,
"Maximum");
32 stat.
summary(diagnostic_msgs::DiagnosticStatus::OK,
"Healthy");
36 stat.
summary(diagnostic_msgs::DiagnosticStatus::WARN,
"Low");
40 stat.
summary(diagnostic_msgs::DiagnosticStatus::WARN,
"Dangerous");
48 stat.
add(
"Capacity (Ah)", 2.2);
52 stat.
add(
"Source",
"None");
56 stat.
add(
"Source",
"Adapter");
60 stat.
add(
"Source",
"Dock");
66 stat.
add(
"Charging State",
"Trickle Charging");
67 stat.
add(
"Current (A)", 3.14);
71 stat.
add(
"Charging State",
"Full Charging");
72 stat.
add(
"Current (A)", 3.14);
76 stat.
add(
"Charging State",
"Not Charging");
77 stat.
add(
"Current (A)", 0.0);
86 stat.
summary(diagnostic_msgs::DiagnosticStatus::OK,
"Alive");
88 stat.
summary(diagnostic_msgs::DiagnosticStatus::ERROR,
"No Signal");
94 stat.
summary(diagnostic_msgs::DiagnosticStatus::WARN,
"Cliff Detected!");
96 stat.
summary(diagnostic_msgs::DiagnosticStatus::OK,
"All right");
106 stat.
summary(diagnostic_msgs::DiagnosticStatus::WARN,
"Wall Hit!");
108 stat.
summary(diagnostic_msgs::DiagnosticStatus::OK,
"All right");
118 stat.
summary(diagnostic_msgs::DiagnosticStatus::WARN,
"Wheel Drop!");
120 stat.
summary(diagnostic_msgs::DiagnosticStatus::OK,
"All right");
129 stat.
summary(diagnostic_msgs::DiagnosticStatus::WARN,
"Is robot stalled? Motors current is very high");
131 stat.
summary(diagnostic_msgs::DiagnosticStatus::OK,
"All right");
139 if ( state ==
true ) {
140 stat.
summary(diagnostic_msgs::DiagnosticStatus::OK,
"Motors Enabled");
142 stat.
summary(diagnostic_msgs::DiagnosticStatus::WARN,
"Motors Disabled");
145 stat.
addf(
"State",
"%d",
int(state));
150 stat.
summaryf(diagnostic_msgs::DiagnosticStatus::OK,
"Heading: %.2f degrees", heading/100.0);
154 stat.
summaryf(diagnostic_msgs::DiagnosticStatus::OK,
"[%d, %d, %d, %d]",
160 stat.
summaryf(diagnostic_msgs::DiagnosticStatus::OK,
"[%d, %d, %d, %d]",
void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
static const uint8_t RightWheel
void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
std::vector< double > values
void summary(unsigned char lvl, const std::string s)
static const uint8_t RightCliff
void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
void addf(const std::string &key, const char *format,...)
void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
void summaryf(unsigned char lvl, const char *format,...)
static const uint8_t CenterCliff
static const uint8_t LeftCliff
static const uint8_t LeftBumper
static const uint8_t CenterBumper
static const uint8_t LeftWheel
void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
void add(const std::string &key, const T &val)
void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
static const uint8_t RightBumper