add support for unmanned underwater vehicles (#14079)

* add support for unmanned underwater vehicles:
* airframe uuv_generic + uuv_hippocammpus including mav_type = 12 for submarines
* mixer for UUVs with X-shaped thruster setup similar to quadcopter
* add module  uuv_att_control for underwater robot attitude control
* add rc.uuv_defaults/apps for autostarting e.g. ekf2 and uuv_att_control app
This commit is contained in:
Daniel Duecker
2020-02-04 23:24:37 -05:00
committed by GitHub
parent a82428c5fd
commit 36f836be79
23 changed files with 1072 additions and 31 deletions
@@ -1,8 +0,0 @@
#!/bin/sh
#
# @name Hippocampus UUV
#
sh /etc/init.d/rc.mc_defaults
set MIXER uuv_quad_x
@@ -0,0 +1,23 @@
#!/bin/sh
#
# @name UUV
#
sh /etc/init.d/rc.uuv_defaults
if [ $AUTOCNF = yes ]
then
#Set data link loss failsafe mode (0: disabled, 4: Data Link Auto Recovery (CASA Outback Challenge rules))
param set NAV_DLL_ACT 0
# disable circuit breaker for airspeed sensor
param set CBRK_AIRSPD_CHK 162128
#param set CBRK_GPSFAIL 240024
fi
set MAV_TYPE 12
param set MAV_TYPE ${MAV_TYPE}
set MIXER_FILE etc/mixers-sitl/uuv_x_sitl.main.mix
set MIXER custom
@@ -0,0 +1,23 @@
#!/bin/sh
#
# @name Hippocampus UUV
#
sh /etc/init.d/rc.uuv_defaults
if [ $AUTOCNF = yes ]
then
#Set data link loss failsafe mode (0: disabled, 4: Data Link Auto Recovery (CASA Outback Challenge rules))
param set NAV_DLL_ACT 0
# disable circuit breaker for airspeed sensor
param set CBRK_AIRSPD_CHK 162128
#param set CBRK_GPSFAIL 240024
fi
set MAV_TYPE 12
param set MAV_TYPE ${MAV_TYPE}
set MIXER_FILE etc/mixers-sitl/uuv_x_sitl.main.mix
set MIXER custom
@@ -46,6 +46,8 @@ px4_add_romfs_files(
rc.thermal_cal
rc.rover_apps
rc.rover_defaults
rc.uuv_apps
rc.uuv_defaults
rc.vehicle_setup
rc.vtol_apps
rc.vtol_defaults
@@ -0,0 +1,29 @@
#!/bin/sh
#
# @name Generic Underwater Robot
#
# @type Underwater Robot
# @class Underwater Robot
#
# @board px4_fmu-v2 exclude
#
# @maintainer
#
sh /etc/init.d/rc.uuv_defaults
if [ $AUTOCNF = yes ]
then
#Set data link loss failsafe mode (0: disabled, 4: Data Link Auto Recovery (CASA Outback Challenge rules))
param set NAV_DLL_ACT 0
# disable circuit breaker for airspeed sensor
param set CBRK_AIRSPD_CHK 162128
#param set CBRK_GPSFAIL 240024
fi
set MAV_TYPE 12
param set MAV_TYPE ${MAV_TYPE}
set MIXER uuv_x
@@ -0,0 +1,29 @@
#!/bin/sh
#
# @name HippoCampus UUV (Unmanned Underwater Vehicle)
#
# @type Underwater Robot
# @class Underwater Robot
#
# @board px4_fmu-v2 exclude
#
# @maintainer Daniel Duecker <daniel.duecker@tuhh.de>
#
sh /etc/init.d/rc.uuv_defaults
if [ $AUTOCNF = yes ]
then
#Set data link loss failsafe mode (0: disabled, 4: Data Link Auto Recovery (CASA Outback Challenge rules))
param set NAV_DLL_ACT 0
# disable circuit breaker for airspeed sensor
param set CBRK_AIRSPD_CHK 162128
#param set CBRK_GPSFAIL 240024
fi
set MAV_TYPE 12
param set MAV_TYPE ${MAV_TYPE}
set MIXER uuv_x
@@ -146,4 +146,8 @@ px4_add_romfs_files(
50001_axialracing_ax10
50002_traxxas_stampede_2wd
50003_aion_robotics_r1_rover
# [60000, 61000] (Unmanned) Underwater Robots
60000_uuv_generic
60001_uuv_hippocampus
)
+26
View File
@@ -0,0 +1,26 @@
#!/bin/sh
#
# Standard apps for uuvs. Attitude/Position estimator, Attitude/Position control.
#
# NOTE: Script variables are declared/initialized/unset in the rcS script.
#
###############################################################################
# Begin Estimator Group Selection #
###############################################################################
ekf2 start
###############################################################################
# End Estimator Group Selection #
###############################################################################
#
# Start UUV Attitude Controller.
#
uuv_att_control start
#
# Start UUV Land Detector.
#
land_detector start rover
@@ -0,0 +1,35 @@
#!/bin/sh
#
# UUV default parameters.
#
# NOTE: Script variables are declared/initialized/unset in the rcS script.
#
set VEHICLE_TYPE uuv
if [ $AUTOCNF = yes ]
then
param set PWM_MAX 1950
param set PWM_MIN 1050
param set PWM_DISARMED 1500
fi
#
# PWM Hz - 50 Hz is the normal rate in RC cars, boats etc,
# higher rates may damage analog servos.
#
set PWM_RATE 50
#
# Enable servo output on pins 1-4
set PWM_OUT 1234
set PWM_DISARMED 1500
#
# This is the gimbal pass mixer.
#
set MIXER_AUX pass
set PWM_AUX_OUT 1234
set PWM_AUX_RATE 50
@@ -147,6 +147,26 @@ then
sh /etc/init.d/rc.vtol_apps
fi
#
# UUV setup
#
if [ $VEHICLE_TYPE = uuv ]
then
if [ $MIXER = none ]
then
echo "UUV mixer undefined"
fi
# Load mixer and configure outputs.
sh /etc/init.d/rc.interface
# Start standard vtol apps.
sh /etc/init.d/rc.uuv_apps
fi
#
# Generic setup (autostart ID not found).
#
@@ -37,4 +37,5 @@ px4_add_romfs_files(
rover_sitl.main.mix
standard_vtol_sitl.main.mix
tiltrotor_sitl.main.mix
uuv_x_sitl.main.mix
)
@@ -0,0 +1,25 @@
Mixer for Unmanned Underwater Vehicles (UUV) with X-Motor configuration
==========================================================================
# @board px4_fmu-v2 exclude
M: 4
S: 0 0 -4000 -4000 0 -4000 4000
S: 0 1 -4000 -4000 0 -4000 4000
S: 0 2 +4000 +4000 0 -4000 4000
S: 0 3 +4000 +4000 0 -4000 4000
M: 4
S: 0 0 +4000 +4000 0 -4000 4000
S: 0 1 -4000 -4000 0 -4000 4000
S: 0 2 -4000 -4000 0 -4000 4000
S: 0 3 +4000 +4000 0 -4000 4000
M: 4
S: 0 0 -4000 -4000 0 -4000 4000
S: 0 1 +4000 +4000 0 -4000 4000
S: 0 2 -4000 -4000 0 -4000 4000
S: 0 3 +4000 +4000 0 -4000 4000
M: 4
S: 0 0 +4000 +4000 0 -4000 4000
S: 0 1 +4000 +4000 0 -4000 4000
S: 0 2 +4000 +4000 0 -4000 4000
S: 0 3 +4000 +4000 0 -4000 4000
@@ -84,4 +84,5 @@ px4_add_romfs_files(
wingwing.main.mix
zmr250.main.mix
TF-AutoG2.main.mix
uuv_x.main.mix
)
-22
View File
@@ -1,22 +0,0 @@
# @board px4_fmu-v2 exclude
M: 4
S: 0 0 -10000 -10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000
S: 0 2 +10000 +10000 0 -10000 10000
S: 0 3 +10000 +10000 0 -10000 10000
M: 4
S: 0 0 +10000 +10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000
S: 0 2 -10000 -10000 0 -10000 10000
S: 0 3 +10000 +10000 0 -10000 10000
M: 4
S: 0 0 -10000 -10000 0 -10000 10000
S: 0 1 +10000 +10000 0 -10000 10000
S: 0 2 -10000 -10000 0 -10000 10000
S: 0 3 +10000 +10000 0 -10000 10000
M: 4
S: 0 0 +10000 +10000 0 -10000 10000
S: 0 1 +10000 +10000 0 -10000 10000
S: 0 2 +10000 +10000 0 -10000 10000
S: 0 3 +10000 +10000 0 -10000 10000
+25
View File
@@ -0,0 +1,25 @@
Mixer for Unmanned Underwater Vehicles (UUV) with X-Motor configuration
==========================================================================
# @board px4_fmu-v2 exclude
M: 4
S: 0 0 -4000 -4000 0 -10000 10000
S: 0 1 -4000 -4000 0 -10000 10000
S: 0 2 +4000 +4000 0 -10000 10000
S: 0 3 +4000 +4000 0 -10000 10000
M: 4
S: 0 0 -4000 -4000 0 -10000 10000
S: 0 1 +4000 +4000 0 -10000 10000
S: 0 2 +4000 +4000 0 -10000 10000
S: 0 3 -4000 -4000 0 -10000 10000
M: 4
S: 0 0 -4000 -4000 0 -10000 10000
S: 0 1 +4000 +4000 0 -10000 10000
S: 0 2 -4000 -4000 0 -10000 10000
S: 0 3 +4000 +4000 0 -10000 10000
M: 4
S: 0 0 -4000 -4000 0 -10000 10000
S: 0 1 -4000 -4000 0 -10000 10000
S: 0 2 -4000 -4000 0 -10000 10000
S: 0 3 -4000 -4000 0 -10000 10000