12many

  • **
  • 66
How to configure a custom airframe type?
« on: June 13, 2016, 08:44:57 pm »
Hi,

I'm trying to configure LibrePilot for a custom vehicle that has > 8 props.  I had assumed the hardware & software supported such a beast since although it's uncommon the hardware supports up to 12 PWM outputs and I saw what looked like support for 12 channels in places such as the Configuration/Vehcile/Custom page.

However, now that I'm starting to play with the specific configuration, I might be wrong but I think I'm seeing oddities and looking at the source I see at least on the custom configuration page that it looks like support only extends up to Motor8.

I still have a LOT of learning to do, but if someone could point out potential problems I might encounter I would be grateful.

Am I correct that > 8 motor configuration might be problematic without source code modifications?  I'm happy to add the functionality but will a pull request be accepted?

In the meantime, I'm thinking of getting some servo signal amplifiers and just driving groups of motors as a 'virtual' single motor, defining mixer value for a given motor group as the 'center of lift' for that group.  Will that work?  Hmm, yaw might be a problem...

If this is problematic on a Revolution 'classic' (things like CPU utilization might be an issue?), am I better off switching to a different FC?

Anyone have thoughts / ideas / suggestions on this?  Any help would be greatly appreciated.

12many

  • **
  • 66
Re: How to configure a custom airframe type?
« Reply #1 on: June 14, 2016, 08:17:54 am »
I've been struggling a bit trying to figure out how to configure a custom 9-prop airframe for a while now.  I've been reading source-code for several days and it's still not obvious how to accomplish what I need to do.  The key appears to be in vehicleconfigurationhelper.cpp, but the how & why of things like bank modes evades my crusty old 8-bit brain.  From what I can tell, none of the existing vehicle types will accomplish what I need.  And support for > 8 motors looks a bit iffy.

Perhaps I'm going about it all wrong and should just ask straight-out:  Does anyone know the procedure for configuring a custom airframe?  It seems that not using the configuration wizard leaves everything uninitialized, but using the wizard leaves behind artifacts that later effect the configuration I'm trying to set up.  Sort of a catch-22.

Can anyone help me?  I'm trying to figure this out without relying on others; reading source code is great (and I'm generally impressed with the quality) but it's resulting mostly in spinning wheels and I'd like to fly this vehicle some day.

Thanks in advance for help anyone can provide.

Re: How to configure a custom airframe type?
« Reply #2 on: June 14, 2016, 08:51:46 am »
Have you tried playing around in the custom tab on the vehicle configuration page?
There you can set up a custom mix, as in how outputs should react to, for example a yaw command.
Documentation for that feature is a bit not really there, but selecting Octocopter configuration, the normal way you would, then proceeding to mess around on the custom vehicle configuration tab should give you a nice starting point.

hwh

  • *
  • 1018
Re: How to configure a custom airframe type?
« Reply #3 on: June 14, 2016, 04:26:49 pm »
Dave,

It appears that parts support up to 12 motors and parts don't.  I've put in an improvement request to make it all 12.
https://librepilot.atlassian.net/browse/LP-337

-Hank


12many

  • **
  • 66
Re: How to configure a custom airframe type?
« Reply #4 on: June 14, 2016, 09:00:09 pm »
Have you tried playing around in the custom tab on the vehicle configuration page?
...

Thanks for the suggestions!  Actually I haven't tried starting with an octo, I'll have to give that a try today and note the differences.  I have figured out how to unlock the custom page; I'm just not getting the results I expected - things like defining a new channel as a motor and entering mix settings & saving, I expected to be able to go to the outputs page, enable live testing and be able to drag the corresponding slider.  The gets enabled and has reasonable min/max values, but it won't move.  Still trying to pin that issue down.

12many

  • **
  • 66
Re: How to configure a custom airframe type?
« Reply #5 on: June 14, 2016, 09:20:19 pm »
Dave,

It appears that parts support up to 12 motors and parts don't.  I've put in an improvement request to make it all 12.
https://librepilot.atlassian.net/browse/LP-337

-Hank

Thanks, this is great news!  However I don't expect you guys to make this a priority on my behalf.  I'm going to do what I can to fix LP-337 myself or do what I can at least to help.

I'm still a total n00b here, but it doesn't look like adding full support for an additional four motors will as straight-forward as I hoped.  It appears that customGUISettingsStruct  in vehicleconfig.h is used in GUIConfigDataUnion, which for some reason is a carefully packed 128 byte data structure.  I'm a little leery of expanding the size of this union struct since it touches quite a few other things. (?)

Do you or anyone know why GUIConfigDataUnion is packed so tightly like this?  It doesn't appear to be a UAVObject (used by UAVTalk).  I'm still guessing but it looks to be a GCS-side-only construct, and there's not a ton of instances flying around, if so it doesn't seem to make much sense to me why it would be so tightly packed.  Also I'm just starting to figure out what/what the RevMotor is for - if not needed that might be able to be resued, which would free up a whopping 32 bits, plenty of space.

Still, these comments are by "a guy who's been skimming the code for a few days", so full disclaimer - I don't actually know what I'm talking about.  Sorry about all the questions - don't spend too much trying to research things, if people don't know off the top of their heads I can figure it out as easily as anyone else.

