Servo outputs disappear when switching to 6dof scripting from hex frame type

Dear amazing devs,

For the last while I have been working on a 6 dof hex copter project for the last few months and have finally gotten to the physical testing phase. Up to this point I have been using the FRAME_CLASS of hex with the FRAME_TYPE of X while troubleshooting other aspects such as esc’s and radio controls. However, now that I have changed my FRAME_CLASS to 16 (6dof scripting) my motors will no longer spin up. I have both 6dof lua scripts that are required loaded in and they seem to be running. They display the messages that are expected and inside of the servo output section of mission planner I can see green bars where each of my motors are defined. Unfortunately when I arm or attempt to use motor test nothing happens.

Some things that I have tried:

  • Swapping from bidirectional dshot to regular dshot
  • Sending different messages from within the script to make sure they are being executed
  • Going back and forth between frame classes to make sure that something wiring related or physical has not changed
  • Searched through the github repo to try to find where the RCout message is coming from

The greatest evidence of something weird going on is that when I use hex the RCout is:
DS600:1-4 PWM:5-6 DS600:7-8 PWM:9

But when I switch to 6Dof all I get is
PWM:1-8
This happens even when changing nothing in else in my parameter list.

Any ideas? I am drawing a complete blank and scared this project may never get off the ground.
I’m happy to provide any additional information that you guys think may be relevant!

Thanks for your time I look forward to hearing your wise suggestions.

If it’s any consolation when I duplicate what you are describing I see the same thing on a Cube Orange+ on the bench (no script loaded):
Configure for Bdshot on the 1st 6 outputs with FRAME_CLASS, 2
Hex
Then set FRAME_CLASS, 16
6dof

No idea why this is. “Check frame class and type” pre-arm messages are displayed also. Perhaps because there is no script running or do you see these messages?

That makes me feel a little bit better that it is repeatable. I do have the scripts running and it does not give me the “Check frame class and type” pre arm message. Here is what I received in my messages:

In the servo output section it also displays my motors as expected

I have never see a “motors should be setup” message before. Why don’t you try configuring PWM on the 1st 6 outputs and see if the motors run in Motor Test.

That motors should be setup was a message I added to the script to tell me that it was run

My esc’s all use DSHOT, doesn’t that mean nothing will work if I swap them to PWM?

Try setting SERVO_BLH_OTYPE and SERVO_BLH_MASK. Although I would have expected it to work from motors if it works with a normal frame type.

https://ardupilot.org/copter/docs/parameters.html#servo-blh-otype-blheli-output-type-override

1 Like

AYYYYYY!!! setting SERVO_BLH_OTYPE seems to have fixed it!!!

Once I changed that I am now able to spin up my motors in motor test

New problem has cropped up now that I am trying to swap back to my original bidirectional dshot parameters. After changing to servo_blh_bdmask and my servo_dshopt_esc to BLHeli_S/BlueJay +EDT I am back to nothing spinning

No. All ESC’s will run on PWM. But great that you have it working.

It is now unfortunately a “had it working” scenario since I have moved on to bidirectional dshot giving me the same problems as I had before changing otype :smiling_face_with_tear:

I think the issue stems from the fact that SERVO_BLH_OTYPE overrides the output type for SERVO_BLH_MASK and does not override the output type for SERVO_BLH_BDMASK. This means I might have to search for the problem that is causing me to need to override in the first place

Could the gap in my servo outputs be causing an error? @iampete does the Motors_6DoF:add_motor reference the servo motor numbers or the servo output numbers? This could explain why it is having some issues as well as only allowing me to do motor test for 4 of the motors

The Hwdef file for that board would seem to show only the 1st 4 chanells suport Bdshot:
Kakute H7-bdshot
PB0 TIM3_CH3 TIM3 PWM(1) GPIO(50) BIDIR
PB1 TIM3_CH4 TIM3 PWM(2) GPIO(51)
PB3 TIM2_CH2 TIM2 PWM(3) GPIO(52) BIDIR
PB10 TIM2_CH3 TIM2 PWM(4) GPIO(53) BIDIR

Wow, that’s unfortunate. I guess when I was running in hex it still somehow worked but wasn’t returning telemetry for the last two esc’s which I never noticed because I did not scroll far enough in the status page.

The V2 version does. Other flight controllers have up to 10.