Copter 6DoF_Scripting Frame class PreArm fail

Hi, I am working on a 6DoF copter like vehicle but I always get this message when I change the motor frame class to 16: PreArm: Check firmware or FRAME_CLASS . I have also turned SCR_ENABLE to 1 and reboot my Pixhawk CubeBlack before changing the motor frame class.

Any ideas why and/or suggestions to fix this?

Were you able to find a solution?

Yes!

I was using a Pixhawk CubeBlack and it is unable to handle 6DoF_Scripting because it requires the use of Lua Scripting. A CubeBlack isn’t really able to handle Lua Scripting (unless your scripts are simple).

So, I upgraded to a CubeOrange and everything worked out!

Hello, I was wondering if you could check if I followed all the steps needed to run 6DOF.

  1. I changed frame class to 16, src_enable to 1
  2. I added the two 6DOF lua files (6DoF_roll_pitch.lua and Motors_6DoF.lua) to the SD card

The motors do run and arm, but when I plug the battery to the drone. All the motors start spinning even when disarmed. Is this something you’ve experienced? Also, please let me know if I am missing any steps.

The setup script assumes all motors are setup as reversible 3D. If there not they will spin when disarmed.

Is there a documentation on how to set up the motors as reversible 3D? I’m new to Ardupilot and I’m having trouble with this.

Not a AP thing, its a ESC setting. I used BLHeil_32 esc and set reversible 3D using the configorator tool.

If you don’t have reversible motors you can set false in the Motors-6DoF.lua script.
E.G.

Motors_6DoF:add_motor(0,  0.003285,  0.470445,  0.031489,  0.885866,  0.563927,  0.031026, false, 1)

However if you don’t have reversible motors that mixer will not work well, you would have to derive a new one.

Thank you for replying. Really quick question, did you use DSHOT or PWM for your 6DOF drone?

DSHOT 600 I think, you will have a hard time calibrating otherwise. The midpoint is hardcoded to 1500us.

Everything seems to be working now. Thank you for all the help.

Hey Peter, I am running into problems again with operating 6DOF flight. When I first connect the drone to Mission Planner, the “Messages” section outputs "Frame: 6DOF Scripting, RCout PWM1-14. To fix it and run DSHOT, I usually change the frame class=2 and change it back to 16, then the output looks like "Frame: 6DOF example, RCout PWM1-8 DS600 9-12. However, due to the fact that it was configured to hexarotor, the mapping of the throttles on the RC mimics that of a hexarotor. However, when things were all working fine I remember the messages saying “6DOF Scripting, RCout PWM1-8 DS600 9-12”. How do you make sure the system is running DSHOT on frame_class=16?

SERVO_BLH_MASK and SERVO_BLH_OTYPE

1 Like

So great to hear others building based on Peter’s design. I have a prototype I’ve built to test: motors arm fine, scripts are running, but no liftoff. I’ve double checked all motors are in 3D mode and outputs 1-6 are Dshot 300 and spinning correctly. AP is set to stabilize mode and plenty of sats, etc. A little baffled. Any thoughts or experiences? It’s been months of work and I feel so close!

So, you are saying that your motors are spinning but they aren’t generating enough thrust to take-off when you increase throttle, is that right?

Yes, all spinning the directions outlined below. I have the 2 .lua scripts running as well. The frame is not that heavy and running 5" motors on 6s.

If you haven’t done it, maybe calibrate your ESCs will help: Electronic Speed Controller (ESC) Calibration — Copter documentation

and make sure that your RC is generating the desired outputs (Radio calibration in Mission Planner).

How many 5’’ thrusters are acting vertically and what is your drone’s weight?

1 Like

Got it working! Just needed to activate the 3D motor parameters. (motors 1-6)

Has anyone been able to activate the 4DOF script? Trying to set option 300 to a RC channel ( looking at the code on git, but it dies not seem to activate.

1 Like

Hey Peter, I am now trying to map the throttle on the RC to reflect FullReverse → Idle → FullForward as you push the throttle upwards. But, right now, I am achieving only Idle → FullForward. I’ve read some stuff online and saw that I have to use the SERVO_BLH_3DMASK parameter to run reversible dshot, but when I enable that parameters, the DSHOT feature disappears and the messages print “PWM 1-14” again. Do you know how I can achieve this FullReverse → Idle → FullForward behavior on the RC with 6DOF scripting?

The 6DoF code will not allow throttle of lower than 0. If you want to fly upside down you would set a roll 180 offset and use positive throttle.

I see. Are there any changes I can make to the 6DOF code to achieve the FullReverse → Idle → FullForward behavior with the throttle? In other words, can I not perform bidirectional motor movement during flight?

Also, I’m having trouble understanding the roll 180 offset. Is this a parameter I set in the Motor_6DOF lua file?

As always, thank you for the help.