2017-09-25 12:17:50 -03:00
|
|
|
#!nsh
|
|
|
|
#
|
|
|
|
# @name Generic Ground Vehicle
|
|
|
|
#
|
|
|
|
# @type Rover
|
|
|
|
# @class Rover
|
|
|
|
#
|
|
|
|
# @output MAIN2 steering
|
|
|
|
# @output MAIN4 throttle
|
|
|
|
#
|
|
|
|
# @maintainer
|
|
|
|
#
|
2018-01-06 06:09:57 -04:00
|
|
|
# @board px4fmu-v2 exclude
|
|
|
|
#
|
2017-09-25 12:17:50 -03:00
|
|
|
|
|
|
|
sh /etc/init.d/rc.ugv_defaults
|
|
|
|
|
|
|
|
if [ $AUTOCNF == yes ]
|
|
|
|
then
|
|
|
|
param set BAT_N_CELLS 2
|
|
|
|
|
|
|
|
param set FW_AIRSPD_MIN 0
|
|
|
|
param set FW_AIRSPD_TRIM 1
|
|
|
|
param set FW_AIRSPD_MAX 3
|
|
|
|
|
|
|
|
param set NAV_ACC_RAD 0.5
|
|
|
|
|
|
|
|
param set MIS_LTRMIN_ALT 0.01
|
|
|
|
param set MIS_TAKEOFF_ALT 0.01
|
|
|
|
|
|
|
|
param set EKF2_GBIAS_INIT 0.01
|
|
|
|
param set EKF2_ANGERR_INIT 0.01
|
|
|
|
param set EKF2_MAG_TYPE 1
|
|
|
|
|
|
|
|
param set GND_WR_P 2
|
|
|
|
param set GND_WR_I 0.9674
|
|
|
|
param set GND_WR_IMAX 0.1
|
|
|
|
param set GND_WR_D 1.2
|
|
|
|
param set GND_SP_CTRL_MODE 1
|
|
|
|
param set GND_L1_DIST 10
|
|
|
|
param set GND_THR_IDLE 0
|
|
|
|
param set GND_THR_CRUISE 0
|
|
|
|
param set GND_THR_MAX 0.5
|
|
|
|
param set GND_THR_MIN 0
|
|
|
|
param set GND_SPEED_P 0.25
|
|
|
|
param set GND_SPEED_I 0.001
|
|
|
|
param set GND_SPEED_D 3
|
|
|
|
param set GND_SPEED_IMAX 0.125
|
|
|
|
param set GND_SPEED_THR_SC 1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Configure this as ugv
|
|
|
|
set MAV_TYPE 10
|
|
|
|
|
|
|
|
# Set mixer
|
|
|
|
set MIXER ugv_generic
|
|
|
|
|
|
|
|
# Provide ESC a constant 1500 us pulse
|
|
|
|
set PWM_DISARMED 1500
|
|
|
|
set PWM_MAIN_REV2 1
|
|
|
|
set PWM_MAX 2000
|
|
|
|
set PWM_MIN 1000
|