Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why not run flight controller under Linux?
#16
I believe there are real time versions of linux or other RTOS that are optimized specifically for running in these scenarios where latency is critical. And with these more powerful processors that can access greater amounts of ram, running vision processing, path optimization, AI, or other high level processes can become integrated into one system.

But developing a sophisticated flight control software that works as well as BF is not an easy task, and until some embedded linux or other RTOS decides they will spend the time and effort to do so... Betaflight runs on a $10 arm processor, add another $20 in board and components. At this point it is much easier to leave the flight control portion to BF and simply have a separate brain processor run your complex algorithms and send the commands to BF. For example even the computer controlled drone that beat the top human racing pilots uses a radio transmitter to give stick inputs to a standard FC (BF?).

However if you want your drone to fly simple way points, not particularly picky about flight performance, and experienced with control systems then it is probably not too hard to get a working simple controller that will keep you in the air.

As for building vs buying if you plan to run standard BF: If you are more interested in the control side, then I would say just get a BNF, save yourself the $ and time,  and start immediately on the part that interests you. However if you are comfortable with electronics and want to learn more about drones, then definitely build one yourself. Great for learning, will take you more time, cost you more money for sure (tools, spares, mistakes, etc), but be careful it may turn into an uncontrollable addiction as well.
Reply
Login to remove this ad | Register Here
#17
(27-Feb-2024, 03:38 PM)iFly4rotors Wrote: Hi enok,

I believe that learning is a good thing and if that is one of your objectives, 
than that is all fine. Maybe you will discover something useful and can share
that with others for the improvement of the hobby. Or maybe you develop
something that can be marketed.

Yeah, one method might be to re-write everything yourself from the ground
up and move toward something new. Of course, if you are talking about using
a whole different chip, then you are also talking about making (manufacturing)
a whole new FC board. Keep in mind that size is also a consideration and the
kind of craft that the unit could be installed in. 

You might also consider if and how your concepts can be programmed to 
interface with existing firmware such as Betaflight or iNav or maybe a fork
off one of those. If this works out, then (at least in theory), your "brain"
board and firmware could be added to existing BNF quads and FC boards.
Just a thought. 

By the way, what country do you live in? 



Later, iFly   High Five

What about "ardupilot" and "px4"? Is it correct that these are more specialized against aircraft-like things (with wing and rudders, not quadcopters)?

Is "pixhawk" perhaps a system to start building on? (if not choosing that path to do everything from scratch just for fun/learning)

