$search
A self_test is a service call provided by a node that triggers a
test of the driver and any associated hardware. This service call can
be used by users to quickly verify that a device or process is working.
Currently self-tests are mainly used with drivers, but nothing
precludes non-driver nodes using them.
The self_test package contains tools to for calling the self-test
service from the command-line, or from a regression test. It also
provides a C++ API for facilitating writing of self-tests.
self_test contains the self_test::TestRunner class that can be used to sequence a set of tests to be run in order to test a device. It advertises a self_test service. When the service is called, the self_test::TestRunner calls the tests that have been defined in order, and combines the results into a diagnostic_msgs::DiagnosticsArray. A detailed example can be found in selftest_example.cpp.