Running a Self-Test

You can get a list of the available subtests with the rosservice command:

$ rosservice list | grep "/self_test$"
/hokuyo_node/self_test

You can then run the self test using rosservice:

$ rosservice call /hokuyo_node/self_test

You can get different output with the deprecated run_selftest node:

$ rosrun self_test run_selftest /hokuyo_node/self_test

C++ API

The self_test::TestRunner class will advertise a service "~self_test". When called, it will perform a check on the node's connection status, and any other checks a developer wants to perform on a node or device.

An example use of the self_test package's API can be found in self_test/src/selftest_example.cpp.

Stability and Status

The documented C++ and ROS API should be considered stable.

self_test::TestRunner

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/DiagnosticStatus array (see the service definition diagnostic_msgs/SelfTest). A detailed example can be found in self_test/src/selftest_example.cpp.

Nodes

selftest_rostest

A rostest that runs a self-test and reports success if the self-test passed.

Parameters

~node_to_test (string, default: "")
  • Name of the node to run the self-test on.
~max_delay (string, default: 60)
  • Maximum amount of time to wait for the self_test service to show up.

Wiki: self_test (last edited 2014-05-03 16:46:53 by PiotrOrzechowski)