Gazebo easiest way to apply preload force on a model programmatically?
I am implementing a feature that exports robot models to Gazebo. One of the the features that you the CAD software I am using has is the ability to designate spring joints that will have a force applied to them as soon as the simulation starts. I have found several ways to apply forces including via ROS, URDF, and plugins. However, ROS would require running a separate program or script and using plugins would require me to effectively have the program generate and compile cc++ code, which would not be an easy feat. As such, I am wondering what would be the best way to apply a force on the joint at the start of the simulation?
Is there a way I can parametrize plugins from gazebo? For instance, compile a generic plugin file and then have commandline arguments to specify which joints receive how much force? Or would I have to go and using scripting and other features to both write and compile plugins for any model that uses this feature?