From: Geoff M. <ub...@ge...> - 2016-12-15 19:06:04
|
Hi Pete, Brenden, James, Gaetan, et al... Thanks for the quick replies, some direct... Unfortunately, some of it seemed to be contrary advice ;=()! Seems I do not need "x-windows" running to run Gaetan's modified "fgpanel"... And thanks Pete for how-to install Qt5, at least most of it, but it seems I also do not need it, at least for "fgpanel"... Have already used 84% of my minimal 6.5G /dev/root - only 980 MB left... although do have a large /media/pi/SAMSUNG2 usb drive... 516G with less than 10% used... lots of space... And Pete, I note the - https://github.com/freeflightsim/fg-rpi link wants me to install **more** things... libpython-all-dev and pip 'fabric'... Are these really related to "fgpanel" building, running? In some of my reading around, James, I am not sure you have the memory in RPI1, but maybe I am wrong... will let others directly address that... And Brendan, I also saw references to that "experimental DRM OpenGL driver", but again I do not think I need these for this new "fgpanel" that - "runs in console mode (framebuffer, no X environment, no GLX, no GLUT, no PLib, just pure OpenGL ES 2.0 with some EGL to initialize the framebuffer)"... but maybe wrong... And thanks Gaetan, for a step-by-step process... this **really** helps... 1: Building As stated, somehow I got fgmeta download_and_compile.sh to build OSG/SG/FG... but I now think I should **not** be trying to run that "fgpanel" in RPI2... so no need for 'x', or 'OpenGL'! Have cloned your flightgear fork, into "flightgear-gall", but at present it fails on the "fgpanel" build... but the error is only a missing a SG header - fatal error: simgear/structure/subsystem_mgr.hxx: No such file... But that file **is** in my SG install, so this just means the SG include dir is missing... The CMakeLists.txt does - find_package(SimGear ${FLIGHTGEAR_VERSION} CONFIG REQUIRED) Which succeeds in finding - /media/pi/SAMSUNG2/install/.../cmake/SimGear/SimGearConfig.cmake etc, and later does - include_directories( ... ${SIMGEAR_INCLUDE_DIRS} ... ) but this does nothing because that var is **not** set by that config!?!? Puzzles me why I do not have the same problem when compiling the FG `next` using the dnc script??? Anyway, I am sure I will get over that hump ;=)) 2: Running the new "fgpanal" A) Thanks for the xml files... I will put them in place... including copying them to my main 'fgfs' computer... B) At present `$ vcgencmd get_mem gpu` shows only 64M, so I understand I need to bump this to 256M, and re-boot RPI... BTW this does not seem to be in /boot/config.txt, but found it in Menu -> Preferences -> RPi Configuration, Performance TAB -> GPU Memory... C) And yes, running - $ systemctl -a | grep lightdm show me this "Light Display Manager" is indeed, loaded, active, running, so I can 'stop' this... D) And then when I get through the build blip, should be ready to run `$ sudo ./fgpanel --fg-root=... --panel=...`, and see what happens... May take a few days to get all this in place, but as stated, really many many thanks for the helpful replies... Regards, Geoff. On 14/12/16 23:32, Gaétan Allaert wrote: > Hi Geoff, > > Welcome in the amazing world of the powerful OpenGL ES of the Raspberry > Pi. > > 1. first step is to compile SimGear (CMake + make + make install). I > don't think that you need to recompile OSG. You can use the OSG package > from Raspbian directly. > > 2. second step, compile FGPanel (CMake of FlightGear + make fgpanel + > copy the binary in the FlightGear installation directory). You don't > need to recompile all FlightGear, you just need the FGPanel binary. > > 3. Install FlightGear data to get the 2D panel of the C172. > > 4. check the amount of graphical memory. I have the first generation of > Raspberry Pi with only 512 Mb of RAM. You need at least 256 Mb of > graphical memory to run FGPanel. This can be configured in the > file /boot/config.txt. The amount of graphical memory can be checked > with the following command: vcgencmd get_mem gpu > > You need to reboot the Raspberry Pi to take into account the new amount > of graphical memory. > > Before starting the FGPanel, you need to stop the X server > (sudo systemctl stop lightdm.service). FGPanel runs in console mode > (framebuffer, no X environment, no GLX, no GLUT, no PLib, just pure > OpenGL ES 2.0 with some EGL to initialize the framebuffer). FGPanel has > to run as root (sudo ./fgpanel) to be able to take control of the > framebuffer. > > I'm using the panel of the C172 but the configuration files for FGPanel > has been removed from the FlightGear data archive. I put the file that > I'm using as attachment. You have to copy these files on both side (main > computer + Raspberry Pi) in $FG_ROOT/fgdata/Aircraft/c172p/Panels/. > > To run the simulation > > On the Raspberry Pi : > sudo fgpanel --fg-root=... \ > --panel=Aircraft/c172p/Panels/FGPanel_c172p.xml > > On the main computer: > fgfs \ > --generic=socket,out,<hz>,<host>,34200,udp,../Aircraft/c172p/Panels/FGPanel_Protocol_c172p > > FGPanel uses TTF fonts that can be found in the $FG_ROOT/fgdata/Fonts/ > directory. > > Hope this help, > > On Wed, 14 Dec 2016 20:27:45 +0100 > Geoff McLane <ub...@ge...> wrote: > >> Hi Gaetan, >> >> What a great idea, being able to run >> 'fgpanel' on my Raspberry Pi2... >> >> To my surprise, I have managed to >> compile current OSG/SG/FG, and thus fgpanel, >> using the fgmeta dnc script, in Raspbian 8, >> jessie, but obviously not yet with your >> updated source... >> >> And obviously without Qt5... but only a warning... >> >> But when I try to run ./fgpanel I get - >> >> freeglut (.fgpanel): OpenGL GLX extension not supported by display >> ':0.0' >> >> So obviously, I have to do more RPI2 >> setup... maybe use 'startx' or something... >> or some other drivers... need help! >> >> Do you, or others, have some pointers on >> getting this to work in RPI2... >> >> I note, in reviewing your modified fgpanel >> CMakeLists.txt you use - >> >> find_path(BCMHOST_INCLUDE_DIR >> NAMES bcm_host.h >> PATHS /opt/vc/include >> NO_DEFAULT_PATH ) >> to later decide if we are in RPI? >> >> I can see this file does exist in my RPI2 >> system... so that seems positive... >> >> It would be absolutely great if say the >> c172p panel was displayed on RPI2 as I fly in >> fgfs in other machines on my LAN... I certainly >> hope this is merged... >> >> But need help... on list, or direct... thanks... >> >> Regards, Geoff. >> >> PS: Also, which panel file do you use? >> >> >> On 13/12/16 15:21, Gaétan Allaert wrote: >>> Hi, >>> >>> I put the new code of FGPanel in a branch ready to be merged: >>> https://sourceforge.net/p/flightgear/flightgear/merge-requests/61/ >>> >>> Can this code be merged for the next release of FlightGear? >>> >>> Thanks, >>> >>> Gaetan >>> >>> On Sun, 30 Oct 2016 21:47:24 +0000 >>> James Turner <zak...@ma...> wrote: >>> >>>>> On 30 Oct 2016, at 20:32, Torsten Dreyer <To...@t3...> wrote: >>>>> >>>>> excellent, thats great news. I have just downloaded the sources >>>>> from your link and try to find some time and give it a try. I am >>>>> somewhat busy preparing for the fsweekend so I might not have a >>>>> chance for feedback before next week. >>>>> >>>>> If all runs nicely (and I have no doublt it will), I can merge it >>>>> into the main fightgear code base. >>>> Yes, that sounds excellent. >>>> >>>> Aside form PLIB / PUI, which I am working to replace, the panel >>>> code and the HUD code are the two major places in FG which use >>>> OpenGL 1 (there’s some other places, but those are ones that >>>> really affect us). I made some start on converting the HUD to use >>>> modern OpenGL drawing (collecting lines into arrays) but having >>>> the panel code fixed is really beneficial. >>>> >>>> Kind regards, >>>> James >>>> >>>> >> |