I now have ardupilot and realflight connected together, but the aircraft are not flying well.
My FPS in the arducopter window is only averaging around 15, and according to the instructions it needs to be over 150. Any suggestions? 23.86/795.42 FPS avg=16.25
I’m hoping someone can help me out with this. I’m trying to put together a development environment where I can make changes to the code and test them with the SITL using realflight 8. After nearly a day of struggling with the realflight setup, I got realflight interfacing with the SITL launched from the simulation tab of Mission Planner.
So my developing environment is ubuntu running in a VM on a windows 10 laptop. I have realflight 8 loaded on the same laptop and tried running the SITL in the VM with realflight. The frame rate was too slow (~80 fps). So I tried cygwin in window 10 and it is very aggravating as it is very slow to do anything. Plus I am getting error just trying to compile the SITL software. So I went to Windows Subsytem for Linux (WSL). I initially ran into a problem where the run_in_terminal_window script fails to open a terminal and thus the arducopter firmware fails to run. So I bypassed this with two separate script files that do what the sim_vehicle script does. And I run a separate script in two separate WSL terminals. This seems to work great. I have good frame rates. I can fly the aircraft fine in stabilize mode using the interlink transmitter. However I get an error trying to write and read waypoints from mission planner. Then when I go to run the auto flight I get a failsafe message stating “terrain data missing”.
Using WSL is not ideal because I prefer developing in the ubuntu VM environment. I had a lot of issues in the WSL trying to build Px4 targets and that is why I gave up and went back to the trusting ubuntu VM.
I am happy to use it for simulation but not ideal. Hopefully someone can help me figure out the issue with terrain data.
Newbie question: Is it possible to export an aircraft from RF8 and use it in RF7.5?
If I’m correct SITL works fine with RF7.5. But it seems difficult (impossible?) to adjust the visuals in RF7.5.
That’s why I wonder if a model like the Skywalker 6 from lorbass could get imported into RF7.5…
Regards David
Hi Peter,
So I didn’t find a solution to the bad terrain data issue however @tridge helped me determine that it was an issue with AC 3.5.5. When I switched to AC3.6 I had no issue using the sim with realflight cennected to Cygwin. I did end up realoading Cygwin and that fixed the issues I was having with it running SITL. So for me that seems to be the best platform to run SITL when interfaces with realflight. I am seeing 260-280 fps. I need to follow up with Tridge to see if there might be an easy fix to this bad terrain data issue in AC3.5.5. I want use it for sims at work since that is what is loaded on our aircraft.
Regards,
Bill
Thanks Bill. Just so I’m clear, you’re running ardupilot in a windows environment under Cygwin?
Has anyone had success with running a Realflight in a Windows VM on an Ubuntu host running ardupilot?
Does anybody run into the peculiar case where the FPS avg is good (~200) when Realflight window is active and immediately drops dead (No data) when Realflight is in the background? This behavior is very puzzling and I am not sure what is wrong.
It flys OK on the parameters of the real one, however it will have huge dips in the frame rate down from 300 or so to 20 causing crashes, after 10 or 15 seconds it will go back to 300. Not sure why this is as I can run the models of github no problem. Possibly there is some error in the model or the parameters? It is based on the CUAV tailsitter from github and uses its graphics. I have uploaded .rfvehicle file to the above gdrive. I’m not sure how to export the .RFX file type?
Also I am struggling to compile my own SITL and get it to run with realflight like the .exe does from in mission planner, I have compiled using cygwin make sitl -j4 it seems to run ok from sim_vehicle .py sim_vehicle -f flightaxis:192.168.x.x but not connect to realflight.
In RF8, use Simulation/Export/Aircraft variant to export an RFX file.
I don’t have any idea what would cause the frame rate to vary for a particular model. But I also never see 300fps, more like 200fps with a photofield and 150 with full graphics.
I have uploaded RFX files to the drive link above. I have found cygwin builds a SITL arduplane.exe but have been unable to get it to run. Any pointers on connecting local windows SITL to realflight?
i used this command with cygwin, to connect without launching mavproxy and without rebuilding. I can then connect mission planner via TCP. I guess it was the -j4 i was missing.
…/Tools/autotest/sim_vehicle.py -j4 -f flightaxis:192.168.1.2 --no-mavproxy -N
Still getting frame rate drops I guess although I no longer get the nice readout as before, must be something to do with the model. Also with this method and the mission planner simulation tab, it takes several trys of opening and closing RF8 and restarting the SITL to get the rc controls to passthrough, everything else seems to work first go.