# custom\_action.md

To create a custom action node, you must define your node class by inheriting from the superclass that defines a generic action node.

You also must include the `execute` function as the "tick" function that performs the actions of the node.

Here is an example of a custom action node:

```
from ...nodes.action import Action

class MyActionNode(Action):
    def __init__(self):
        super().__init__()
    
    def execute(self, blackboard: dict) -> str:
        ...
```

This type of node will return one of the following string values: `"success"`, `"failure"`, or `"running"`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://campus-rover.gitbook.io/lab-notebook/fiiva/our-ros-packages/behavior_trees/custom_nodes/custom_action.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
