ros2_control: Setup controller package
This use-case describes how to set up a controller for the ros2_control
framework using scripts from ROS Team Workspace (RTW) framework.
The scripts uses template files from
templates/ros2_control/controller folder.
The script creates a full skeleton of a controller with plugin description
and tests for loading controller and checking its basic functionality.
Note
it is recommended to setup your package using setup-new-package script.
Warning
The script has to be executed in the root folder of the ament_cmake package where the controller files are to be generated.
Usage
ros2_control_setup-controller-package FILE_NAME [CLASS_NAME]
Parameters:
FILE_NAMEfile name used for controller’s.cppand.hppfiles. It assumes standard ROS format, e.g, “my_cool_controller”.
CLASS_NAMEoptional name used for controller class. If not set, it is guessed by camel-casing the file name.
The script will ask for some additional input.
The package name is obtained from the ‘package.xml’ file.
After all files are copied and placeholders set, changes are automatically staged in git.