Board index FlightGear Support Interfacing

TQ/Panel for FG made with Kivy  Topic is solved

Connecting two computers, using generic protocol, connecting with Matlab?

TQ/Panel for FG made with Kivy  

Postby pommesschranke » Sun Jan 26, 2014 10:31 pm

Today I started a python/kivy app that I plan to use to control FlightGear aircraft.

This is done with 83 lines of Kivy Code (*.kv) and one PNG made with gimp.
This is multi-touch, so you can move each throttle alone or both together using 2 fingers.
Kivy apps run on Linux, Windows, Mac, android, iOS

Image

TODO:
    * some python code that talks UDP and/or Telnet with FlightGear
    * add more buttons and switches
    * make everything look more real

although it is not a hardware TQ I think it will be more fun to use than the keyboard. And it will be nice to have visual indicators for the position of speed brakes, throttle, flaps, gear

http://kivy.org
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: TQ/Panel for FG made with Kivy

Postby Michat » Mon Jan 27, 2014 2:03 pm

Good Morning D-Laser.
Following old but reiterated suggestions gave by FG IRC Volunteers to me about to use Inkscape, I'd started to use it in a scattered way, in fact is mine fourth attempt and I think, I begin to understand how it works.

The idea, first of all is to congratulate you for your excellent job in your personal workshop around FG. Second is to offer my services.
In order to practice with Inkscape I'm doing mock-ups, as a way that I find to show and share ideas or dreaming worlds.

Want to share with you what I'm currently experimenting on.

Image

Image

Perhaps we can navigate same radial. If you need help count with my help.

*** Free GPL Inkscape is awesome and sometimes hard pretty hard.

Cheers
User avatar
Michat
 
Posts: 1226
Joined: Mon Jan 25, 2010 7:24 pm
Location: Spain
Version: 191b
OS: MX 21 Fluxbox oniMac

Re: TQ/Panel for FG made with Kivy

Postby Michat » Mon Jan 27, 2014 5:47 pm

Another edit.
Image
User avatar
Michat
 
Posts: 1226
Joined: Mon Jan 25, 2010 7:24 pm
Location: Spain
Version: 191b
OS: MX 21 Fluxbox oniMac

Re: TQ/Panel for FG made with Kivy

Postby pommesschranke » Tue Jan 28, 2014 8:08 am

Hello michat!

That looks very nice!

did you read this:
viewtopic.php?f=71&t=21840&hilit=inkscape

When you look at FG aircraft or scenery objects you will easily find spots where
textures are missing or can be improved with your Inkscape skills. Design in Inkscape, then export as png


About "FGPanel without FG" I just had another Idea:
Use the Blender game engine and blenderplayer - then I could use the original 3D models which are also used inside Flightgear.
Just like the kivy app this would run on Platforms that can't run Flightgear like Raspberry Pi and Android for example.

With my kivy TQ I can now control flaps, speed brakes and 2 x throttle.
I developed and tested on Linux and it runs without changes on Android.

source code:
https://gitorious.org/flightgear-tq-panel-made-with-kivy/flightgear-tq-panel-made-with-kivy/source/master:


Image
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: TQ/Panel for FG made with Kivy

Postby Michat » Wed Jan 29, 2014 7:04 am

Good morning.

I read that post, just when I was revisiting Inkscape at my fourth attempt. Having no idea of panels, and waiting for unification and canvas develop further progress. I decided not to mesh me into an out of my scope issue, as I'm not programmer neither a skill designer. However sometimes with my old pc I changed some instruments textures, but just change it without to test them because is very old PC at 800 mghz, due that I can't run FG :(

About instruments, with my very poor experience in inkscape I found that is more reliable to use free cad or blender in order to have more accuracy according to the blue prints, scales, size and dimensions of the object. Other times I dive into textures that I cannot understand, they are flipped and mapped in some logic way, so they maybe were been generated by those programs by mapping.

The main problem I found was in how to implement the FG's instrument collection if I have no 3d control, even don't know how the magic occurs. I reach the conclusion that he have to reuse elements, but is quite complex. For example the plates of the figurative 727 OH panels, do not satisfied any real dimension in my draw, if we could have access to the real dimensions we could reuse plates, also switches turns and bolts, etc. However the number of different elements is huge and diverse as every aircraft has their own avionics scheme layer and so on. If we take account of the number of gadgets and displays, I can only feel panic.

In all cases I feel you have magic, you projects are awesome. Chapeau for all. I'm a lover of the 2D panels, while to have a 3d animation on the phone to manage controls is really awesome metaverso.

I'll continue training.
User avatar
Michat
 
Posts: 1226
Joined: Mon Jan 25, 2010 7:24 pm
Location: Spain
Version: 191b
OS: MX 21 Fluxbox oniMac

Re: TQ/Panel for FG made with Kivy

Postby pommesschranke » Fri Jan 31, 2014 2:52 pm

I found a way to customize the look of the sliders.
Buttons, switch and slider to change View, fov and parking break are working now.

https://gitorious.org/flightgear-tq-panel-made-with-kivy/flightgear-tq-panel-made-with-kivy/source/36b6b390c8d99ebd490963bc74ae26fdbfc40e3b:screenshot.png

Michat:
If you feel like making a nice background image (800x600)
or nicer slider-handles - go ahed! ;-)

Technically, we could definitely run an OpenGL ES-based Canvas on a mobile device, we just need people interested in pursuing this and playing with it - as well as report any issues/showstoppers


