mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
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:
51
posix-configs/SITL/init/test/test_imu_filtering
Normal file
51
posix-configs/SITL/init/test/test_imu_filtering
Normal 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
|
||||
Reference in New Issue
Block a user