Modifying LiftDrag Plugin of Gazebo Ignition and PX4


I used to work with the lift drag plugin before the official Gazebo simulation for PX4 was migrated to Gazebo Ignition. It appears that the lift drag model does not implement aerodynamic model change due to elevon deflection change. I want to help fix this but the plugin code is not where it used to be. How can I help contribute to this plugin, and how do I make a new one?

Hello Lum:

Great that you are moving to use the new Gazebo. For search the code across all the libraries, you can checkout the whole source code of a given Gazebo collection (i.e Gazebo Harmonic) by doing:

# Install vcstools
vcs import < collection-harmonic.yaml

The gazebodistro repo hosts the code configurations used for the existing releases.

In your particular case, there is a LiftDrag plugin on the gz-sim repository and an AdvanceLiftDrag plugin in the same repository.I also see varios worlds in the example directory of gz-sim that uses the plugin.

Hope it helps.

1 Like

Thank you jrivero. The plugin source is indeed there. At first I thought that in order to modify the aerodynamics plugin I must modify the plugin source code and build the entire gz-sim and link that to PX4. But then I found that I probably just have to compile the plugin separately and copy the resulting dynamic library file to one of the the plugin search paths (in my case ~/.gz/sim/plugins) to link my plugin to a vehicle model. I will try this tomorrow. Thanks again.

Using the whole gz-sim source tree to modify a plugin could make sense if you need to modify or debug code that does not belong to your plugin (other plugins or core components of gz-sim). As you said, it is perfectly possible to develop or modify a plugin out of the gz-sim source tree. For building this option you can checkout the hello world plugin code that should help with CMake and to run the development plugin directing from the building space.

1 Like

Thank you. That really helps.

1 Like