Robotics

Nav2 BT Editor brings visual behavior tree editing to VS Code

Edit and preview Nav2 behavior trees without leaving VS Code or opening Groot.

Deep Dive

DavidG-Develop has launched Nav2 BT Editor, a VS Code extension designed to streamline the editing and preview of BehaviorTree.CPP and Nav2 XML behavior trees. The tool addresses a common workflow gap: while Groot is powerful for large-scale tree design, it can feel heavy for quick previews or small adjustments. Conversely, editing raw XML becomes unwieldy as trees grow. This extension bridges that gap by providing a lightweight, visual editor directly inside VS Code, allowing developers to inspect, rearrange, and fine-tune trees without switching contexts.

The extension supports a range of practical features: drag-and-drop node reordering, attribute editing with automatic XML write-back, importing TreeNodesModel definitions from local files or URLs, and integrating external behavior trees as reusable SubTree templates. It also includes basic malformed XML detection to prevent misleading previews. Developers can navigate subtrees one at a time or expand them inline, and change node types when compatible. While Nav2 BT Editor does not tick or execute trees—it remains a preview and editing tool—it significantly reduces friction for ROS 2 developers working with navigation behavior trees. The project is open source and available on the VS Code Marketplace under the ID davidg-develop.vscode-nav2-bt-editor.

Key Points
  • Edit node attributes and write changes back to XML directly from the visual graph.
  • Import TreeNodesModel files from local paths or URLs to define available node types.
  • Drag and drop nodes to reorder them or move between valid parent nodes with visual feedback.

Why It Matters

Streamlines tuning and inspection of complex navigation behavior trees for ROS 2 developers.

📬 Get the top 10 AI stories daily