And yeah, I guess I would start with interfacing evaluation boards and availiable subsystem parts and demonstrate something that can fly, and leave the work with weight/space optimized custom board later.
I live in Sweden. (And I'm not considering any armed or dangerous application, so neither NSA nor any russian agency should feel alarmed  Cool )
Reply
#18
(27-Feb-2024, 04:39 PM)enok71 Wrote: What about "ardupilot" and "px4"? Is it correct that these are more specialized against aircraft-like things (with wing and rudders, not quadcopters)?

Is "pixhawk" perhaps a system to start building on? (if not choosing that path to do everything from scratch just for fun/learning)

I have absolutely NO experience Nor knowledge of any of the above. In pondering it, 
you are likely correct; any of the above might be a better choice for ground level
developing and experimenting just for fun. 


And yeah, I guess I would start with interfacing evaluation boards and availiable subsystem parts and demonstrate something that can fly, and leave the work with weight/space optimized custom board later.

Yet again, I am confused. When you say "demonstrate something that can fly"
do you mean basic flight control then what feature or function would you be
adding on top of that. If you start with a quad that already has "flight control"
firmware and features, where does your proposed firmware fit and what does
it do? 

Somehow, I still seem to be missing something. In some sense, it sounds like
duplicating existing flight control features on a different platform. Sort of like
porting the FC firmware to a different chip set. Like what UNIX was developed
for in the first place. 


I live in Sweden. (And I'm not considering any armed or dangerous application, so neither NSA nor any russian agency should feel alarmed  Cool )

I live in the USA where all airspace is regulated by the FAA, so there is that.
I want to stay legit and observe the FAA regulations. Not that it matters much
if one is simply developing products or firmware, still, the craft will be flown
in regulated airspace.

Hi enok,


You know, you might be able to port Arduino or something to the chip that
you intend to use. Yes, you would need to construct the hardware; the whole 
9 yards; a functional hardware flight controller. This would be an electronics
project. Sort of like building a computer mother board from scratch on 
breadboard or something. From what I can tell, the hardware has to come
first or you nothing to run the software on. Hmm. Think about it.

Now, this is way beyond my knowledge and skill set so I would be out of it.

Once you have the hardware, you could try simply porting over an existing
flight control software; probably Arduino or something; just as it is. Do a
straight up port. Get that to work first and build a working craft with that
entire system; hardware and software.

Once you get this far, then it is a simple matter of enhancing and updating
your software for what ever features that you want or need.


Later, iFly  
______________________________________
My BUILDS  ||   My INDEX   ||  Parts Guide  <-- Download


Reply
#19
When I was starting out in fpv and I didn't know if I want to spend money on it I went down the same path. Ardupilot works fine on a raspberry pi zero 2 w running raspbian. You can connect a spi gyro, and there is a pwm breakout board that you attach over gpio for few bucks. I also run OpenHD for video on the very same rpi zero 2w. It handled both perfectly fine, but this was a winged plane (3d printed eclipson model A in lightweight pla), not a quad. I'm not sure how well would a quad fly like this.

I even designed and printed a nice housing that held my rpi zero 2w, and power regulation as well as all the little boards I attached to it (I had a baro and a magnetometer too). Gps was separated on a wing. If anyone is interested I can post some pictures.

I initially run my rx over openhd from a laptop using a gamepad, but then I "upgraded" to super cheap transmitter/rx combo with 8 pwm channels. Also I had to use stock raspbian and learn how to patch wifi drivers to have openhd work on it. At the time stock openhd came with its own Linux image running ancient kernel.

It worked fine until I crashed it very badly, but it flew long enough for me to understand I like this hobby. I bought proper flight controllers, I built my first 5 in quadand the rest of what I did was pretty standard.

So in summary, can you do it? Yes, will it be convenient? No. Will you learn anything? I doubt it. I much prefer to run ardupilot on a proper flight controller and have rpi zero connected via uart to do interesting stuff like image processing etc.
[-] The following 1 user Likes Luk5569's post:
  • enok71
Reply
#20
Evidently, there are tons of stuff out there that look very similar to
what you are considering doing. I didn't want to go too far down
that rabbit hole, but thought I would share a few that I found.

In fact, this first one looks pretty much exactly what you intend to do:




Here are some more videos that I came across this morning:








______________________________________
My BUILDS  ||   My INDEX   ||  Parts Guide  <-- Download


[-] The following 1 user Likes iFly4rotors's post:
  • enok71
Reply
#21
(27-Feb-2024, 06:10 PM)Luk5569 Wrote: When I was starting out in fpv and I didn't know if I want to spend money on it I went down the same path. Ardupilot works fine on a raspberry pi zero 2 w running raspbian. You can connect a spi gyro, and there is a pwm breakout board that you attach over gpio for few bucks. I also run OpenHD for video on the very same rpi zero 2w. It handled both perfectly fine, but this was a winged plane (3d printed eclipson model A in lightweight pla), not a quad. I'm not sure how well would a quad fly like this.

I even designed and printed a nice housing that held my rpi zero 2w, and power regulation as well as all the little boards I attached to it (I had a baro and a magnetometer too). Gps was separated on a wing. If anyone is interested I can post some pictures.

I initially run my rx over openhd from a laptop using a gamepad, but then I "upgraded" to super cheap transmitter/rx combo with 8 pwm channels. Also I had to use stock raspbian and learn how to patch wifi drivers to have openhd work on it. At the time stock openhd came with its own Linux image running ancient kernel.

It worked fine until I crashed it very badly, but it flew long enough for me to understand I like this hobby. I bought proper flight controllers, I built my first 5 in quadand the rest of what I did was pretty standard.

So in summary, can you do it? Yes, will it be convenient? No. Will you learn anything? I doubt it. I much prefer to run ardupilot on a proper flight controller and have rpi zero connected via uart to do interesting stuff like image processing etc.

That's really interesting. Thanks for sharing! And yes, please post pictures. What "proper flight controller" would you suggest? And what you're saying is that quad is better path than winged plane? (I suppose since this forum is dedicated to quads that's an expected bias?)

I still find it hard do believe you didn't learn a lot on that project.
Reply
#22
(27-Feb-2024, 06:31 PM)iFly4rotors Wrote: Evidently, there are tons of stuff out there that look very similar to
what you are considering doing. I didn't want to go too far down
that rabbit hole, but thought I would share a few that I found.
Thanks!
Quote:I live in the USA where all airspace is regulated by the FAA, so there is that.
I want to stay legit and observe the FAA regulations. Not that it matters much
if one is simply developing products or firmware, still, the craft will be flown
in regulated airspace.

We need various licenses here to fly drones nowadays. But my guess is that AI drones will be even much more strictly regulated in the future, just like we now strictly control e.g. handheld SAM missiles. It's just too potentially dangerous.
[-] The following 1 user Likes enok71's post:
  • iFly4rotors
Reply
#23
They should never allow AI to control drones or anything else that can be used as a weapon. Leave it for things that don't potentially end with the death of everyone on the planet.
Try Not, Do or Do Not
- Yoda

[-] The following 1 user Likes Pathfinder075's post:
  • iFly4rotors
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Beta flight settings caddx vista... whatever 19 9,484 22-Jun-2023, 03:10 PM
Last Post: mattyfleischfpv
  Using a old aio fc as a wireless sim controller Rob Axel 7 827 06-Sep-2022, 02:06 AM
Last Post: Rob Axel
  Flight data / Telemetry K.Flucas@937 5 2,978 14-Nov-2020, 10:42 PM
Last Post: EVILsteve
  Tutorial Turning Off Inversion Circuit on F4 Flight Controller voodoo614 7 9,542 25-Oct-2020, 07:26 AM
Last Post: jseaber
  Mavic Pro Controller Hack Treetops 5 1,721 03-Apr-2020, 11:11 AM
Last Post: SnowLeopardFPV


Login to remove this ad | Register Here