Resetting Errors

The process of resetting errors varies depending on the type of robot arm in use.

Warning

As this is a safety-critical task, there may be certain restrictions that apply. Be very careful with the programmatic resetting of errors.

Additionally, the error state and its reset procedure can be influenced by the overall system, of which the robot arm is a component.

In some cases, the robot control may not have the capability or authorization to reset an error. For example, in the case of the voraus.core, where the error state is shared across multiple subsystems, the robot control cannot directly reset the error. Instead, the error must be cleared by following the specific reset procedure for the voraus.core, which involves invoking a dedicated error handler.

Resetting Errors on the voraus.core

Although the communication with the voraus error handler falls outside the scope of this library, this functionality is nonetheless provided for convenience.

In order to reset an error when working with a voraus.core instance, communication to the voraus error handler is necessary. This library provides a ready-to-use class for this purpose, the VorausErrorHandler. This class provides a connect() method that expects the host (e.g. IP address or hostname) of the voraus error handler OPC UA server and its port. It should be used as a context manager in order ensure that the connection is properly closed upon shutdown:

error_handler = VorausErrorHandler()

with (
    robot.connect(VORAUS_CORE_HOST, VORAUS_ROBOT_CONTROL_PORT),
    error_handler.connect(VORAUS_CORE_HOST, VORAUS_ERROR_HANDLER_PORT),
):

After that, the connection is established and the reset_error() method can be called. This method blocks until the error is reset, otherwise an exception is raised. The timeout for how long to wait can be provided as an argument. In order to be able to check whether the error was actually reset, the relevant robot instance must be passed as an argument. As a result, it is guaranteed that the error is reset after reset_error() returned:

assert robot.get_lifecycle_state() == LifecycleState.ERROR

error_handler.reset_error(robot)

assert robot.get_lifecycle_state() == LifecycleState.CONNECTED

The following is an example how it can be used to reset an error.