Motivation
There are many configuration files baked in the mrs_uav_core and other packages of the system. They contain many options for modifying the behavior of the system and users are encouraged to configure the system to their needs. In this tutorial, we provide an efficient way ho customize the configuration without the need to change any files within the installed system.
The concept of a custom config file
Each launch file within our system loads appropriate config files from its package. Changing these config files directly is not recommended as well as copying them elsewehere and changing the launch file. Instead, a parameter can be used to pass a custom config file that only overrides the values that the used wants to change relative to the defaults. This mechanism allows the user to store the changes locally. In general, our launchfiles accept the argument
custom_config:=<path to the file>
which is used to pass the path to the custom config.
core.launch configs
The MRS UAV System is launched throught the core.launch
launch file.
The core.launch
requires the following 2 custom configuration files:
The Platform Config
This file is supposed to override the defaults for a particular UAV platform. Usually, this file is provided by us with each simulated (and realword) UAV. The platform configs are stored in a location logically close to the source of the simulated UAV, e.g.,
- In mrs_uav_gazebo_simulation for our Gazebo simulation,
- In mrs_multirotor_simulator for our MRS simulation,
- In mrs_uav_coppelia_simulation for our Coppelia simulation,
- In mrs_uav_dji_tello_api for our DJI Tello interface.
- In mrs_uav_deployment for our realword drones.
The Custom Config
This file is dedicated for the user's relative changes to the default configuration that was already modified by the platform config.
Which parameters can be changed?
All parameters that can be changed by the users can be listed by
rosrun mrs_uav_core get_public_params.py
The parameters are obtained from the currently installed packages from the system, so the list is always going to be compatible with your current installation.
For convenience, the parameters can be piped into a file and later inspected:
rosrun mrs_uav_core get_public_params.py > /tmp/params.yaml
or piped to less:
rosrun mrs_uav_core get_public_params.py | less
or piped to vim:
vim <(rosrun mrs_uav_core get_public_params.py)
Example
All the example tmux sessions that we provide are already pre-set with the platform configs and the custom config file.