Error Handling

Robot fault and error messages

It is recommended to always check if the robot is in fault state using Robot::fault() before enabling the robot. During runtime, if a fault occurred on the robot, Robot::fault() will return true and the error message from the robot will be printed by RDK. Important log messages from the robot will be cached by RDK and can be accessed via Robot::mu_log(), which includes the aforementioned error message as well as other important info and warning messages.

Robot operational

After releasing E-Stop and sending enabling command to the robot, it will take several seconds to release the brakes and become operational. Use Robot::operational() to check if the robot is ready before sending any user commands.

Critical fault

After the robot is enabled, its certified safety system will constantly monitor the robot to make sure it always operates under the predefined safety limits such as joint torque/position/velocity limit, TCP force/position/velocity limit, robot power and momentum limit, etc. Any violation to the safety limits will trigger a critical fault, also known as the Category 0 Stop, or CAT0 Stop. If triggered, the robot’s main drive power will be cutoff instantly and all joint brakes will engage. In order to re-run the robot, you need to try to clear the critical fault first without a power cycle using Robot::ClearFault(), which can hot reset the safety system and takes about 30 seconds. However, for older models that do not support hot reset, a power cycle is mandatory. In addition, based on the type of critical fault occurred, a recovery operation may be needed. See Recover from joint position limit violation for more details.

Minor fault

Besides critical faults triggered by the safety system, there are also minor faults that are triggered from the robot software. They are often related to unreasonable user commands or invalid program workflow. Such minor faults will not lead to a power cut nor system lock-down, and can be quickly cleared via Robot::ClearFault(), which takes less than 3 seconds.

Recover from joint position limit violation

The Critical fault section above mentioned that violating any of the safety system limits will lead to a critical fault that requires a hot reset or power cycle, which should clear the fault in most cases. However, there’s one special case: the violation of the joint position limit. When this happens, resetting the system won’t change the fact that one or more of the joints is at a position outside the allowed safe region. Therefore, after resetting, the safety system will enter recovery state, in which it requires the user to figure out a way to move the violating joint(s) back into the allowed safe region. This can be easily done with the help of Flexiv RDK’s automatic recovery function:

  1. Keep the mode selection switch on the motion bar at the upper position (i.e. Auto mode).

  2. Hot reset or power cycle the system.

  3. Release E-stop as usual.

  4. Run the example program basics7_auto_recovery, C++ or Python.

  5. Wait for all violating joints to move back to safe region.

  6. Press down E-stop, then do another hot reset or power cycle, after which the robot can be normally operated.