I'm going to go in to the 'why I need this feature' in another post on this thread since it's getting a bit off-topic.

Hmm, should we move this over to a developer forum?  I hate to spam people in the general discussion section.

-Dave

hwh

  • *
  • 1018
Re: How to configure a custom airframe type?
« Reply #6 on: June 14, 2016, 09:31:21 pm »
No, continue here.  We normally merge similar threads and this will be moved if anyone thinks it needs to be somewhere else.

I'm being told by someone who knows much more than I do that you can configure 12 motors, the limit to 8 is a cosmetic and wizard thing.

You probably can't move the sliders because by default (without the wizard presetting them) the motor min and max are the same.   If you go through and change all the motor's max to something reasonable like 2000 you can move the sliders.

12many

  • **
  • 66
Re: How to configure a custom airframe type?
« Reply #7 on: June 14, 2016, 10:05:33 pm »
No, continue here.  We normally merge similar threads and this will be moved if anyone thinks it needs to be somewhere else.

I'm being told by someone who knows much more than I do that you can configure 12 motors, the limit to 8 is a cosmetic and wizard thing.

You probably can't move the sliders because by default (without the wizard presetting them) the motor min and max are the same.   If you go through and change all the motor's max to something reasonable like 2000 you can move the sliders.

Awesome, thanks for the feeback Hank!  I thought I had checked the min/max but it was late (really late) so I'll definitely take another look and let you know what develops.  :):):)

hwh

  • *
  • 1018
Re: How to configure a custom airframe type?
« Reply #8 on: June 14, 2016, 10:15:12 pm »
There's a company, in Germany, that has flown manned multirotor. Volocopter VC200 it's called.  Their first manned flight was on April 6th, 2016.   I think it's 18 motors.


12many

  • **
  • 66
Re: How to configure a custom airframe type?
« Reply #9 on: June 14, 2016, 10:29:20 pm »
There's a company, in Germany, that has flown manned multirotor. Volocopter VC200 it's called.  Their first manned flight was on April 6th, 2016.   I think it's 18 motors.

Thanks for the link!  Yep, I'm keenly aware of eVolo, ehang, etc.  I'm focusing on grids & low cost, easily manufacturable designs using mostly off-the-shelf components, at least initially.

In my humble opinion, eVolo is basically a helicopter in many respects.  i respect what they're doing, but I expect their vehicles are going to be expensive due to their use of carbon fiber layup and not to scale up beyond a certain level due to their frame design.  It's more aircraft than flying car.

eHang, at least their model 184 looks to be a crazy publicity stunt to me.  It would be a deathtrap.  I don't think I'd fly in it.  Suck a bird, clip a corner, break a prop and youre going down.

There are a lot of multi-prop ideas out there, but I think I've cornered the 'mutually supporting lattice' that I think is key.  Also my concepts are just aircraft aluminum sheetmetal punched out with a CNC punchpress and bent with a press brake.  Super conventional, easy to manufacture at scale, low cost but effective.  Sheetmetal is actually far better suited to the grid design, think of a 2D triangular lattice extruded in the third dimension and you're on the right track...


hwh

  • *
  • 1018
Re: How to configure a custom airframe type?
« Reply #10 on: June 14, 2016, 10:42:42 pm »
On the original question, 12 motors does seem to work.  It's just a cosmetic thing on the output tab that makes it look like it won't.  The assignment column is just to make it easier to read and keep track of what motor is where.  I set up one with 12 motors.  If I knew more about custom mixers it might even work  :)   The main downside of going past 8 motors is that you have to do all the settings by hand where up to 8 motors the wizard presets everything to reasonable values.

12many

  • **
  • 66
Re: How to configure a custom airframe type?
« Reply #11 on: June 15, 2016, 01:09:44 am »
Unfortunately for me the min/max appear to be set correctly (min=1000, max=1900 for all motor 9 outputs) yet sliders 5-9 are enabled yet not movable...  It's very probably some user-error problem on my side.  Will take a few hours for a deep-dive tonight and get back to you.


hwh

  • *
  • 1018
Re: How to configure a custom airframe type?
« Reply #12 on: June 15, 2016, 01:36:58 am »
Once you set 1-9 as motors on the vehicle->custom tab, saved, and applied the motors should be available on the output tab.

12many

  • **
  • 66
Re: How to configure a custom airframe type?
« Reply #13 on: June 16, 2016, 07:21:47 pm »
Just a FYI things have gotten busy at work and I won't be able to look at this until next week.  Will get back to you then.  Thanks for your help.

Re: How to configure a custom airframe type?
« Reply #14 on: June 17, 2016, 01:10:08 am »
Is it to be a simple symmetrical 12 motor multicopter?  Or something different like an octo with 4 horizontal pusher motors.

Assuming something simple: I need to check with some devs a little more, but it might be that the only thing missing is the GUI.  If you can calculate the mixer settings, you should be able to plug those in to a custom vehicle.  Or more likely from the looks of it, you will need to do all the setup (after perhaps selecting Outputs for RcvrPort and octo X or octo +) in System -> Settings.  Additions and changes (above an octo) for ActuatorSettings and MixerSettings would be required.

http://wiki.paparazziuav.org/wiki/RotorcraftMixing

Maybe you have already talked to Hank.