Multiwii Ground Control Station (Raspberry Pi)

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Multiwii Ground Control Station (Raspberry Pi)

Post by kataventos »

Hi,

A quick (out of focus :mrgreen: ) video I made on the following subject:


if you got your Raspberry Pi waiting for a telemetry project, now is the time to get it out for some tests.
Multi GCS will be an awesome project for you to get start with, using inclusive latest developments from Alex regarding "Generic wireless UART with OLRS pair" or normal UART radios 433mhz/ 935mhz (the ones I´m using for testing this out on the field). It also have the particularity to be able to work with multiple protocols. When I say multiple is because it suits on most of the flight controller softwares on the market, inclusively the FRSky protocoll.

Regarding Multiwii it works with current development´s but the protocol needs to be rewritten, many things changed since Meister started, I will try to help and rewrite as soon as I have the time to it.
Image Image

Primary screen and maps:
Image Image Image

Way points Nav (as soon as possible :D ) :
Image Image


Correct installation procedure is not so easy but I will explain step by step as follows:

For sure you have already installed the OS on your raspberry, if not or if you want to start with a fresh installation (recommended) download latest image of Raspbian (wheezy) and write it to your SD card using your PC.

Mac users can do as follows:
-Open your terminal window with your card plugged in and:

Code: Select all

$ su
Password:
$ diskutil list



Unmount the disk where you want to instal your OS by typing:
Example (disk3)

Code: Select all

$ diskutil unmountdisk /dev/disk3


Write your image by typing:

Code: Select all

$ dd if=/path to your image/rasp.img of=/dev/rdisk3 bs=1m


Wait for it to be written, plug it in on your Rasp and configure it normally according your needs on the raspi-config, do not configure it to start with console because you will always work on command line, reboot.

Now, before you can install your MultiGCS you need to prepare your RasPi OS conveniently.
With your Raspi on command line do as follows:

Code: Select all

$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install wget
$ sudo apt-get install mousepad (you want to use a touch screen on the field )
$ sudo apt-get install vim (this will be your editor (the one i use))


Now for you to be able to use the Pi´s serial port (GPIO) and to by pass user and password on start up you need to do as follows;

Code: Select all

$ sudo vim /etc/inittab


Comment the line by putting a # at the beginning:

Code: Select all

T0:23:raspawn:/sbin/getty -L ttyAMA0 115200 vt100 


To by pass the password and user at startup;
Comment the line:

Code: Select all

1:2345:respawn:/sbin/getty --noclear 38400 tty1 

Put this one bellow:

Code: Select all

1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1


To prevent your Raspi from sending out data to the serial ports when it boots you need to edit the file /boot/cmdline.txt find the line and remove the following part:

Code: Select all

console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 (WARNING JUST THIS PART OF THE LINE)

Code: Select all

$ sudo vim /boot/cmdline.txt


Save and reboot after deleting.

Now you will need minicom:

Code: Select all

$ sudo apt-get install minicom


Remember that your RasPi will need a level converter because serial line works on 3.3v, on the following scheme you can see how I did it.
Image

Image

Now to install the debian package MultiGCS:

Code: Select all

$ wget  http://www.multixmedia.org/test/AutoQuad/gl-gcs/gl-gcs_0.01-1.deb
$ sudo dpk -i gl-gcs_0.01-1.deb
$ sudo apt-get install -f


Reboot and type on command prompt : gcs

You will probably want to run it without your keyboard on the field so it go directly to GCS. In that case you will need to edit as follows:

Code: Select all

$ sudo vim ~/.bashrc


Add as follows after the last line:

Code: Select all

# Run GCS at startup bash script:
echo . bashrc : running gcs
bash gcs



Reboot and enjoy!

For testing proposes I am using the UART radios 433mhz connected to USB port and the ground GPS module to the serial port.

You can find some more information about this open source project on: http://www.multixmedia.org/
The repository: https://github.com/multigcs/multigcs

Have fun and fly safe ;)
-KV

User avatar
ezio
Posts: 827
Joined: Sun Apr 01, 2012 11:03 pm
Location: Paris
Contact:

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by ezio »

I must say that it looks great.

subaru4wd
Posts: 316
Joined: Sat Dec 08, 2012 2:16 am

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by subaru4wd »

My brain just melted :shock:

sismeiro
Posts: 173
Joined: Tue Feb 21, 2012 12:33 pm

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by sismeiro »

Excelent work!

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by Alexinparis »

that's look great :)

User avatar
city_kid
Posts: 64
Joined: Wed Apr 03, 2013 8:09 pm
Location: Birmingham UK

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by city_kid »

