clearpath_tests.mcu_test module

class clearpath_tests.mcu_test.McuTestNode(*args: Any, **kwargs: Any)

Bases: ClearpathTestNode

Check that the MCU is connected.

check_serial_exists(device)

Check that a serial device exists on the system.

Also checks that we have read/write permissions to the device

@param device The serial device handle (e.g. /dev/ttyUSB0)

@return True if the handle exists, otherwise False

check_serial_permissions(device)

Check that we have read/write permissions to the device.

@param device The serial device handle (e.g. /dev/ttyUSB0)

@return True if we have RW permissions, otherwise False

get_firmware_version()

Get the MCU version and hardware ID.

@return A tuple of the form (hardware_id, firmware_version)

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

ping_ip(address)

Attempt to ping an IP address.

We ping 10 times, and accept a 50% response as the minimum

@param address The IP address to ping

@return True if the address is pinged successfully, otherwise False

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.mcu_test.main()