Servers by jDrones

Ardupilot_Gazebo Plugin for a tiltrotor model

I’ve created a custom tilt rotor model in gazebo and can successfully connect it with the gazebo SITL. The model is a quadplane (which will have a wing in the future) and each motor arm is able to tilt forwards to transition to fixed wing flight.

The model examples that come with the plugin demonstrate how to spin a propeller but not control the angle of a joint.

In my model SDF file, how do I tell Gazebo to take the command from Ardupilot SITL and turn it into motor arm angular position? (eg 0 degrees is when the motor arm is vertical and 90 degrees is when the motor arm is tilted forward for fixed wing flight).

Thanks in advance!

Hi @juzzy,
Have you tried to make a joint a the position where you want to the motor to tilt.
Then you have to associate the right channel from ardupilot plugin with the right servo function in your param file.
See this at SERVOX_FUNCTION (choose X=1 to 16):
and also this:

Servers by jDrones