Directory Structure
The controllers of different State, Input, Controller_Type are defined in this directory:
The folder structure¶
controller_common.h- platform I (e.g. car vs. rocket)
- state_A-input_A
typedef.h- controller_1.h
- controller_2.h
- ...
- state_A-input_B
typedef.h- ...
- platform II
- state_C-input_C
- ...
Explanation:
- Common imports, such as the ROS Controller interface, or visualization loading, is included in the
controller_common.hfile. - The shorthand type definitions for controllers of the same state and input types are put in the
typedef.hfile in eachPlatform/State_Input_Typefolder (i.e. thestate_A-input_Bin the example above). Thecontroller_common.hshould be included in each of these files. - The controller specific definition are in its own file. The types and common stuff are imported via including
typedef.h. It also imports its actual controller definition (e.g. fromsrc/crs) and the dynamic server options if needed.
Use of a (new) controller¶
After adding the controller file (also typedef file if necessary), include the header in controller_node.cpp file, where the branching is determined on which controller to use.
Remarks¶
Re: the [XXX]Config.h files for Dynamic Config Servers (exists for some controllers)¶
The magical [XXX]Config.h files being included, which does not seem to be in the source files, are generated from .cfg files in the ros_controllers/cfg folder.
- e.g.
ff_fb.cfgfile will generate aff_fbConfig.hfile