Chibi Pilot?..

This forum is about you. Feel free to discuss anything is related to embedded and electronics, your awesome projects, your ideas, your announcements, not necessarily related to ChibiOS but to embedded in general. This forum is NOT for support.
User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Location: Minsk, Belarus
Been thanked: 7 times

Chibi Pilot?..

Postby barthess » Wed Jun 06, 2012 6:44 pm

Hi guys,
After reading this viewtopic.php?f=2&t=452#p4071 and that viewtopic.php?f=4&t=374#p3291 posts I decide to share my project.
If you looking for some source code for starting point than you can try to look in my hobby project.
Disclaimer:
1) I made it for educational purpose and for fun.
2) Most of comments written in Russian, some architectural decision are ugly, some are overkill.
3) Highly probably I can not help you with you questions because have not too much free time.
https://github.com/barthess/u
Happy hacking!

trunet
Posts: 54
Joined: Fri Apr 06, 2012 7:18 pm

Re: Chibi Pilot?..

Postby trunet » Wed Jun 06, 2012 8:36 pm

Awesome work, congratulations.

noether
Posts: 91
Joined: Wed Nov 16, 2011 3:18 pm
Location: Groningen, The Netherlands
Contact:

Re: Chibi Pilot?..

Postby noether » Sat Jun 09, 2012 4:01 pm

Hi barthess,

I have started to migrate to ChibiOS for my autopilot as well.
I have decided for a RTOS because some tasks are really heavy and without a OS would be impossible.

Many of these tasks imply the use of algebra, and I want to ask you if you use (or looking at or planning) some C or C++ library algebra for embedded systems, without
the use of some syscalls such as malloc or free.

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Location: Minsk, Belarus
Been thanked: 7 times

Re: Chibi Pilot?..

Postby barthess » Sat Jun 09, 2012 4:50 pm

Hi noether,
What kind of algebra you mean? Probably CMSIS DSP library can solve your problem (it can be downloaded from ARM official site after free registration). And the DCM algorithm for gyro+accel+magnetometer fusion was taken from Starlino page http://www.starlino.com/dcm_tutorial.html and slightly adopted for my needs.

trunet
Posts: 54
Joined: Fri Apr 06, 2012 7:18 pm

Re: Chibi Pilot?..

Postby trunet » Sat Jun 09, 2012 7:10 pm

Hey guys,

What do you think about making a new open source project to a multiwii compatible multi-rotor flight controller using chibios? I'm thinking in using the multiwii configuration software to configure the flight controller initially and after that we can roll our own.

Let me know your impressions.

I don't have many spare time neither but we can do it together.

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Location: Minsk, Belarus
Been thanked: 7 times

Re: Chibi Pilot?..

Postby barthess » Sat Jun 09, 2012 8:03 pm

Now I am use http://qgroundcontrol.org/ initially created by Lorenz Meier for his quadrotor. Software slightly buggy but mostly usable for my cases. I am very impressed by its communication protocol (mavlink) and not interesting change it. My aircraft is fixed wing plane, but there is only stub for autopilot part of program, so you can create your own piloting logic. All I can propose is translation and cleaning of comments and improvement of code modularity.

noether
Posts: 91
Joined: Wed Nov 16, 2011 3:18 pm
Location: Groningen, The Netherlands
Contact:

Re: Chibi Pilot?..

Postby noether » Sat Jun 09, 2012 10:13 pm

barthess wrote:Hi noether,
What kind of algebra you mean? Probably CMSIS DSP library can solve your problem (it can be downloaded from ARM official site after free registration). And the DCM algorithm for gyro+accel+magnetometer fusion was taken from Starlino page http://www.starlino.com/dcm_tutorial.html and slightly adopted for my needs.


I will take a look at this library. I was looking for something like Eigen ( http://eigen.tuxfamily.org/index.php?title=Main_Page ) or Armadillo ( http://arma.sourceforge.net/ ). Eigen can produce everything static, just in compile time, but
I do not know why the library always calls for asserts (even with -NDEBUG), their developers have not paid so much attention to this bug as Eigen is not focused for embedded systems. Armadillo is also nice, but as it is based
on Lapack and Blas, it uses malloc and free (as far as I know, ChibiOS do not support that kind of stuff?).

I need the algebra for generate trajectories (guidance), applying control laws, navigation algorithms, etc (minimizing, splines, matrix factorization...).
I guess I could write them on my own, but I know that for sure it will not be faster or more reliable than well established libraries.

I have seen that you are using XBee. I have written drivers for these radios, but now I have to change the hardware layer. Are you using the DMA for your radios? (I guess we are using the same micro, STM32F4)

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Location: Minsk, Belarus
Been thanked: 7 times

Re: Chibi Pilot?..

Postby barthess » Sat Jun 09, 2012 10:32 pm

noether wrote:as far as I know, ChibiOS do not support that kind of stuff?

It supported, but not recommended. http://chibios.org/dokuwiki/doku.php?id ... age_memory

noether wrote: I have written drivers for these radios, but now I have to change the hardware layer. Are you using the DMA for your radios? (I guess we are using the same micro, STM32F4)

Yes I use XBee and in previous hardware version I used special driver for it, but now I use it in non packet mode with hardware flow control (simple and reliable). DMA in plans, but current realization uses serial driver.

trunet
Posts: 54
Joined: Fri Apr 06, 2012 7:18 pm

Re: Chibi Pilot?..

Postby trunet » Mon Jun 18, 2012 4:54 am

barthess: aren't you using any kind of remote controller(futaba, spektrum, ...)? everything is transmitted via digital link(xbee or something)?

I'm trying to implement the thread that will read all radio channels right now but I have so many questions regarding ICU, PWM and Timer channels. I'll try more here and post another question after.

User avatar
barthess
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Location: Minsk, Belarus
Been thanked: 7 times

Re: Chibi Pilot?..

Postby barthess » Mon Jun 18, 2012 6:46 am

trunet wrote:aren't you using any kind of remote controller(futaba, spektrum, ...)?

It's planned to be implemented (PPM from model receiver) later like a backup for emergency situation, but currently there is only digital xbee channel. Ancient version of ground software have realized gamepad capturing and transmiting via xbee, but current have not.


Return to “User Projects”

Who is online

Users browsing this forum: No registered users and 11 guests