VTOL octorotor tailsitter

#1

Hello,

I am new with px4. I am trying to fly a home-made VTOL octorotor tailsitter, and help would be welcome.

The aircraft is a composed of two wings and eight propellers, all oriented upward. There is no surface controls.

I did the following modifications in the code :

In “ROMFS/ px4fmu_common/init.d/rc.vtol_apps”, I added this to activate quaternions :
attitude_estimator_q start

In “ROMFS/ px4fmu_common/init.d/airframes”, I created my airframe “13014_octorotor_tailsitter” :
#!/bin/sh
#
# @name octorotor_tailsitter
#
# @type VTOL Quad Tailsitter
#
# @class VTOL
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 motor 5
# @output MAIN6 motor 6
# @output MAIN7 motor 7
# @output MAIN8 motor 8

sh /etc/init.d/rc.vtol_defaults

if [ $AUTOCNF = yes ]
then
	param set PWM_MAX 2000
	param set PWM_RATE 400

	param set VT_MOT_COUNT 8
	param set VT_IDLE_PWM_MC  1080
	param set VT_TYPE 0
fi

set MAV_TYPE 20

set MIXER octorotor_tailsitter

set PWM_OUT 12345678

In “ROMFS/ px4fmu_common/init.d-posix”, I added the file “1043_octorotor_tailsitter” :
#!/bin/sh
#
# @name octorotor_tailsitter
#
# @type VTOL Quad Tailsitter

sh /etc/init.d/rc.vtol_defaults

if [ $AUTOCNF = yes ]
then
	param set FW_AIRSPD_MAX 25
	param set FW_AIRSPD_MIN 14
	param set FW_AIRSPD_TRIM 16

	param set MC_ROLLRATE_P 0.3

	param set MIS_LTRMIN_ALT 10
	param set MIS_TAKEOFF_ALT 10
	param set MIS_YAW_TMT 10

	param set MPC_ACC_HOR_MAX 2
	param set MPC_ACC_HOR_MAX 2
	param set MPC_THR_MIN 0.1
	param set MPC_TKO_SPEED 1
	param set MPC_XY_P 0.15
	param set MPC_XY_VEL_D 0.005
	param set MPC_XY_VEL_I 0.2
	param set MPC_XY_VEL_P 0.05
	param set MPC_Z_VEL_MAX_DN 1.5
	param set MPC_Z_VEL_P 0.8

	param set NAV_ACC_RAD 5
	param set NAV_LOITER_RAD 80

	param set VT_F_TRANS_DUR 1.5
	param set VT_F_TRANS_THR 0.7
	param set VT_MOT_COUNT 8
	param set VT_TYPE 0

	param set WEST_EN 1
fi

set MAV_TYPE 20

set MIXER octorotor_tailsitter

In “ROMFS/ px4fmu_common/mixers”, I added the mixer file “octorotor_tailsitter.main.mix” :
# octorotor_tailsitter
R: 8rt 10000 10000 10000 0

In “src/lib/mixer/geometries”, I have added the geometry file “octorotor_tailsitter.toml” :
# octorotor_tailsitter

[info]
key = "8rt"
description = "octorotor tailsitter configuration"

[rotor_default]
axis      = [0.0, 0.0, -1.0]
Ct        = 1.0
Cm        = 0.05

[[rotors]]
name      = "M1"
position  = [0.225, -0.925, -0.866]
direction = "CW"

[[rotors]]
name      = "M2"
position  = [0.225, -0.380, -0.866]
direction = "CCW"

[[rotors]]
name      = "M3"
position  = [0.225, 0.380, -0.866]
direction = "CW"

[[rotors]]
name      = "M4"
position  = [0.225, 0.925, -0.866]
direction = "CCW"

[[rotors]]
name      = "M5"
position  = [-0.426, -0.925, 0.192]
direction = "CCW"

[[rotors]]
name      = "M6"
position  = [-0.426, -0.380, 0.192]
direction = "CW"

[[rotors]]
name      = "M7"
position  = [-0.426, 0.380, 0.192]
direction = "CCW"

[[rotors]]
name      = "M8"
position  = [-0.426, 0.925, 0.192]
direction = "CW"

For @type, is it correct to put VTOL Quad Tailsitter
In the toml file, do I have to enter the real geometry of the rotors or do I have to normalized it ?
What do you think of my modifications ? Do I need to modify other things ?
In fixed wing mode, do the rotors be able to control the aircraft ?

Many thanks for your help.