2018-12-18 04:26:22 -04:00
|
|
|
#!/bin/sh
|
2018-07-12 15:50:47 -03:00
|
|
|
#
|
|
|
|
# Vehicle configuration setup script.
|
|
|
|
#
|
|
|
|
# NOTE: Script variables are declared/initialized/unset in the rcS script.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
2018-07-26 21:18:53 -03:00
|
|
|
# Fixed wing setup.
|
2018-07-12 15:50:47 -03:00
|
|
|
#
|
2018-09-27 06:11:12 -03:00
|
|
|
if [ $VEHICLE_TYPE = fw ]
|
2018-07-12 15:50:47 -03:00
|
|
|
then
|
2018-07-31 14:17:09 -03:00
|
|
|
# Start standard fixedwing apps.
|
2020-10-14 17:15:02 -03:00
|
|
|
. ${R}etc/init.d/rc.fw_apps
|
2018-07-12 15:50:47 -03:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
2018-07-26 21:18:53 -03:00
|
|
|
# Multicopter setup.
|
2018-07-12 15:50:47 -03:00
|
|
|
#
|
2018-09-27 06:11:12 -03:00
|
|
|
if [ $VEHICLE_TYPE = mc ]
|
2018-07-12 15:50:47 -03:00
|
|
|
then
|
2018-07-26 21:18:53 -03:00
|
|
|
# Start standard multicopter apps.
|
2020-10-14 17:15:02 -03:00
|
|
|
. ${R}etc/init.d/rc.mc_apps
|
2018-07-12 15:50:47 -03:00
|
|
|
fi
|
|
|
|
|
2023-12-01 06:03:27 -04:00
|
|
|
#
|
2023-12-04 06:21:15 -04:00
|
|
|
# UGV setup.
|
2023-12-01 06:03:27 -04:00
|
|
|
#
|
2023-12-04 06:21:15 -04:00
|
|
|
if [ $VEHICLE_TYPE = rover ]
|
2023-12-01 06:03:27 -04:00
|
|
|
then
|
|
|
|
# Start standard UGV apps.
|
2023-12-04 06:21:15 -04:00
|
|
|
. ${R}etc/init.d/rc.rover_apps
|
2023-12-01 06:03:27 -04:00
|
|
|
fi
|
|
|
|
|
2018-07-12 15:50:47 -03:00
|
|
|
#
|
2023-12-04 06:21:15 -04:00
|
|
|
# Differential Rover setup.
|
2018-07-12 15:50:47 -03:00
|
|
|
#
|
2023-12-04 06:21:15 -04:00
|
|
|
if [ $VEHICLE_TYPE = rover_differential ]
|
2018-07-12 15:50:47 -03:00
|
|
|
then
|
2023-12-04 06:21:15 -04:00
|
|
|
# Start differential drive rover apps.
|
|
|
|
. ${R}etc/init.d/rc.rover_differential_apps
|
2018-07-12 15:50:47 -03:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
2018-07-31 14:17:09 -03:00
|
|
|
# VTOL setup.
|
2018-07-12 15:50:47 -03:00
|
|
|
#
|
2018-09-27 06:11:12 -03:00
|
|
|
if [ $VEHICLE_TYPE = vtol ]
|
2018-07-12 15:50:47 -03:00
|
|
|
then
|
2018-07-31 14:17:09 -03:00
|
|
|
# Start standard vtol apps.
|
2020-10-14 17:15:02 -03:00
|
|
|
. ${R}etc/init.d/rc.vtol_apps
|
2018-07-12 15:50:47 -03:00
|
|
|
fi
|
2018-07-12 17:45:19 -03:00
|
|
|
|
2020-08-10 03:52:51 -03:00
|
|
|
#
|
|
|
|
# Airship setup.
|
|
|
|
#
|
|
|
|
if [ $VEHICLE_TYPE = airship ]
|
|
|
|
then
|
|
|
|
# Start airship apps.
|
2020-10-14 17:15:02 -03:00
|
|
|
. ${R}etc/init.d/rc.airship_apps
|
2020-08-10 03:52:51 -03:00
|
|
|
fi
|
|
|
|
|
2020-02-05 00:24:37 -04:00
|
|
|
#
|
|
|
|
# UUV setup
|
|
|
|
#
|
|
|
|
if [ $VEHICLE_TYPE = uuv ]
|
|
|
|
then
|
|
|
|
# Start standard vtol apps.
|
2020-10-14 17:15:02 -03:00
|
|
|
. ${R}etc/init.d/rc.uuv_apps
|
2020-02-05 00:24:37 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-12 17:45:19 -03:00
|
|
|
#
|
|
|
|
# Generic setup (autostart ID not found).
|
|
|
|
#
|
2018-09-27 06:11:12 -03:00
|
|
|
if [ $VEHICLE_TYPE = none ]
|
2018-07-12 17:45:19 -03:00
|
|
|
then
|
|
|
|
echo "No autostart ID found"
|
2020-10-27 11:56:11 -03:00
|
|
|
ekf2 start &
|
2018-07-12 17:45:19 -03:00
|
|
|
fi
|