I am interested.
It would be very nice to have PFD & ND on my tablet or a small LCD driven by RaspberyPi
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: TQ/Panel for FG made with Kivy

Postby Hooray » Fri Jan 31, 2014 4:11 pm

@Michat:

We're still looking for people to help us port/re-implement the Map dialog: http://wiki.flightgear.org/Map
Image

The code for this is basically 70% done now - so this is only relevant for FG 3.2 (i.e. plenty of time) - but we need to have a few SVG symbols that are missing currently.
Some symbols can be freely obtained online, others would need to be created from scratch:

wagnerw wrote:
These pictures are from wikipedia and are public domain, free for all:
https://commons.wikimedia.org/wiki/File ... OR%27s.svg

I use the PNGs as Java had problems to render SVGs...

Looking forward to see them in FGFS

Best Regards
Wolfram




I am interested.
It would be very nice to have PFD & ND on my tablet or a small LCD driven by RaspberyPi


I split the topic and moved the responses to the canvas subforum: viewtopic.php?f=71&t=21964
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: TQ/Panel for FG made with Kivy

Postby Michat » Sun Feb 02, 2014 12:45 am

@D-LASER I'm doing the background for your FGeNgine. Still I have to fit some various elements, tweeking, amending, isolating and so on. For the moment I'm doing this. I'll show you more progress soon.

Image

**** Edit. Now doing equivalent translations among axis, and some other stuff, hope to have a pre-release soon.

Image



@Hooray. Roger Willco I've started a research for the creation of the map symbols.


Cheers
User avatar
Michat
 
Posts: 1226
Joined: Mon Jan 25, 2010 7:24 pm
Location: Spain
Version: 191b
OS: MX 21 Fluxbox oniMac

Re: TQ/Panel for FG made with Kivy

Postby Michat » Mon Feb 03, 2014 8:01 am

Good Morning.

@D-Laser

I'm doing some progress with the background, interpolations, offset and so on. We'll need a meet in order to discuss some elementary options and to custom any element as your like and convenience.

Image
User avatar
Michat
 
Posts: 1226
Joined: Mon Jan 25, 2010 7:24 pm
Location: Spain
Version: 191b
OS: MX 21 Fluxbox oniMac

Re: TQ/Panel for FG made with Kivy

Postby pommesschranke » Wed Feb 05, 2014 7:26 pm

pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: TQ/Panel for FG made with Kivy

Postby Hooray » Wed Feb 05, 2014 7:30 pm


wow !
=> Newsletter !!
(or maybe this even warrants a dedicated project article??)

Stub at: http://wiki.flightgear.org/FlightGear_TQPanel
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: TQ/Panel for FG made with Kivy

Postby SP-K79 » Sat Feb 21, 2015 5:10 am

Hello,

today I have discovered your great project.

I am using Os X and an Android tablet with FlightGear version 3.2.

I have downloaded and installed Python version 2.7 as suggested on your git page.

I have downloaded and installed Kivy on my computer and tablet.

I have copied from your site the package and than copied the two .xml files in the FG Protocol folder.

Kivy on my tablet shows your panel.

When I open the main.py file with the Python Launcher the terminal message says the following:

Last login: Sat Feb 21 05:07:36 on ttys000
pc4:~ myname$ cd '/Users/myname/Desktop/flightgear-tq-panel-made-with-kivy-flightgear-tq-panel-made-with-kivy/' && '/usr/bin/pythonw' '/Users/myname/Desktop/flightgear-tq-panel-made-with-kivy-flightgear-tq-panel-made-with-kivy/main.py' && echo Exit status: $? && exit 1
Traceback (most recent call last):
File "/Users/myname/Desktop/flightgear-tq-panel-made-with-kivy-flightgear-tq-panel-made-with-kivy/main.py", line 1, in <module>
from kivy.app import App
ImportError: No module named kivy.app
pc4:flightgear-tq-panel-made-with-kivy-flightgear-tq-panel-made-with-kivy kamilgagat$

Where should this module named kivy.app be? And how can I possibly fix this?

Please advise, as your panel is the one thing that most of us virtual flyers need due to high costs of simulator hardware i.e. throttle quadrant.

Most sincerely,

Peter
Hue Peter Coal
JAFVA, Vice President
"Never fly where you have not flown in your mind, five minutes age."
User avatar
SP-K79
 
Posts: 98
Joined: Wed Feb 04, 2015 9:23 pm
Callsign: SP-K79
Version: 3.2.0

Re: TQ/Panel for FG made with Kivy

Postby dg-505 » Sat Nov 07, 2015 2:12 pm

Hi Peter,

recently I also discovered the TQ Panel and I tried to install it on my new Ubuntu 15.10.

For me the error
Code: Select all
from kivy.app import App
ImportError: No module named kivy.app
appeared, too.

After installing "Kivy - Multimedia / Multitouch framework in Python (examples)" and "Kivy - Multimedia / Multitouch framework in Python (Python 2)" and "Kivy - Multimedia / Multitouch framework in Python (Python 3)" from the Ubuntu software center, the app lauched properly.

That's just my experience. I don't know if this helps you out, but at least I hope so...
Regards
Jonathan
A mile of road will take you a mile, but a mile of runway will take you everywhere.

DHC-6 Twin Otter development
User avatar
dg-505
 
Posts: 677
Joined: Mon Jun 02, 2014 3:36 pm
Location: Bonn, Germany
Callsign: dg-505
Version: next
OS: Ubuntu 20.04.4 LTS


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 1 guest