Page 1 of 1

A better MultiWii

Posted: Sun Nov 22, 2015 12:09 am
by gregd72002
Hi,

First of all thanks a lot for all the great work you have done on MultiWii. It is really a great piece of software that is well though through. It is pity to see all the other flight controllers that bring no significant difference. And people do go for it.

When I firstly looked into MultiWii it stroke me as an advanced controller that is difficult to configure and use (I would not be here if not the code quality!) :)
So I got hooked up. I have had initial conversations with some people in here already and there seem to be an interest in creating a driver for MW for SoC boards (like Raspberry Pi, RPi Zero, Odroid, BeagleBlack, etc). This way we can extend MultiWii functionality. Obviously this requires the multirotor to carry 2 boards - MW & SoC. So here it is - all done.

This project aims to simplify and extend the functionality of MultiWii by providing set of packages such as mw-mavlink (that makes MultiWii mavlink capable so you can use i.e. QGroundControl), mw-ws (that allows user to monitor and control MultiWii through a web-browser), mw-ps3 (to fly MultiWii using a PS3 controller), mw-cli (to control it from a command line), or mw-config (to configure, compile and flash MultiWii without the use of any additional programmers).

All of this is achieved through the use of a driver (mw-service) that it designed to run on a auxiliary *nix SoC board like Beagleboard, Raspbery Pi, Odroid, etc (the SoC has to be running an *nix OS)

More details https://github.com/rpicopter/mw-config

