ArduPilot Quadplane SITL with VTOL model X-Plane 11/12

Hi Everyone,

I’m working on running ‘ArduPilot Quadplane SITL’ with a ‘VTOL model using X-Plane 11/12’. My goal is to use ArduPilot SITL with a custom VTOL model that incorporates X-Plane’s physics. To start, I first tested the setup with the existing Beta-Alia model in X-Plane 12, which is already compatible with ArduPilot SITL. This approach allows me to learn from the current setup and apply those insights to achieve my objective.

I followed @tridge video ArduPilot with XPlane12, flying the Alia , which demonstrates the process but lacks detailed initial steps for establishing the connection. I’ve used the default Alia model in X-Plane 12, built the code on my Linux system, provided the IP address, and used the xplane_plane.json file referenced in the demo and found in the ArduPilot examples tab. While the connection has been established and data communication is occurring (e.g., I can see Altitude and Attitude data), nothing appears in the X-Plane settings/Network/RECEIVE DATA FROM section, where it should show the port number of the system receiving the data.

I’m attaching a few screenshots to illustrate the connection status; these should serve as a reference for what I’m trying to explain.

Enabled DataRef and given output IP address


X-Plane network Tab showing the connection Status
Screenshot from 2024-08-09 16-49-41

Linux terminal running the code using command (sim_vehicle.py -v ArduPlane -f xplane --sim-address )

Mode changes and data from X-Plane are being updated.
Screenshot from 2024-08-09 16-50-16

With DataRef Debug enabled, I can see the data that is being transmitted.


When I run SITL from the MissionPlanner Simulation tab, it successfully connects and displays the IP address in the X-Plane settings/Network/RECEIVE DATA FROM section.

In both cases mentioned, I am unable to run the auto mission. Despite planning the auto mission, the X-Plane model neither reacts nor follows the mission. I’m unsure what might be going wrong. Is there something additional that needs to be done to execute the auto mission, aside from manual flying with the joystick connected to X-Plane?

I also tried the same with a custom VTOL model in X-Plane 11, but had no success.

ArduPlane Version: 4.4.0, 4.5.5 (Stable)
X-Plane Version: 11 (Licensed), 12 (Demo)
I’ve tried all possible permutations and combinations.

Could someone please assist me with this issue? Additionally, if possible, could you provide any relevant files, such as the X-Plane SITL parameter file for the Beta-Alia?

@tridge @peterbarker @amilcarlucas @Albcem @Gary_Mortimer @iampete @rmackay9 @Georacer @nhadrian

Please let me know if I’ve missed any details that could assist you in addressing this issue. I would greatly appreciate any guidance you can provide, as your help would be extremely valuable.

Thanks & Regards,
Monesh Pasupureddy

@tridge i am also facing the same issue and unbale to identify the cause for this.

@Monesh @Yovan_Kumar I just tried latest master with the Alia in the latest X-Plane 12 and it works fine for me.
The exact networking setup you need in X-Plane12 depends on how you are running SITL. I usually run SITL with sim_vehicle.py on my Linux machine and X-Plane12 running on my windows box.
To do that I use the following XPlane-12 settings:
image
the IP 192.168.2.15 is my linux machine. If running locally on a single box then it would be 127.0.0.1
then in the data output you have to enable at least one output on the network:


if wokring correctly as soon as you click to enable a single output (eg. Times) then ArduPilot will get it’s first packet and will then auto-reconfigure all of the outputs to what ArduPIlot needs. It just needs that first packet so it knows where to send the config commands to.
Here are the parameters I just tested with:
alia.parm (3.3 KB)

1 Like

Hello @tridge

Thank you for your reply. I’ll give it a shot and follow up with you.

Best Regards,
Monesh Pasupureddy

Hello @tridge

I’m still having trouble getting Auto-mission to work. Here’s a detailed rundown of my setup:

  1. I cloned the ArduPilot master branch (4.6.0 dev) from GitHub onto my Linux machine.
  2. I updated the submodules and installed the required environment for Ubuntu using:
    • git submodule update --init --recursive
    • Tools/environment_install/cd Tools/environment_install/install-prereqs-ubuntu.sh
  3. I modified the ‘xplane_plane.json’ file in ‘autotest/models’, using ‘libraries/SITL/examples/XPlane/xplane_alia.json’ as a reference.
  4. I set up X-Plane 12 demo version on my Windows system, configuring the ports and IP address

Linux machine IP: 192.168.7.198
Windows system IP: 192.168.7.190
Two separate systems connected on same network.

  1. X-Plane configuration: In ‘Settings/DataOutput/General Data Output/’ enabled send network data output and assigned IP address: 192.168.7.198 (Linux machine), Port 49001.

  2. In ‘X-Plane/Settings/Network/UDP PORTS’:
    Screenshot 2024-08-13 103213

  3. I ran ArduPilot SITL on the Linux machine with the command: ‘sim_vehicle.py -v ArduPlane -f xplane

  4. I connected Mission Planner for Auto-mission planning and uploaded the parameter file you provided.


Data is being updated in the Mission Planner.

  1. While we receive an acknowledgment of data being sent, there’s no indication that X-Plane is receiving it.
    image

Despite following these steps, Auto-mission isn’t working.

→ One more thing I want to highlight is that when we adjusted the UDP Rate in the General Data Output tab, the RECEIVING DATA FROM status started showing “Connected”, but the link kept breaking and reconnecting.
→ Randomly, at 8.4 packets/sec (UDP Rate), X-Plane started responding to the modes, and I was able to fly the Alia model in QHover, QLoiter, and a few fixed-wing modes. However, when I retried the same setup again, it failed to follow the modes from the MissionPlanner commands as mentioned earlier.

Do we need to enable data output from Dataref read/write as well? Is there something I might have missed in the setup?

Any suggestions or adjustments would be greatly appreciated.

Best Regards,
Monesh Pasupureddy

the most likely reason for a one way link is firewall settings on windows. Try disabling the firewall

Hello @tridge , you’re correct. The one-way communication issue was due to the firewall; disabling it resolved the problem, and now X-Plane is receiving commands from ArduPilot via MissionPlanner.

I can change modes and observe that the X-Plane Alia model responds correctly, even in Auto mode. I’ve used the parameters you provided earlier alia.parm (3.3 KB).

  • The quad motors continue to rotate even after receiving the transition completed message. I have verified the assist parameters, and they appear to be correct.
  • During the transition, after reaching approximately 17 m/s, the aircraft begins to gain altitude regardless of the commanded height.
  • The aircraft is unable to reach the target cruise speed of 52 m/s for the Alia model, instead flying at 30-33 m/s during the AutoMission.

Could you please assist me in identifying the cause of these issues? Resolving them is crucial as a benchmark before proceeding and applying the insights from this setup to run my custom VTOL X-Plane model.

It must work, this my test 8 months ago.
If you can’t you are leaving something out.
The parameters are as used by @tridge.

1 Like