custom-controller-plugin

Implement a custom Nav2 controller plugin using the nav2_core::Controller interface.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a blueprint to implement and expose a custom Nav2 controller plugin that extends the Nav2 navigation stack with a new local controller.

Core Features & Use Cases

  • Extensible: Implement and register a custom controller plugin that integrates with the Nav2 lifecycle and plugin system.
  • Interoperability: Works with local costmaps, TF transforms, and global plans to produce velocity commands.
  • Use Case: Build a domain-specific controller for a differential-drive robot that adheres to the Nav2 controller interface and can be swapped at runtime.

Quick Start

Author a new controller by creating a class that inherits from nav2_core::Controller, implement the required methods, and register the plugin with pluginlib so that the Nav2 system can load it at runtime.

Frequently Asked Questions about custom-controller-plugin

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

FAQPage Schema
How do I create a custom controller plugin for Nav2 in ROS 2?

A Nav2 controller plugin must implement the nav2_core::Controller interface, including configure, cleanup, activate, deactivate, setPlan, setSpeedLimit, and computeVelocityCommands methods to produce velocity commands from global plans and local costmaps.

What methods do I need to implement for a Nav2 controller plugin?

A Nav2 controller plugin must implement the nav2_core::Controller interface, including configure, cleanup, activate, deactivate, setPlan, setSpeedLimit, and computeVelocityCommands methods to produce velocity commands from global plans and local costmaps.

Can I use a custom Nav2 controller with a differential-drive robot?

Registering a controller plugin involves using pluginlib macros to export the class, updating CMakeLists to build the shared library, and ensuring package.xml declares the necessary dependencies for Nav2 to load it at runtime.

How do I register a controller plugin with pluginlib in ROS 2?

Registering a controller plugin involves using pluginlib macros to export the class, updating CMakeLists to build the shared library, and ensuring package.xml declares the necessary dependencies for Nav2 to load it at runtime.

Does a custom Nav2 controller work with local costmaps and TF transforms?

You should use a custom Nav2 controller plugin when the default controllers fail to meet domain-specific local navigation needs, enabling tailored velocity command generation that integrates natively with Nav2 lifecycle management.

When do I need a custom controller plugin instead of default Nav2 controllers?

You should use a custom Nav2 controller plugin when the default controllers fail to meet domain-specific local navigation needs, enabling tailored velocity command generation that integrates natively with Nav2 lifecycle management.