Go to the documentation of this file.
36 #include <std_msgs/Bool.h>
68 stat.
add(
"Diagnostic Name",
"dummy");
72 stat.
addf(
"Geeky thing to say",
"The square of the time to launch %f is %f",
83 stat.
add(
"Stupidicity of this updater", 1000.);
96 stat.
add(
"Stupidicity of this updater", 2000.);
120 int main(
int argc,
char **argv)
122 ros::init(argc, argv,
"diagnostic_updater_example");
143 updater.setHardwareIDf(
"Device-%i-%i", 27, 46);
185 updater.broadcast(0,
"Doing important initialization stuff.");
208 double min_freq = 0.5;
227 if (!
updater.removeByName(
"Bound check"))
228 ROS_ERROR(
"The Bound check task was not found when trying to remove it.");
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
void produce_diagnostics(diagnostic_updater::DiagnosticStatusWrapper &stat)
DiagnosticTask(const std::string name)
Constructs a DiagnosticTask setting its name in the process.
Manages a list of diagnostic tasks, and calls them in a rate-limited manner.
void add(const std::string &key, const T &val)
Add a key-value pair.
Publisher advertise(AdvertiseOptions &ops)
DiagnosticTask is an abstract base class for collecting diagnostic data.
int main(int argc, char **argv)
void check_lower_bound(diagnostic_updater::DiagnosticStatusWrapper &stat)
Merges CompositeDiagnosticTask into a single DiagnosticTask.
void check_upper_bound(diagnostic_updater::DiagnosticStatusWrapper &stat)
void dummy_diagnostic(diagnostic_updater::DiagnosticStatusWrapper &stat)
void summary(unsigned char lvl, const std::string s)
Fills out the level and message fields of the DiagnosticStatus.
void addf(const std::string &key, const char *format,...)
Add a key-value pair using a format string.
Wrapper for the diagnostic_msgs::DiagnosticStatus message that makes it easier to update.
void summaryf(unsigned char lvl, const char *format,...)
Formatted version of summary.
void run(diagnostic_updater::DiagnosticStatusWrapper &stat)
Fills out this Task's DiagnosticStatusWrapper.
A structure that holds the constructor parameters for the FrequencyStatus class.
diagnostic_updater
Author(s): Kevin Watts, Brice Rebsamen
, Jeremy Leibs, Blaise Gassend
autogenerated on Tue Nov 15 2022 03:17:19