adapted and added ROMFS-scripts to support VTOL

This commit is contained in:
Roman Bapst
2014-12-02 10:30:26 +01:00
parent 39169c35fe
commit 48ba912f08
4 changed files with 110 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
# 10000 .. 10999 Wide arm / H frame # 10000 .. 10999 Wide arm / H frame
# 11000 .. 11999 Hexa Cox # 11000 .. 11999 Hexa Cox
# 12000 .. 12999 Octo Cox # 12000 .. 12999 Octo Cox
# 13000 .. 13999 VTOL
# #
# Simulation # Simulation
@@ -237,3 +238,19 @@ if param compare SYS_AUTOSTART 12001
then then
sh /etc/init.d/12001_octo_cox sh /etc/init.d/12001_octo_cox
fi fi
#
# VTOL quadshot
#
if param compare SYS_AUTOSTART 13000
then
sh /etc/init.d/13000_quadshot
fi
#
# VTOL caipririnha
#
if param compare SYS_AUTOSTART 13001
then
sh /etc/init.d/13001_caipirinha_vtol
fi

View File

@@ -0,0 +1,15 @@
#!nsh
#
# Standard apps for vtol:
# att & pos estimator, att & pos control.
#
attitude_estimator_ekf start
#ekf_att_pos_estimator start
position_estimator_inav start
vtol_att_control start
mc_att_control start
mc_pos_control start
fw_att_control start
fw_pos_control_l1 start

View File

@@ -0,0 +1,39 @@
#!nsh
set VEHICLE_TYPE vtol
if [ $DO_AUTOCONFIG == yes ]
then
#
#Default controller parameters for MC
#
param set MC_ROLL_P 6.0
param set MC_ROLLRATE_P 0.1
param set MC_ROLLRATE_I 0.0
param set MC_ROLLRATE_D 0.003
param set MC_PITCH_P 6.0
param set MC_PITCHRATE_P 0.2
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_D 0.003
param set MC_YAW_P 4
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.0
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.3
#
# Default parameters for FW
#
param set FW_PR_FF 0.3
param set FW_PR_I 0.000
param set FW_PR_IMAX 0.2
param set FW_PR_P 0.02
param set FW_RR_FF 0.3
param set FW_RR_I 0.00
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.02
fi
set PWM_DISARMED 900
set PWM_MIN 1000
set PWM_MAX 2000

View File

@@ -545,7 +545,46 @@ then
sh /etc/init.d/rc.mc_apps sh /etc/init.d/rc.mc_apps
fi fi
fi fi
#
# VTOL setup
#
if [ $VEHICLE_TYPE == vtol ]
then
echo "[init] Vehicle type: VTOL"
if [ $MIXER == none ]
then
echo "Default mixer for vtol not defined"
fi
if [ $MAV_TYPE == none ]
then
# Use mixer to detect vehicle type
if [ $MIXER == FMU_quadshot ]
then
set MAV_TYPE 20
fi
fi
# Still no MAV_TYPE found
if [ $MAV_TYPE == none ]
then
echo "Unknown MAV_TYPE"
else
param set MAV_TYPE $MAV_TYPE
fi
# Load mixer and configure outputs
sh /etc/init.d/rc.interface
# Start standard vtol apps
if [ $LOAD_DEFAULT_APPS == yes ]
then
sh /etc/init.d/rc.vtol_apps
fi
fi
# #
# Start the navigator # Start the navigator
# #