@kataventos

This is AWESOME!

I've been working on a big chunky Ground Station platform based on Processing, but the problem is that it's too "heavy" for the Raspberry Pi.

So I'm using a MiniITX type Intel motherboard powered by a big 12v Lead Acid battery mounted in a case, but I'd love to use RPi...

I love Raspberry Pis and I have 4 controlling my home, but they are underpowered for high frame rate applications.

Questions:

1) What language / platform / framework have you used to code this? C++?
2) How does it get it telemetry / MSP data? Does the MultiGCS software keep sending MSP requests?
3) Would it also work if the MultiWii constantly sends a series of MSP packets out?
4) How do you convert multi-byte values into integers or floats? I'm having real problems with this...
5) What kind of update frequency do you get?

I will download the packages tonight and try it on a spare Pi (I have a few lying around).

I will try to screen grab my (very poor) Ground Station application for you interest...

Again. AWESOME! Very impressive work.

city_kid
Last edited by city_kid on Tue Sep 24, 2013 12:57 pm, edited 1 time in total.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by copterrichie »

I have done some work with the Raspberry PI and Processing, in my opinion, it is the Java Overhead that is at the root cause of the issue. As of today, Oracle still have not released an Arm version of Java so we are stuck with the ports that do not have the full Functionality and Optimization as the Official release. This is why I am personally investigating QT that is in high usage by others for GUI applications on the PI. In fact, QGoundControl is written in QT. http://www.qgroundcontrol.org/

http://qt-project.org/

User avatar
city_kid
Posts: 64
Joined: Wed Apr 03, 2013 8:09 pm
Location: Birmingham UK

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by city_kid »

@copterrichie

Yes, I agree, Java is the main problem with Processing on a Pi.

This is why I opted for Processing ontop of Windows XP (!) on a "regular" x86 motherboard.

This allowed me to code easily in Processing, 'cos I'm I'm not that good at code.

The problem with that solution is powering the motherboard in the field...

Raspberry Pi would be so much easier as you only need a 1 - 1.5 amp 5 volt supply, easy to produce from LiPo, NiHM or Lead Acid batteries.

Cheers, I'll take a look at QGroundControl....

city_kid

kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by kataventos »

Hi guys,

yes, this is a very good work but it is not mine or the Team´s work as you can see on the repository :D I don´t have the knowledge to create something like this from scratch :shock: I just interpreted it and made it available here with the detailed installation procedure, because it is not easy to have it running as we all need it to be on the field.
In fact, me and Ross (KVTeam) are working in a very much advanced GCS for the PI using QT. Ross is the brain on this operation with the QT as well as coding in Java (OSD GUI) and he is taking some time off because of he´s professional work, but I think he will be back soon.
Definitely Java will never work on the Raspi and we sure have better ways to take advantage of the ARM processor with QT.

I will post a little demonstration of the work going with the Team´s GCS later on ;) As far as I can tell, it will not be an open source code but it will be available for all Multiwii users.

Sure hope that with my detailed instructions you all be able to get this one running on your Raspi´s ;) If you run into a problem during the above steps please ask me I will be glad to help as always.
I can also in time help the author by making it fully compatible with latest Multiwii developments.

Have fun and fly safe,
-KV

User avatar
city_kid
Posts: 64
Joined: Wed Apr 03, 2013 8:09 pm
Location: Birmingham UK

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by city_kid »

@kataventos

My Ground Station software is nowhere near as good looking as yours but I thought I'd show you what I have anyway!

city_kid Ground Station
city_kid Ground Station


Running on a regular miniITX PC motherboard.

Windows XP, Processing 2.0 and Shuncom SZ-05 two-way 2.4GHz 250mW transceiver modules.

The MultiWii software has been tweaked to constantly send out a sequence of MSP telemetry data with one packet every 100mS (disarmed) and every 25mS (armed).

I have downloaded the Raspberry Pi GCS image and I'm gonna try it out this weekend...

Cheers!

city_kid

kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by kataventos »

Hey City_Kid

that is a very nice GCS you have there, awesome work.
In fact I am at this moment working on the hardware part and some good news will follow in a short time ;)
You should post your code, I am sure others would love to give it a go.

As soon as you test all above steps and get it to work on your Pi give me news :)

Cheers,
-KV

PS: do you have a USB video capture device connected to it or that was just a pic you put there?
I have my STK1160 working with almost no latency on the Pi, enough to FPV with it ;)
Also, what is the effective range with the combo you´r using?

kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by kataventos »

Hi,

