mc_rtc::Configuration
general purpose configurationIn mc_rtc, every interface uses the mc_control::MCGlobalController
class to initialize and run the controllers in the framework. In particular, they will run the mc_control::MCGlobalController::run()
function on every iteration.
The plugin system allows one to write a component that will run at the start and/or end of this run function.
These plugins can be used for a variety of purpose:
The new plugin tutorial provides more information on writing plugins for mc_rtc.
The plugins’ documentation should provide information about available options and usage. This tutorial is focused on enabling and configuring these plugins.
Plugins can be added to the Plugins
list in mc_rtc configuration. For example:
Plugins: [Joystick, OculusVR]
The plugins listed in this configuration are enabled regardless of the controller that is selected.
The following two files will be read by mc_rtc (if they exist):
${PLUGIN_RUNTIME_INSTALL_PREFIX}/etc/${PLUGIN_NAME}.yaml
$HOME/.config/mc_rtc/plugins/${PLUGIN_NAME}.yaml
%APPDATA%/mc_rtc/plugins/${PLUGIN_NAME}.yaml
Where ${PLUGIN_RUNTIME_INSTALL_PREFIX}
is ${INSTALL_PREFIX}/lib/mc_plugins
on Linux/macOS and ${INSTALL_PREFIX}/bin/mc_plugins
on Windows.
Plugins can be enabled for a given controller by adding a Plugins
entry in the controller’s configuration.
In addition to the global configuration files, the following files are also considered for the plugin configuration when it is enabled by a controller (if they exist):
${CONTROLLER_RUNTIME_INSTALL_PREFIX}/etc/${CONTROLLER_NAME}/plugins/${PLUGIN_NAME}.yaml
$HOME/.config/mc_rtc/controllers/${CONTROLLER_NAME}/plugins/${PLUGIN_NAME}.yaml
%APPDATA%/mc_rtc/controllers/${CONTROLLER_NAME}/plugins/${PLUGIN_NAME}.yaml
Where ${CONTROLLER_RUNTIME_INSTALL_PREFIX}
is ${INSTALL_PREFIX}/lib/mc_controllers
on Linux/macOS and ${INSTALL_PREFIX}/bin/mc_controllers
on Windows.