Update 15 April 2016:
- added web-based configure, compile & flash for MultiWii
- implemented mavlink protocol (see QGroundControl: http://qgroundcontrol.io)

Update 09 Feb 2016:
- flight testing
- *nix C library
- we have now PS3 controller support (https://github.com/rpicopter/mw-ps3)
- Accelerometer, gyroscope and magnetometer live charting
- the WWW is fully functional (iOS, Android, Windows, etc)

Under consideration next:
- GPS waypoint for MavLink

Thanks for you interest,
Gregory

Re: A better MultiWii

Posted: Sun Nov 22, 2015 12:14 am
by gregd72002
The overview diagram:
https://drive.google.com/open?id=0B1EN5jc2aDarSU55b0p2cGhjMlk

And some thoughts I was going through before (are not 100% accurate anymore):
https://drive.google.com/open?id=1HeYxoN9jTgfYBbH0Ydijs9qYTlkQ21db0yQOyqvO73o

Re: A better MultiWii

Posted: Sat Jan 23, 2016 6:04 pm
by gregd72002
I have progressed the project quite a bit. The service coding is now pretty much finished (should be fully portable to any architecture) and the thing to do is to write some nice HTML. I have also partially implemented MultiWii JavaScript library (should be complete soon) so I would need some help with the front end HTML if someone is up for it.

I will be adding some live charting for attitude the next days so stay tuned.

https://github.com/rpicopter/mw-www

Re: A better MultiWii

Posted: Sat Jan 23, 2016 8:53 pm
by Leo
Interesting.....

Do you have a video e.g. on YouTube that gives an overview of the www software in action?

Re: A better MultiWii

Posted: Sun Jan 24, 2016 7:30 pm
by gregd72002
This is really a service and JavaScript library so far, so it's kind of difficult to make an impressive video out of it. Though, might try to make one once I have got more of the html written. Meantime I've added a simple attitude page and PID page and ensured all works on Android and iOS devices.

Re: A better MultiWii

Posted: Tue Feb 09, 2016 11:33 pm
by gregd72002
Some updates in here:
- added PS3 controller support
- implemented live charting for accelerometer, gyroscope and magnetometer
- finished the basic WWW

Going forward:
- looking into GPS waypoint navigation - so you can set waypoints during the flight through your mobile
- considering web-based configuration and programming utility - to allow re-compilation and flashing of MultiWii firmware from mobile

Re: A better MultiWii

Posted: Tue Mar 15, 2016 12:51 am
by jjrolls
Can you integrate an ESP8266 wifi module with this software?

Re: A better MultiWii

Posted: Tue Mar 15, 2016 10:38 pm
by gregd72002
I would rather say this software is an alternative to ESP8266 if you really want to compare them. To use ESP8266 you will most likely need to alter MW code (correct me if I am wrong).

This software (mw-service in particular) is a service that runs on any *nix capable board (like RPi, Beagleboard, ec) . It integrates with MultiWii over UART (uses MSP) and provides a communication API. On top of it you can install mw-www which further extends the functionality by exposing WebSocket interface so you can connect to it and issue commands to MultiWii via a web browser. At the moment we are also considering creating a mw-mavlink service to allow integration with ie. qgroundcontrol.

Re: A better MultiWii

Posted: Fri Apr 15, 2016 8:40 pm
by gregd72002
New updates:
- we have now mavlink support - works with QGroundControl: http://qgroundcontrol.io
- this means you can configure and control your MultiWii from PC/Mac/Android/iOS etc
- support for web based configure, compile and flash of MultiWii (no need for any additional AVR programmer)

On the work:
- further extensions to mavlink support

Re: A better MultiWii

Posted: Mon May 02, 2016 3:13 am
by JaeNYCCT
Hi
I am a big fan of your work you have done some impressive things
i have compiled and installed all packaged you have to offer
but i am stuck at the last phase,
how can i implement this onto an apache server thats on my raspberry pi 3 jessie image
i am stuck for i cannot run ./autogen.sh on the mw-www aspect.
I don't know where to put the www folder

Re: A better MultiWii

Posted: Mon May 02, 2016 10:15 am
by gregd72002
Hi,

The mw-www consist of 2 parts - proxy and actual html code (www). Just run ./autogen.sh, make, make install inside the proxy folder.
And copy the 'www' folder into your apache web folder. (You could rename into into something more meaningful)
The apache web folder is usually located inside /var/www/html

Hope this helps

Re: A better MultiWii

Posted: Fri May 06, 2016 7:23 pm
by JaeNYCCT
Thanks! that actually helped perfectly, I used the www from mw-config rather than mw-service, it worked far better in the apache server. the www on mw-service didn't work for me.
Now i have everything running without errors, i can confirm that since i go to the www folder on my apache server form my browser i have checks next to everything, no x's what so ever
I even initiate ./mw to see the outputs the ps3 controller is giving out, and it changes and works, (had to change the joystick from js0 to js1 on the ps3.c file line "ret=rec_open("/dev/input/js0",&js);"

It all seems to work but my motors never turn on, how do i arm the motors to start flying.
thank for all your help,

p.s. i was unable to install mw-mavlink. I ran ./autogen.sh successfully but am not able to sudo make or sudo make install the file, Error 1 is products telling me mw_mavlink-mw.o failed when i try to sudo make. Do i need mw-mavlink to make this work?

This is an awesome package

Re: A better MultiWii

Posted: Fri May 06, 2016 8:03 pm
by JaeNYCCT
small update, i may have messed up the www folder last time, because i downloaded it again and put it in the apache server folder in var/www/ and it works greatly, i see many tabs now and can see the accelerometer gyro and mag working under charts

I still can't get the ps3 controller to turn the motors on though, its as if the program is not communicating with the ps3, because it is definitely connected and communicating with the raspberry pi.

Re: A better MultiWii

Posted: Sat May 07, 2016 5:29 am
by JaeNYCCT
please help me out, with this last part, thank you friend

Re: A better MultiWii

Posted: Sun May 08, 2016 11:01 am
by gregd72002
You should be checking the RC section of the www to verify if the PS3 controller works. To arm it is the standard multiwii stick combo - bottom-right on the thrust/yaw stick

Re: A better MultiWii

Posted: Sun May 08, 2016 7:12 pm
by JaeNYCCT
I went on the RC section and i don't see anything moving when i move my ps3 joystick around, i tried using the bottom then right command on the joystick and nothing seems to get armed

update:
i connected the ps3 controller its connected through bluetooth, i see it has 1 lit on the light diagram ontop of the controller
but when i run utils/mw-ps3.sh
its on a continuous loop saying
opening shm
opening shm
opening shm
(have to press ctrl + z to get out of loop)
what should i do ? so it won't stay on the opening shm loop

when i do my presentation for class i will be sure to mention your help, thank you

Update:

I managed to get the opening shm to stop looping simply by first running mw-ps3 on the mw-ps3 folder then i opened utils/mw-ps3.sh
but now i get unknown commands showing up as a loop
suck as
unknown command :4
unknown command :5
unknown command :8
unknown command :8
when i move the joystick around
how can i make this a known command ?


then if i press x or triangle keys on ps3
i toggle keys with the button X
BOAR :65555
BOAR:0
with triangle:
HORIZON:0
HORIZON:65555
can i program the square and circle keys too ?

thanks for your help

Re: A better MultiWii

Posted: Sun May 08, 2016 11:07 pm
by gregd72002
It looks like you are on top of it. The unknown command message is fine, not all buttons are mapped and pressing them will result in the message. Seeing the x or circle changing box value means the PS3 controller is connected correctly. When you use the PS3 controller analogue sticks should work and you should see the RC value changing (you do not need to be armed to see changes on the RC section).

Re: A better MultiWii

Posted: Mon May 09, 2016 3:02 am
by JaeNYCCT
gregd72002 wrote:It looks like you are on top of it. The unknown command message is fine, not all buttons are mapped and pressing them will result in the message. Seeing the x or circle changing box value means the PS3 controller is connected correctly. When you use the PS3 controller analogue sticks should work and you should see the RC value changing (you do not need to be armed to see changes on the RC section).


I am not seeing the values change through rc tab, what can I do about that?
and what are the proper commands on pay controller to arm the little fella and disarm

Re: A better MultiWii

Posted: Mon May 09, 2016 9:50 am
by gregd72002
Bare with me for a few days. I'll need to look into it later this week. From what you say it sounds like the PS3 controller you are using is different to the one I've got and tested with. It will be trivial to get this to work I just need to update the program so it reports the details of the controller you've got there and we can take it from there.

Meantime you could try to connect your controller to your PC and get QGroundControl. This will let you fly too. You will need to go to the www of MW-config and change the IP for me-mavlink

Re: A better MultiWii

Posted: Mon May 09, 2016 8:20 pm
by JaeNYCCT
i see it is still under heavy development, well i believe the reason i could not get it to run well its because i was unable to install sixad because there is no support for it on jessie image of raspberry pi. I also was using the latest raspberry pi 3 with wifi and bluetooth build on it. Which image of raspberry pi are you using if you don't mind me asking? i am about to do it all over again on Wheezy image now.

Re: A better MultiWii

Posted: Tue May 10, 2016 11:10 am
by gregd72002
Hi, I'm using Jessie. It works fine there. No need for sixad as PS3 is supported in the kernel. The only thing you may need is the sixpair if you intend to use the PS3 over Bluetooth. I'll be back at my pc later this week to check the details

Re: A better MultiWii

Posted: Wed May 11, 2016 5:25 am
by JaeNYCCT
gregd72002 wrote:Hi, I'm using Jessie. It works fine there. No need for sixad as PS3 is supported in the kernel. The only thing you may need is the sixpair if you intend to use the PS3 over Bluetooth. I'll be back at my pc later this week to check the details


well i would love to try it over mavlink but i get an error when i try to sudo make the file

it tells me

makefile:416 recipe for target 'mw_mavlink-mw.o' failed
make: *** [mw_mavlink-mw.o] Error 1

with a lot of previous errors on on there not being a member named active on boxconf.active

I'm trying very hard to make this work, now i just want to be able to control it over the web page

Re: A better MultiWii

Posted: Thu May 12, 2016 8:47 am
by JaeNYCCT
hey sorry but i am doing this all over again, when you told me to install inside the proxy server, i have no idea where the proxy server location is, could you please point it out ? i know the web folder for the apache2 server is in /var/html/. Thank you !

Re: A better MultiWii

Posted: Thu May 12, 2016 10:16 am
by gregd72002
Hi, I'm back after holidays so should be able to assist more now. Sorry for all the delays.

As far as I understand you've got RPi and an Arduino (or similar board). Based on the screenshots it looks like you had the mw-service installed correct as well as the mw-www and mw-config.
You have also flashed the arduino with the correct code.
The WWW pages should be copied to your apache folder. You have done it correctly as otherwise nothing would work.

Also, lets forget about mw-mavlink for the time being and try to get the mw-ps3 to work if this makes sense? If you encounter any problems at any stage I will need to see the entire outcome rather than the last error message. You could paste it in here or pastebin.com if needed.

So the missing bit was mw-ps3 that it was not reporting your joystick movements. I suggest to plug the joystick via USB at the beginning to test things so there is no need to install anything in additional like sixpair, etc.
All joystick movements (L3 and R3) should be reflected in the RC section on the www.
https://raw.githubusercontent.com/gregd ... PS3map.jpg

Let me know how far you get to and we will take it from there.

Re: A better MultiWii

Posted: Fri May 13, 2016 1:48 am
by JaeNYCCT
gregd72002 wrote:Hi, I'm back after holidays so should be able to assist more now. Sorry for all the delays.

As far as I understand you've got RPi and an Arduino (or similar board). Based on the screenshots it looks like you had the mw-service installed correct as well as the mw-www and mw-config.
You have also flashed the arduino with the correct code.
The WWW pages should be copied to your apache folder. You have done it correctly as otherwise nothing would work.

Also, lets forget about mw-mavlink for the time being and try to get the mw-ps3 to work if this makes sense? If you encounter any problems at any stage I will need to see the entire outcome rather than the last error message. You could paste it in here or pastebin.com if needed.

So the missing bit was mw-ps3 that it was not reporting your joystick movements. I suggest to plug the joystick via USB at the beginning to test things so there is no need to install anything in additional like sixpair, etc.
All joystick movements (L3 and R3) should be reflected in the RC section on the www.
https://raw.githubusercontent.com/gregd ... PS3map.jpg

Let me know how far you get to and we will take it from there.


well im glad your back hope it went well for you
well now I think it's an issue with the proxy, i dont have a proxy server at all and you mention to install the proxy folder in your proxy server

can i use tiny proxy on rasping jessie and host the proxy folder in there?
what is a basic overall configuration I should do? I know it has to do with port 8888

please let me know how I can set up the proxy server to work with my apache2 hosting from folder mw-www/www. in directory var/www/html

ps Im a total newbie you can explain in detail if you can lol, this is really my first raspberry pi project! :D

thanks a ton

Re: A better MultiWii

Posted: Fri May 13, 2016 11:38 am
by gregd72002
you do not need dedicated proxy server. The mw-www comes with its own proxy (see mw-www/proxy folder). You just need to compile it and install, that's all.
based on your pictures you had it running before.
the mw-www/www uses than this proxy to communicate with mw-service.

Some background info:
- there are different types of proxies - i.e. html, socks, udp...
- the one we are using is a special proxy that translates messages between WebSocket and the MW-SERVICE
- we use it to allow our website to speak to the multiwii service

To get you up and running you just need:
- web server (apache is perfectly fine)
- compile and install mw-service
- compile and install mw-www/proxy
- copy mw-www/www into your apache web folder
- compile and install mw-config
- copy mw-config/www into your apache web folder (you might want to rename it so the names do not clash)
- compile and install mw-ps3

Then just run "mw-config-start.sh" every boot to start everything up. If everything is fine than you will get this: download/file.php?id=3810&mode=view

Re: A better MultiWii

Posted: Fri Oct 14, 2016 1:05 pm
by ninjaandy
hi
i would like to run the multiwii conf gui on my raspberry pi3

have you tried this?

Re: A better MultiWii

Posted: Fri Oct 28, 2016 11:32 am
by gregd72002
Hi, no I have not tried it. I'm flying using QGroundControl

Re: A better MultiWii

Posted: Tue Nov 15, 2016 7:58 pm
by mark07eur
Hello,
This has been the best post I have found in dealing with a Rasppi and multiwii board. Thank you for your development. I've installed everything here and it all works with the mw service and all web config parameters. I can't seem to make qgroundcontroller to work. I'm running it on OSX, it says it connects over UDP, gives me no feedback though and doesn't seem to read anything off the board. My GPS is working, can arm the motors with a TX.

Not sure what I'm missing
MultiWiiGui works as it should

Any help would be appreciated. thank you!!

Re: A better MultiWii

Posted: Fri Feb 10, 2017 10:06 pm
by gregd72002
hi,

have you install mw-mavlink?
have you configure mw-mavlink so it points to your qgroundcontrol? https://github.com/rpicopter/mw-mavlink ... link.start
you should be able to configure it using mw-config www