clearpath_tests.canbus_test module

class clearpath_tests.canbus_test.CanbusTestNode(*args: Any, **kwargs: Any)

Bases: ClearpathTestNode

Check the output of candump and count the number if IDs.

get_test_result_details()

Get additional details about the test results.

These details get included in the report, but are not printed out.

If the test does not support additional details, simply return None

read_can_log()

Process the output of candump and check for the number of unique IDs.

Output looks like

vcan1 631 [8] 80 00 00 00 00 00 04 05 vcan1 000 [2] 01 31 vcan1 631 [8] 40 00 D0 20 00 00 00 00 vcan1 631 [8] 80 00 00 00 00 00 04 05 vcan1 632 [8] 40 00 18 01 00 00 00 00 vcan1 632 [8] 80 00 00 00 00 00 04 05 vcan1 000 [2] 01 32 vcan1 632 [8] 40 00 D0 20 00 00 00 00 vcan1 632 [8] 80 00 00 00 00 00 04 05 vcan1 631 [8] 40 00 18 01 00 00 00 00 vcan1 631 [8] 80 00 00 00 00 00 04 05 vcan1 000 [2] 01 31 vcan1 631 [8] 40 00 D0 20 00 00 00 00

Second column is the message, last character of message is the ID

@return A ClearpathTestResult object indicating the results

run_test()

Run this node interactively, prompting the user for input.

This function must be implemented by all children

@return An array of TestResults describing the results

start()

Run this node normally as a standard ROS node without any user interaction.

This function must be implemented by all children

clearpath_tests.canbus_test.main()