adderbyte / GYM_XPLANE_ML

GYM Environment for XPlane. Reinforcement Learning and Autonomous Piloting.
GNU General Public License v3.0
65 stars 21 forks source link

Headless mode issue with Xvfb #2

Open farrukh-e opened 5 years ago

farrukh-e commented 5 years ago

Hi,

I tried running X-plane in headless mode with a command from the bash file (xvfb-run --server-args=':1 -screen 0, 1024x768x16' ./X-Plane-x86_64 > /dev/null &) and I am getting Exit 1 or it just exits out if I run it with sudo. I suspect it's some setup issue on my system. Have you had any similar errors when you first tried to run X-plane with xvfb?

Thanks a lot

adderbyte commented 5 years ago

Hi, I did not have similar errors.

However it is desirable to first run xplane in normal mode. In the normal mode, one need to change certain parameter configuration.

For example to uncheck show startup menu on application launch under the general setting. Next is to load a particular scenario/configuration - xplane will ask whether to run this on startup : select yes. (there is also option to run this on next startup in the interface ).

So that when you launch in headless mode the next time it automatically load the situation - without the startup menu or launch configuration interring it. Or if you run xplane the next time, without headless mode, it automatically load the situation/configuration you previously set.

Basically, the aim is to change xplane setting in normal mode to automatically load your previous flight. After achieving this, then the headless mode should work

I hope this helps.

Regards

farrukh-e commented 5 years ago

Yeah I did all of that. Currently bash files for headless mode don't seem to do anything for me, they don't create xvfb process and I can't get any data out using XplaneConnect. I also tried that command in terminal. Maybe I missed some steps.

So, to run X plane in headless mode all I need to do is have xvfb installed, move bash file into X plane folder, add it with chmod and run it?

Thanks

adderbyte commented 5 years ago

Hi, As stated in the readme file under the HeadlessMode folder, you are correct, only that maybe the chmod was not included in the step. But you are absolutely right. Thanks for the observation.

Hope this helps

Regards

pd3a commented 1 year ago

In headless mode can we choose and control multiple aircrafts in the respective instance.