ekf2 replay: refactor to use unified rcS scripts

This commit is contained in:
Beat Küng
2018-08-13 21:50:14 -04:00
committed by Daniel Agar
parent 34f1bbeb44
commit ab7f68f2ad
5 changed files with 40 additions and 28 deletions
@@ -0,0 +1,18 @@
#!/usr/bin/bash
# EKF2 replay script
publisher_rules_file="orb_publisher.rules"
cat <<EOF > "$publisher_rules_file"
restrict_topics: sensor_combined, vehicle_gps_position, vehicle_land_detected
module: replay
ignore_others: false
EOF
uorb start
param set SDLOG_DIRS_MAX 7
ekf2 start -r
logger start -f -t -b 1000 -p vehicle_attitude
sleep 0.2
replay start
+13 -2
View File
@@ -4,6 +4,17 @@
# (px4-alias.sh is expected to be in the PATH)
source px4-alias.sh
# Main SITL startup script
# check for ekf2 replay
if [ "$replay_mode" == "ekf2" ]
then
sh etc/init.d-posix/rc.replay
exit 0
fi
# TODO: In the future we want to share rc.autostart with NuttX
#source rc.autostart
@@ -119,11 +130,11 @@ mc_att_control start
# infrastructure already available on NuttX.
if param compare SYS_AUTOSTART 10016
then
source etc/init.d-posix/10016_iris
sh etc/init.d-posix/10016_iris
elif param compare SYS_AUTOSTART 6011
then
source etc/init.d-posix/6011_typhoon_h480
sh etc/init.d-posix/6011_typhoon_h480
fi