custom-bt-action-cpp

Creates reusable C++ BTPageActionNode bases for Nav2 action servers with ROS 2 integration workflows.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bridges BehaviorTree.CPP with ROS 2 action servers by providing a template base class BtActionNode that handles action client lifecycle, goal sending, feedback monitoring, and result processing.

Core Features & Use Cases

  • BT Action Node Template: Provides a reusable base class to implement new ROS 2 action clients within Nav2 BTs.
  • Ports & Lifecycle: Demonstrates how to expose ports, configure goal fields, and handle results via on_success/on_aborted/on_cancelled.
  • Plugin Registration & Build: Includes example code for registering the node with BT factory and loading into Nav2 bt_navigator.
  • CMake & Build Integration: Shows required dependencies and install targets for building a shared library.
  • Use Case: Create a custom SaySomething action node to connect an action server to a BT.

Quick Start

Compile the custom BtActionNode into a shared library and register it with Nav2 so it can be loaded by the bt_navigator.

Frequently Asked Questions about custom-bt-action-cpp

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

FAQPage Schema
How do I create a custom BT action node for Nav2 in ROS 2?

To create a custom BT action node for Nav2, use a reusable BtActionNode base class template that handles the ROS 2 action client lifecycle, goal sending, feedback monitoring, and result processing within BehaviorTree.CPP.

How does a ROS 2 behavior tree action plugin connect to an action server?

A ROS 2 behavior tree action plugin connects to an action server by implementing a BtActionNode base class that manages the action client lifecycle, sends goals, monitors feedback, and processes results through on_success, on_aborted, and on_cancelled callbacks.

What's the best way to register a custom action plugin with Nav2 bt_navigator?

The best way to register a custom action plugin with Nav2 bt_navigator is to compile your BtActionNode implementation into a shared library, register it with the BT factory, and configure the required CMake dependencies and install targets for on-demand loading.

Can I use BehaviorTree.CPP to expose ports and handle goal fields in Nav2?

Yes, you can use BehaviorTree.CPP to expose ports and handle goal fields in Nav2 by leveraging a BtActionNode template that demonstrates how to configure goal fields, define input/output ports, and manage lifecycle callbacks for action servers.

Do I need CMake to build a ROS 2 behavior tree action node shared library?

Yes, you need CMake to build a ROS 2 behavior tree action node shared library because it specifies the required dependencies, install targets, and build integration steps needed to load the custom plugin into Nav2 bt_navigator.