Package: gazebo-scenario-plugins
:warning: This repository is still experimental, expect bugs and breaking changes :warning:gazebo-scenario-pluginsIgnition Gazebo Plugins implemented withScenarIO.PluginsNameDescriptionActuationDelaySimulate actuation delay inserting the targets (joint references) into a FIFO buffer.LowPassTargetFilter the joint targets (references) with a configurable Butterworth low-pass filter.Dependenciesgazebo-scenario-pluginsexpects to find installed and configured the following dependencies:ignitionrobotics/ign-gazeborobotology/gym-ignitionVisit thegym-ignitionrepository to check what Ignition distribution is currently supported.InstallationInstall only the C++ resources with:gitclonehttps://github.com/dic-iit/gazebo-scenario-pluginscdgazebo-scenario-plugins
cmake-S.-Bbuild
cmake--buildbuild/--targetinstallor the complete C++ and Python resources with:pip3installgazebo-scenario-pluginsSystem configurationIf you have installed only the C++ plugins, make sure to add the install prefix to theIGN_GAZEBO_SYSTEM_PLUGIN_PATHenvironment variable. This way, Ignition Gazebo will automatically find the plugins without the need to specify the absolute path to their library.If, instead, you rely to thegazebo-scenario-pluginsPython package, it will automatically configure the environment right after it isimported into your project.UsageThe plugins stored in this repository can be inserted in a simulated world either by including them in the SDF file, or by loading them programmatically from either C++ or Python using the ScenarIO APIs.The three pieces of information you need to know for loading plugins are the following:lib_name: the OS-agnostic name of the plugin library. E.g., if the plugin file islibActuationDelay.so, the library name isActuationDelay.class_name: the name of the class implementing the plugin. E.g.gsp::ActuationDelay.Plugin context: the configuration options of the plugin.From the sdfSelect the plugin you want to add and use the following template to add it to the SDF element they correspond (world, model, joint, ...).<pluginfilename="<lib_name>"name="class_name"><!-- Optional XML plugin context --><optional_config1>bar</optional_config1><optional_config2>42</optional_config2><optional_config3>l1l2l3l4</optional_config3></plugin>From C++You can use from your C++ code any of the following methods:scenario::gazebo::World::insertWorldPluginscenario::gazebo::Model::insertModelPluginscenario::gazebo::utils::insertPluginToGazeboEntityRefer to theScenarIO  C++ APIs documentationfor more details.From PythonThe low-level APIs to load plugins from your Python code match almost 1:1 the C++ usage:scenario.bindings.gazebo.World.insert_world_pluginscenario.bindings.gazebo.Model.insert_model_pluginscenario.bindings.gazebo.insert_plugin_to_gazebo_entityRefer to theScenarIO Python APIs documentationfor more details.In addition to the low-level APIs, this repository provides agazebo_scenario_pluginsPython package that includes helper classes that simplify building the plugin context. Refer to thegazebo_scenario_plugins.pluginsmodule for more details.ContributingPull requests are welcome.For major changes, please open an issue first to discuss what you would like to change.LicenseLGPL v2.1or any later version.