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.
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).
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 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.
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
You will need to match this up with your setting in x-plane.
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!