fake_imu (formally fake_gyro) updates for testing gyro filtering

- fake_imu now publishes sine sweeps over 10 seconds
 - accel is also published so that fake IMU can be selected when the only option
This commit is contained in:
Daniel Agar
2021-05-17 20:26:25 -04:00
committed by GitHub
parent 39c90c8fc9
commit c3884b5bc1
70 changed files with 206 additions and 99 deletions

View File

@@ -0,0 +1,51 @@
#!/bin/sh
# PX4 commands need the 'px4-' prefix in bash.
# (px4-alias.sh is expected to be in the PATH)
. px4-alias.sh
param load
param set CBRK_SUPPLY_CHK 894281
param set SYS_RESTART_TYPE 0
dataman start
tone_alarm start
ver all
param set IMU_GYRO_RATEMAX 2000
param set IMU_GYRO_FFT_EN 1
param set IMU_GYRO_FFT_MIN 1
param set IMU_GYRO_FFT_MAX 1000
# test values
param set IMU_GYRO_CUTOFF 40
param set IMU_DGYRO_CUTOFF 30
#param set IMU_GYRO_NF_FREQ 60
#param set IMU_GYRO_NF_BW 5
# log nearly everything
param set SDLOG_PROFILE 859
fake_imu start
sensors start
gyro_fft start
logger start -f -t -b 10000 -p sensor_gyro
logger on
echo "Running for 10 seconds"
sleep 10
logger off
sensors status
uorb top -a -1
listener sensor_gyro
listener sensor_gyro_fifo
echo "ALL TESTS PASSED"
shutdown