X-Plane not sending heartbeat packets

I am trying to run a SITL simulation with X-Plane. I have gone the “Using SITL from MissionPlanner” route and the “Using SITL with sim_vehicle.py” route and they both end with a “No Heartbeat Packets Received” error. I am guessing I have not set up X-Plane correctly…

Here are (what I think are the relevant) details of my X-Plane set up. Feel free to let me know if you need more info.

I have a demo of X-Plane 11 running on a Mac and I have either Mission Planner running on Windows or the sim_vehicle.py script running on a linux machine on the same WiFi network as the Mac running X-Plane.

Screen-grabs from X-Plane: https://photos.app.goo.gl/m05ZtyRyZAUGHtIb2.

The aim is to get X-Plane receiving data from a SITL application, ideally from the sim_vehicle.py option. Please let me know if you need any more info about my setup.

Xplane settings looks good, maybe windows firewall (or what do You have) block connection from mac, I had similar problem, when I used 2 laptops. Try to turn it off and ping them each other. (I assume that 192.168.0.1 is IP of windows machine with cygwin and mission planner.) I send values with indexes of 1,3,4,8,13,16,17,20,21,25,29,37,38,39,58 (and I think some of them are not needed).

Nikita

Apologies for the delayed reply.
I have tried to ping the address it is listening for a heartbeat and I am getting a response, so it looks like nothing is blocking the packets :frowning:

Maybe you should try to run the script first (sim_vehicle.py) and let the mavproxy console appear and standby , then open Xplane, then connect Mission Planner.

And I think the correct UDP port setting is:
Port we receive on: 49000
Port we send from: 49002
source: http://ardupilot.org/dev/docs/soaring-sitl-with-xplane.html

Update the ports, no luck. :frowning:

I have installed x-plane 10 as most of the documentation have screenshots of x-plane 10.

I noticed on the x-plane log that it is “Sending to date output at IP addresses 192.168.0.1 …” And then later we have a setting for “IP for data output” set to 192.168.0.1 and port 49001.

But when I run the sim_vehicle.py scrips on the MAV console I get the message “Waiting for heartbeat from 127.0.0.1:5760”

How do I get the sim_vehicle.py to listen to 192.168.0.:port 49001 ? Do I need to edit the python script :open_mouth: ?

Everything is mixed in Your post, can You state where do You run Sitl, xplane and gcs? As of today I ran Sitl on my main laptop (via waf), xplane on my main laptop, connected to him with mavproxy and restream it to another pc with mission planner. So I can see xplane on my main laptop and control sitl with another local pc with MP.

I think you can pass an argument to mavproxy via sim_vehicle.py
with -m option, and “–master=udp:192.168.0.1:49001”

Or edit sim_vehicle.py at this line: https://github.com/ArduPilot/ardupilot/blob/90ca9626cca7b4bbfc016643e5ddf1db0e05d5c1/Tools/autotest/sim_vehicle.py#L927

reference:


https://ardupilot.github.io/MAVProxy/html/getting_started/starting.html

You are wrong on this, ports for Xplane are coded in firmware of ardupilot

This params of Mavproxy which You show are for Mavlink input, xplane doesnt generate them.

I am sorry for my fault. Thank you for the knowledge.
So to run x-plane and sitl on different computer, we should edit the SIM_XPlane.h, and for running sitl and mission planner on different computer, we just need to change the ip address and port from mission planner “connect” window and fill it with the output port of mavproxy, right?

That is too complicated, just start sitl+xplane on one machine, and stream to anywhere You want.

So I just tested 2 different pcs. I run Sitl with waf on my laptop and my friend on the other side of the city runned xplane on his pc, and everything was smooth. I can control plane with MP. We had to turn off Firewalls only. He setted to output xplane data to my IP, I run sitl via waf, console showed incoming connection from his pc, and I connected with MP to sitl.

Based on your suggestion, I am now running x-plane 10 and the sim_vehicle.py script on the same Linux machine. Still not luck :frowning:

This is what I get when I run the sim_vehicle.py: https://photos.app.goo.gl/7oD2GoCFSbx4JYdx1

These are my updated x-plane settings : https://photos.app.goo.gl/L9FJfZPFC0tU6Uen2

Hi! I kinda have the same problem as yours. Did you have any update on this issue? Thank you!

Not really…

I basically threw-out everything I had up until this point and started over.

This was a few months ago, so I don’t remember what I did exactly. But I remember that part of the issue was that my computer was not beefy enough to run x-plane and anything else simultaneously. I ended up with x-plane running on a Mac and the SITL stuff on my Linux machine.

The key to getting this to work was @Nikita comment above about the x-plane ip address and ports in the ardupilot firmware file

ArduPilot/ardupilot/blob/master/libraries/SITL/SIM_XPlane.h
Line 48-50

You will need to match this up with your setting in x-plane.

Hope this helps.

I had a similar problem here but I was just running on my local network 127.0.0.1. However I missed this small detail. I left the port we send from in the x plane 10 data screen as 49001 and not something else like 49002!