mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
adapted and added ROMFS-scripts to support VTOL
This commit is contained in:
@@ -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
|
||||||
|
|||||||
15
ROMFS/px4fmu_common/init.d/rc.vtol_apps
Normal file
15
ROMFS/px4fmu_common/init.d/rc.vtol_apps
Normal 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
|
||||||
39
ROMFS/px4fmu_common/init.d/rc.vtol_defaults
Normal file
39
ROMFS/px4fmu_common/init.d/rc.vtol_defaults
Normal 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
|
||||||
@@ -546,6 +546,45 @@ then
|
|||||||
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
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user