I am trying to use a custom mixer that I wrote to control 8 PWM output channels. Based on code from the multicopter and helicopter modules I set the outputs in the mix function and I return 8.
In the px4io monitor command, I see the controls and it shows 8 outputs, but the last 4 never change. I have the PWM_OUT 12345678 set in the init.d config file.
I am obviously missing something. Any help would be appreciated
I’m having the same issue. Moving back to release 1.5.5 fixes it for me, so I think the problem must have been introduced between 1.5.5 and 1.6.0rc1. Can you confirm smgoza?
I’m not sure why, but it looks like in the older stable release one of the other mag drivers fails to start, so the system only has 3 total and doesn’t hit this error.
Sorry, my response is completely wrong. I’m on my phone and only saw the truncated topic name and your comment. Thought it was a response to this other Pixhawk 2 issue I’ve been looking at. Pixhawk 2 mag calibration failure with here GPS module
I forked V1.5.2 on Dec 9, 2016 time frame. If I can figure out how to merge in the 1.5.5 update, I will be glad to try it. One other thing I’m going to try a little later when I have time is to run the octocopter and see if the outputs work like anticipated for an octo.
That has always been the biggest problem with px4io. Since it is on the secondary processor, it makes it hard to decode. If I could find a good way to get diagnostics, then I could test better. I did put it on mixer_aux and could print data for all 8 outputs even though aux only supports 6.
I did try telling it to be an octo and did see 8 outputs change on the px4io monitor command, but that obviously does not use my mixer. Maybe something is not getting started? How would I know?
In terms of VTOL, the osprey is unique in that it can fly at various nacelle positions. All the docs I saw showed pixhawk only doing VTOL as a fast transition between the two. This osprey doesn’t need this to be fast, in fact slower might be better.
Maybe I should propose a more basic question… How should I set this up to run. Let’s say I want to call it a helicopter with 8 PWM outputs at 50Hz. What should the various config files look like? There are so many options it is hard to tell what to do.
PX4 VTOL basically hops between being a regular multicopter, and then a regular plane, with the vtol “controller” facilitating the transitions.
I think I’d need to take a step back and gain a better understanding of the Osprey in general, and then your particular model. It sounds like you have collective and cyclic pitch? How are the nacelles used other than straight forward and straight up?
The Rotormast Osprey model has collective and fore/aft cyclic on each rotor. In hover (ie nacelles pointed up), you have collective to control altitude, fore/aft to control fore/aft, differential fore/aft controls yaw and differential collective to control roll.
Adjusting the nacelle angle linearly mixes between the two. I’ve got all the mixing worked out.
At this stage, I would be overjoyed just to be able to hover in rate control manual mode and then eventually GPS position hold. Trying to get to that point has been more of an ordeal than I thought it should have been so any help is appreciated!
I found my problem. In px4iofirmware/mixer.cpp it turns out the mixer_text had a buffer limit of 200. I increased that to 300 and now it loads correctly. I currently have lots of options and exceeding the buffer caused it to fail creating the mixer class. As a side note, it did work for the aux mixer since that is using a different mixer.cpp file which added to the confusion.
@LorenzMeier does the low memory fix now mean we can extend “PX4IO_MAX_MIXER_LENGHT” beyond 230? Having similar problems with channels cutting out for large mixer files (4X for motors, + 4 elevons ->3 commands each)