bt-xml-fundamentals

Validate BT.CPP v4 XML files for ROS 2 behavior trees.

18|2|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill bt-xml-fundamentals
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bt-xml-fundamentals
Source: https://github.com/wimblerobotics/ros2-copilot-skills/tree/main/bt-xml-fundamentals
Command: npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill bt-xml-fundamentals

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Author and validate BehaviorTree.CPP v4 XML files for ROS 2, enabling correct tree definitions, port wiring, and includes for modular behavior trees.

Core Features & Use Cases

  • XML root structure and BTCPP_format versioning for v4 compatibility.
  • Node categories, port definitions, and blackboard syntax with runtime remapping.
  • XML includes and Groot2 TreeNodesModel metadata for editor visualization.

Quick Start

Create a minimal BT.CPP v4 XML file with a single BehaviorTree and a root that specifies BTCPP_format="4" and main_tree_to_execute.

Frequently Asked Questions about bt-xml-fundamentals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define a valid BehaviorTree.CPP v4 XML file for ROS 2?

A valid BT.CPP v4 XML file requires a root structure declaring BTCPP_format="4" and a main_tree_to_execute attribute, enabling proper behavior tree composition and execution in ROS 2.

What is the correct XML syntax for blackboard remapping in BT.CPP v4?

Blackboard remapping in BT.CPP v4 uses port definitions with runtime remapping attributes within XML nodes, enabling dynamic data passing between behavior tree nodes during ROS 2 execution.

Does Groot2 require specific XML metadata for visualizing ROS 2 behavior trees?

Yes, Groot2 requires TreeNodesModel metadata sections within the XML to correctly visualize and edit ROS 2 behavior trees, ensuring node definitions and ports render properly in the editor.

How do I use XML includes to build modular behavior trees in BT.CPP v4?

XML includes let you import external behavior tree definitions into a main BT.CPP v4 file, enabling modular tree composition by referencing shared node definitions and subtrees across ROS 2 projects.

Why does my ROS 2 behavior tree XML fail validation due to missing TreeNodesModel?

Validation fails when XML lacks a proper TreeNodesModel section or correct BTCPP_format versioning, which are required to enforce valid node definitions and ensure Groot2 editor compatibility.