Ros Parameters¶
When designing your own component, it will often happen that you will need to load many parameter for a specific component (e.g. model parameters).
In order to simplify parameter loading, we recommend to use the following setup:
- Create a struct containing all your parameter information (e.g.
pid_controller_params.h) -
Instantiate a template of the function
T getConfig(const ros::NodeHandle& nh)located atros/ros_crs_utils/include/ros_crs_utils/parameter_io.h.
Example: -
Whenever you need to load the parameters, use