ros2_control_hardware_interface

Scaffolds ros2_control hardware interface plugins with URDF wiring, controllers.yaml, and launch bringup.

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/three1324/yeonjinautomotive --skill ros2-control-hardware-interface-three1324
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ros2_control_hardware_interface
Source: https://github.com/three1324/yeonjinautomotive/tree/main/.claude/skills/ros2_control_hardware_interface
Command: npx skills add https://github.com/three1324/yeonjinautomotive --skill ros2-control-hardware-interface-three1324

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Integrating real robot hardware with ros2_control requires writing a pluginlib hardware component, wiring it into the URDF, and configuring controller bringup — a process with many subtle failure points like RT-safety violations and plugin name mismatches. This Skill guides you through the complete implementation so the hardware component works correctly with the controller_manager. ## Core Features & Use Cases - Hardware Plugin Scaffolding: Generate SystemInterface, ActuatorInterface, or SensorInterface implementations with correct lifecycle callbacks (on_init, on_configure, on_activate) and RT-safe read()/write() loops. - URDF and Pluginlib Wiring: Produce the <ros2_control> xacro tag, pluginlib export XML, and CMake/package.xml declarations with matching name aliases. - Bringup Configuration: Create controllers.yaml and launch files that start controller_manager, robot_state_publisher, and spawners in the correct order. - Use Case: You are connecting a custom motor driver board to a mobile robot. Use this Skill to generate a SystemInterface plugin that reads encoders in read(), sends velocity commands in write(), and bring it up with a diff_drive_controller. ## Quick Start Ask the AI to scaffold a ros2_control SystemInterface hardware plugin for your robot, including the URDF ros2_control tag, controllers.yaml, and launch file.

Frequently Asked Questions about ros2_control_hardware_interface

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

FAQPage Schema
How do I write a ros2_control hardware interface for my robot?

Create a class inheriting from hardware_interface::SystemInterface, implement on_init, on_configure, on_activate, read(), and write(), then export it with PLUGINLIB_EXPORT_CLASS. Wire it in the URDF with a <ros2_control> tag whose <plugin> name matches the pluginlib alias.

What is the difference between SystemInterface, ActuatorInterface, and SensorInterface in ros2_control?

SystemInterface represents a whole robot with joints and sensors, ActuatorInterface handles a single actuator, and SensorInterface is read-only and exports state interfaces only. Choose based on whether you integrate a full robot, one actuator, or a standalone sensor.

Why does my ros2_control hardware plugin fail to load?

Loading usually fails because the URDF <plugin> string does not match the pluginlib XML name alias or the PLUGINLIB_EXPORT_CLASS registration. Also verify base_class_type matches the actual interface class and that pluginlib_export_plugin_description_file is called in CMake.

Can read() and write() in ros2_control do blocking I/O or logging?

No, read() and write() run in the real-time loop and must avoid allocation, locks, exceptions, blocking I/O, and unthrottled logging. Open device handles in on_configure or on_activate and only poll or send pre-staged data in the loop.

How do I verify my ros2_control hardware bringup works?

Launch your bringup file, then run ros2 control list_hardware_interfaces to confirm your command and state interfaces appear as claimed or available, and ros2 control list_controllers to check controller states. Spawn joint_state_broadcaster before command controllers.