and as promised before here is a demonstration of the work being developed by the KVTeam and A.R Technologies by the hand of Ross Power.
It is as smooth as you can imagine it to be :mrgreen:



Cheers,
-KV

User avatar
city_kid
Posts: 64
Joined: Wed Apr 03, 2013 8:09 pm
Location: Birmingham UK

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by city_kid »

@kataventos

I will probably publish my Processing code, once I've actually flown with it!

Bear in mind that it needs a modified version of MultiWii to work...

I like the look of your GCS, but have questions:

1) Is it running on Raspberry Pi...?
2) Did you know that Oracle have now released a "real" version of Java for Raspberry Pi, which might make Processing run better?

I have tries out the MultiGCS Raspberry Pi package that you started this thread with.

It is very good, but has a few limitations:

1) It can only be using on a HDMI monitor, so using a small cheap 7" COMPOSITE input monitor from Ebay is no good... :cry:
2) Some of a GUI widgets are a bit "jerky" but I don't think it would really annoy anyone.

Overall very good, I've just got to modify it now to work with my serial link....

Cheers!

city_kid

kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by kataventos »

Hi,

I don´t think it is good to modify the MWii version for this propose, we have it with almost everything we need at this time so, we can modify our stuff instead ;) this way everyone can easily have it working with the "stock" code.

1- yes it is working on the RasPi as you can see on the video;
2- I know now :) already testing it... thanks.

Great that you got it running, it is true that you need to use HDMI to have it in good resolution that is why I am developing a dedicated ground station with high lum/contrast LCD with a resolution of 1200x800, will post about it soon.

Cheers,
-KV

kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by kataventos »

Last year I made the first wood prototype working just fine until now, my intention is to really make a Ground Control Station rather then a monitor with all in... if you get my point ;)
Just before the Chinese factories start building monitors with AV receiver in I already had the first prototype on the field visible here (just for the record):



Here is a Pic of it just after the design and CNC cut part...

Image

Because I was never able to get the source code (agreements between the factory and the chip designer) neither in a thousand years would have the ability to reverse engineering it ;) would have to born again... I continued to use it just for the LVDS driver part using the best LCD I could find.

And this was the final product at the time working until today already counting with diversity RX:

Image

Image

Then I coded a simple Ground station using a Minim OSD... unusable I´m afraid to say :D It was nice to have the AV RSSI and GS voltage but just that...

For the record:



Now with the RasPi I designed an entire new product (not in wood) that will be changed in just few weeks... why? Because since April this year I keep my eyes on the UDOO, unfortunately I never bought it in Kick Starter because at the time the Raspi just arrived to my hands so, I would need to take some advantage of the invested money on it rather then put it on the shelf...

UDOO have more power then the RasPi (but in fact the Raspi have more then enough when programmed by who really knows what he is doing ;) ) it have the LVDS and an Arduino already built in...
This is nice because the Arduino can decode everything realtime, releasing the ARM processor for everything else.

You can see presentation here:



So, the world keep´s moving around... I just find it hard to catch :mrgreen:

More stuff on the new prototype soon...

Have fun and fly safe,
-KV

User avatar
city_kid
Posts: 64
Joined: Wed Apr 03, 2013 8:09 pm
Location: Birmingham UK

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by city_kid »

@kataventos

I have ordered a 7" LCD Touchscreen from Ebay. I already have a spare Raspberry Pi with the MultiGCS image running on it.

I will put the two together soon and test the MultiGCS platform properly....

city_kid

User avatar
city_kid
Posts: 64
Joined: Wed Apr 03, 2013 8:09 pm
Location: Birmingham UK

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by city_kid »

Do you still have the source for this?

What hardware does it run on?

Why was it unusable???

city_kid

kataventos wrote:
Then I coded a simple Ground station using a Minim OSD... unusable I´m afraid to say :D It was nice to have the AV RSSI and GS voltage but just that...

For the record:





kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by kataventos »

Hey Olli,

welcome to the Multiwii forum ;)
Please check your links, not even one is working! Also sent you a request in form of an issue on the repo, until today not even an explanation... no problem because I already found the way to go on that.

Cheers,
-KV

Eugene_skr
Posts: 42
Joined: Mon May 20, 2013 10:31 pm
Location: Belarus, Minsk

Re: Multiwii Ground Control Station (Raspberry Pi)

Post by Eugene_skr »

if i understand right i need raspberry pi and hdmi screen?

is it possible to make it work with analog video input monitor?
to start using it with FPV goggles ?

is it possible to make advanced OSD with raspberry pi?

Post Reply