forked from Archive/PX4-Autopilot
94 lines
2.6 KiB
Bash
94 lines
2.6 KiB
Bash
#!/usr/bin/bash
|
|
# PX4 commands need the 'px4-' prefix in bash.
|
|
# (px4-alias.sh is expected to be in the PATH)
|
|
source px4-alias.sh
|
|
|
|
uorb start
|
|
param load
|
|
param set MAV_TYPE 2
|
|
param set SYS_AUTOSTART 4010
|
|
param set SYS_RESTART_TYPE 2
|
|
param set SYS_MC_EST_GROUP 1
|
|
dataman start
|
|
param set BAT_N_CELLS 3
|
|
param set CAL_GYRO0_ID 2293768
|
|
param set CAL_ACC0_ID 1376264
|
|
param set CAL_ACC1_ID 1310728
|
|
param set CAL_MAG0_ID 196616
|
|
param set CAL_GYRO0_XOFF 0.01
|
|
param set CAL_ACC0_XOFF 0.01
|
|
param set CAL_ACC0_YOFF -0.01
|
|
param set CAL_ACC0_ZOFF 0.01
|
|
param set CAL_ACC0_XSCALE 1.01
|
|
param set CAL_ACC0_YSCALE 1.01
|
|
param set CAL_ACC0_ZSCALE 1.01
|
|
param set CAL_ACC1_XOFF 0.01
|
|
param set CAL_MAG0_XOFF 0.01
|
|
param set SENS_BOARD_ROT 0
|
|
param set SENS_BOARD_X_OFF 0.000001
|
|
param set COM_RC_IN_MODE 1
|
|
param set NAV_DLL_ACT 2
|
|
param set COM_DISARM_LAND 3
|
|
param set NAV_ACC_RAD 2.0
|
|
param set COM_OF_LOSS_T 5
|
|
param set COM_OBL_ACT 2
|
|
param set COM_OBL_RC_ACT 0
|
|
param set RTL_RETURN_ALT 30.0
|
|
param set RTL_DESCEND_ALT 5.0
|
|
param set RTL_LAND_DELAY 5
|
|
param set MIS_TAKEOFF_ALT 2.5
|
|
param set MC_ROLLRATE_P 0.2
|
|
param set MC_PITCHRATE_P 0.2
|
|
param set MC_PITCH_P 6
|
|
param set MC_ROLL_P 6
|
|
param set MPC_HOLD_MAX_Z 2.0
|
|
param set MPC_Z_VEL_P 0.6
|
|
param set MPC_Z_VEL_I 0.15
|
|
param set MPC_XY_VEL_P 0.13
|
|
param set MPC_XY_P 1.2
|
|
param set MC_PITCHRATE_MAX 150
|
|
param set MC_ROLLRATE_MAX 150
|
|
param set EKF2_GBIAS_INIT 0.01
|
|
param set EKF2_ANGERR_INIT 0.01
|
|
param set SDLOG_DIRS_MAX 7
|
|
# GPS only mode
|
|
param set LPE_FUSION 145
|
|
param set LPE_EPH_MAX 5
|
|
# enable fusion of landing target velocity
|
|
param set LTEST_MODE 1
|
|
param set PLD_HACC_RAD 0.1
|
|
|
|
replay tryapplyparams
|
|
simulator start -s
|
|
tone_alarm start
|
|
gyrosim start
|
|
accelsim start
|
|
barosim start
|
|
gpssim start
|
|
pwm_out_sim start
|
|
sensors start
|
|
commander start
|
|
land_detector start multicopter
|
|
navigator start
|
|
attitude_estimator_q start
|
|
local_position_estimator start
|
|
landing_target_estimator start
|
|
mc_pos_control start
|
|
mc_att_control start
|
|
mixer load /dev/pwm_output0 etc/mixers/quad_w.main.mix
|
|
mavlink start -u 14556 -r 4000000
|
|
mavlink start -u 14557 -r 4000000 -m onboard -o 14540
|
|
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u 14556
|
|
mavlink stream -r 50 -s LOCAL_POSITION_NED -u 14556
|
|
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u 14556
|
|
mavlink stream -r 50 -s ATTITUDE -u 14556
|
|
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u 14556
|
|
mavlink stream -r 50 -s ATTITUDE_TARGET -u 14556
|
|
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u 14556
|
|
mavlink stream -r 20 -s RC_CHANNELS -u 14556
|
|
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
|
|
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
|
|
logger start -e -t
|
|
mavlink boot_complete
|
|
replay trystart
|