Page 1 of 1

Hardware in the loop simulation

Posted: Sun May 04, 2014 8:32 pm
by treym
TL;DR : This is about hardware in the loop simulation : having an multiwii flight controller running in a flight simulator .

Baseflight and Multiwii are supported along with FlightGear simulator .

There is a new msp_set_attitude message in the private range of the protocol.

You will find some more detailed information in the multiwii-mavlink-gc wiki. feel free to comment .

Here is a short maiden flight in horizon mode and some switch to accro mode .




Image

Re: Hardware in the loop simulation

Posted: Wed May 07, 2014 7:57 pm
by brm
very nice!
need to play with it.

Re: Hardware in the loop simulation

Posted: Thu May 08, 2014 1:39 am
by Dilbert66
Liking it. Nice work

Re: Hardware in the loop simulation

Posted: Thu May 08, 2014 6:04 pm
by brm
the latest git stuff does not compile.
neither windows nor linux...

Re: Hardware in the loop simulation

Posted: Thu May 08, 2014 7:03 pm
by treym
what does it says ?

if this is about __STRICT_ANSI__and -pedantic .. i wont change that ;)

Re: Hardware in the loop simulation

Posted: Thu May 08, 2014 7:37 pm
by brm
treym wrote:what does it says ?

if this is about __STRICT_ANSI__and -pedantic .. i wont change that ;)


MAVLINK_SRC_CFLAGS := -lm

ähh!?
you mean linker flags, isn't it ;-)

adminuser@adminuser-VirtualBox:~/multiwii-mavlink-gc$ make
cc -lm -o src/mwgc/mwgc-1.1 src/mwgc/mwgc.o src/serial/serialport.o src/mwi/mwi.o src/utils/utils.o src/mwgc/conf.o
src/mwgc/mwgc.o: In Funktion `callBack_mwi':
/home/adminuser/multiwii-mavlink-gc/src/mwgc/mwgc.c:720: Nicht definierter Verweis auf `lrintf'
/home/adminuser/multiwii-mavlink-gc/src/mwgc/mwgc.c:720: Nicht definierter Verweis auf `lrintf'
/home/adminuser/multiwii-mavlink-gc/src/mwgc/mwgc.c:728: Nicht definierter Verweis auf `lrintf'
/home/adminuser/multiwii-mavlink-gc/src/mwgc/mwgc.c:732: Nicht definierter Verweis auf `lrintf'
/home/adminuser/multiwii-mavlink-gc/src/mwgc/mwgc.c:732: Nicht definierter Verweis auf `lrintf'
src/mwgc/mwgc.o:/home/adminuser/multiwii-mavlink-gc/src/mwgc/mwgc.c:509: Weitere nicht definierte Verweise auf `lrintf' folgen
collect2: error: ld returned 1 exit status

you should not use this function in an mcu.
it is a pain what it uses in terms of resources.

edit:
before i forget it - write a cmake file.
make files are shit.

Re: Hardware in the loop simulation

Posted: Thu May 08, 2014 8:16 pm
by m3us
Great work on the groundcontrol mate,thanks for all the help in getting me up to pace with the workings :)
@brm the windows version should compile now ,i could put up the exe if needed
Ill soon edit this with a video of my quads

Re: Hardware in the loop simulation

Posted: Thu May 08, 2014 8:25 pm
by treym
i removed lib math , please tries again

what mcu are you using ?


ps : make is everywhere .. cmake is not everywhere

Re: Hardware in the loop simulation

Posted: Thu May 08, 2014 9:26 pm
by brm
treym wrote:i removed lib math , please tries again

what mcu are you using ?

ps : make is everywhere .. cmake is not everywhere


oh, all mcu's which are decent.
8 bit is braindamaged to a certain extend.
but event with 32 bits it can happen to run out of cpu cycles.
and this happens often ;-)

love it to have a pelican in my hands...

and yes. it compiles :)

Re: Hardware in the loop simulation

Posted: Thu May 08, 2014 9:52 pm
by brm
@treym
hmm,
je vriend uit amersfoort benut zo een flexbot.
is dat ding goed?

Re: Hardware in the loop simulation

Posted: Thu May 08, 2014 10:04 pm
by treym
i dont knwo anything about that flexbot , but as far as it look , it dont look attractive to me .

Hardware in the loop simulation

Posted: Fri May 09, 2014 4:43 pm
by koenkooi
I'm not using this for the flexbot yet, that needs a Bluetooth LE to serial bridge first.

Re: Hardware in the loop simulation

Posted: Sat May 10, 2014 4:31 am
by timecop
koenkooi wrote:I'm not using this for the flexbot yet, that needs a Bluetooth LE to serial bridge first.


flexbot sounds really dumb.
3D printing 100 frames was OK idea, proceeding with that plan after getting 10K+ orders was beyond retarded.
Using obsolete hardware on new product in 2014, even more so.

Re: Hardware in the loop simulation

Posted: Sun May 11, 2014 12:01 am
by treym
old 8bit 328p can now run in simulation
Image

36h long fly away .....
Image

Re: Hardware in the loop simulation

Posted: Fri May 23, 2014 6:43 pm
by PatrikE
Can someone please share a runnable version for windows?
I can't get it to compile.

Patrik

Re: Hardware in the loop simulation

Posted: Sat May 24, 2014 11:54 am
by Plüschi
PatrikE wrote:Can someone please share a runnable version for windows?


+1

Re: Hardware in the loop simulation

Posted: Sat May 24, 2014 12:00 pm
by treym

Re: Hardware in the loop simulation

Posted: Mon Dec 01, 2014 11:08 am
by universam
Hi,

we have an issue with MWII that we cant reproduce in lab, so I'm curious if it could be simulated with HIL simulation?

As posted here http://www.multiwii.com/forum/viewtopic.php?f=8&t=364&start=450#p59144
flying an airplane acrobatic on a roll with several turns the plane doesn't stop but keeps on rolling :roll:
So I wanted to ask kindly if anyone having a working HIL could try that once which would be of great benefit?

THANKS! :P

Re: Hardware in the loop simulation

Posted: Tue Dec 09, 2014 1:43 pm
by treym
i did not see anything weird yet , i am not using the most suitable planes for acro .. will do extensive testing later