AtsushiSakai/PythonRobotics · error · ValueError

Node is not implemented

Error message

Node is not implemented

What it means

Raised by Node.tick, the base-class implementation in the behavior tree. Node is abstract; ticking it directly means no behavior was defined, so it deliberately raises to signal an unimplemented node.

Source

Thrown at MissionPlanning/BehaviorTree/behavior_tree.py:44


class Node:
    """
    Base class for all nodes in a behavior tree.
    """

    def __init__(self, name):
        self.name = name
        self.status = None

    def tick(self) -> Status:
        """
        Tick the node.

        Returns:
            Status: The status of the node.
        """
        raise ValueError("Node is not implemented")

    def tick_and_set_status(self) -> Status:
        """
        Tick the node and set the status.

        Returns:
            Status: The status of the node.
        """
        self.status = self.tick()
        return self.status

    def reset(self):
        """
        Reset the node.
        """
        self.status = None

    def reset_children(self):

View on GitHub (pinned to 1fe4fb980f)

Solutions

  1. Subclass a concrete node type (ActionNode, DecoratorNode, ControlNode) and implement tick().
  2. If you subclass Node directly, override tick to return a Status.
  3. Check that your custom node class actually defines tick before adding it to a tree.

Example fix

// before
class MyNode(Node):
    pass  # no tick

// after
class MyNode(ActionNode):
    def tick(self):
        return Status.SUCCESS
Defensive patterns

Strategy: type-guard

Type guard

import inspect
from MissionPlanning.BehaviorTree.behavior_tree import Node

def is_tickable(n) -> bool:
    return type(n).tick is not Node.tick

Try / catch

try:
    node.tick_and_set_status()
except ValueError as e:
    if 'not implemented' in str(e):
        raise TypeError(f'{type(n).__name__} must implement tick()')
    raise

Prevention

When it happens

Trigger: Instantiating the base Node class (or a subclass that overrides __init__ but not tick) and calling tick() or tick_and_set_status() on it.

Common situations: Creating custom action/decorator nodes and forgetting to implement the tick method, or accidentally instantiating Node instead of ActionNode/SequenceNode.

Related errors


AI-assisted analysis of AtsushiSakai/PythonRobotics@1fe4fb980f (2026-08-28). Data as JSON: /api/errors/d76fe8b9d62916e3. Report an issue: GitHub.