This page provides a detailed overview about the Catch & Handle Error Node.
Contents
Node Description
![CatchError 5 1.png](https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80072888470/original/sgMJOH98Fg_EbggaOPJPeF9Cyzh69ihjYQ.png?1643620357)
Catch & Handle Error
The Catch Error and Error Handler nodes are used to control the logic flow within a task for errors that have become active either by a Throw Error node or elsewhere in the system. A Catch Error node with a single Error Handler node as its child are automatically added to the task when either of these two types of nodes are inserted into the behavior tree. These nodes enable users to program specific responses to errors within a branch of a behavior tree. When the Error Handler node detects that an error has been thrown, the task will skip directly to this node and perform the actions which have been programmed as its children. The Catch Error node is required to indicate which branch of the behavior tree the task should scan to detect errors.
More information on the implementation of these nodes can be seen in the Error Handling tutorial.
Node Type
Composite - has 0 or more children, and is typically used to control the logical flow of execution of the tree.
Node Editor: Catch Error
- ID
Not editable
- Name
Auto generated and user editable
- Track cycle time
Determines the time it takes to execute and exit the Catch Error node. Creates a "cycleTime" variable under this specific Catch Error node in shared data.
- stop on failure
By default this is set to false meaning that the Catch Error node will not stop if any of its children return failure. Set this to true if the catch error node should end if a child returns failure.
- After handling an error
Selection to choose how the Catch Error node responds when it catches an error.
- Re-run child nodes - Selecting this will cause the task to re-run all of the child nodes to this Catch Error node.
- Exit to parent - Selecting this will cause the task to exit the Catch Error node and continue with the next logical branch of the behavior tree.
- Comments
User editable - add comments about this node.
Node Editor: Error Handler
- ID
Not editable
- Name
Auto generated and user editable
- Track cycle time
Determines the time it takes to execute and exit the Error Handler node. Creates a "cycleTime" variable under this specific Error Handler node in shared data.
- All
Choose to catch an error from all sources.
- Behavior tree
Choose to catch an error thrown in the behavior tree. Only thrown errors which are children of the same parent Catch Error node will appear. Errors thrown in other branches of the behavior tree will not appear.
- End Effector
Choose to select an available end effector error. Errors are useful for monitoring the state of an end effector.
- Device
Choose to select an available device error. Errors are available to detect signal and communication problems.
- Hardware
Choose to select an available hardware error. Enables the ability to detect and handle hardware errors within a task.
- Modbus
Choose to select an available Modbus error. Possible errors available for selection relate specifically to Modbus communication.
- Motion Controller
Choose to select an available motion controller error. Motion controller errors relate to the arm's trajectory and path.
- Collision
Choose to select an available collision error. Different levels of collision can be detected.
- Software
Choose to select an available software error. Software crash can be detected.
- Comments
User editable - add comments about this node.
Example
When the Error Handler node is used, the desired behavior response to an error can be specifically programmed and will only execute when the error is thrown. For example, error handling is often used to move the arm to a safe position or to alert the user to an operational anomaly that requires user intervention. The response may simply utilize a Wait Until node, or more complex behavior including Move To or Set To nodes to move the arm into a specific pose or set a signal. Using the node editor, select the error(s) which must be caught and handled. Build out the desired behavior when the error occurs by adding children to the Error Handler node. If the selected errors are thrown within that branch of the behavior tree, the Error Handler will detect this, skip to the bottom of this branch, and perform the desired behavior.
The information presented here is a high-level summary of common Catch Error / Error Handler node usage. A detailed description of the implementation of these nodes can be found in the Error Handling tutorial.
NOTE
- The Catch Error node provides a method to catch errors within a specific branch of the behavior tree. Only errors generated during the execution of the branch under (i.e. to the right) of the Catch Error node will be caught. By default, at least one Error Handler node will be created as a child of Catch Error node. Additional Error Handler nodes may be inserted to handle different errors separately as appropriate. Any Throw Error nodes to be handled by the Error Handler node(s) must be located within the Catch Error node branch.
- The Error Handler node will always be the last child node of the parent Catch Error with which it is associated. Because it must be the last child, it cannot be moved in Intera Studio using Shift + arrow keys.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article